@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Lateef:wght@400;700&display=swap');

:root {
    --bg-dark: #131314;
    --surface-dark: #1e1f20;
    --surface-dark-rgb: 30, 31, 32;
    --text-primary: #e3e3e3;
    --text-secondary: #9aa0a6;
    --border-color: #3c4043;
    --accent-green: #34a853;
    --accent-yellow: #fbbc05;
    --font-arabic: 'Lateef', serif;
    --sidebar-width-collapsed: 80px;
    --sidebar-width-expanded: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-dark); color: var(--text-primary); height: 100vh; overflow: hidden; }
.app-container { display: flex; height: 100%; width: 100%; }

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width-collapsed);
    background-color: var(--surface-dark);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: width 0.3s ease;
    overflow-x: hidden;
    z-index: 10; /* Ensure sidebar stays on top */
}
.sidebar:hover { width: var(--sidebar-width-expanded); }
.sidebar-header { height: 80px; display: flex; align-items: center; flex-shrink: 0; }
.sidebar-header a { display: flex; align-items: center; text-decoration: none; color: var(--text-primary); width: 100%; height: 100%; }

.sidebar-header i {
    font-size: 1.8rem;
    color: var(--accent-green);
    flex-shrink: 0;
    width: var(--sidebar-width-collapsed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header h2 { font-size: 1.5rem; font-weight: 600; white-space: nowrap; margin-left: 0.5rem; }
.sidebar .sidebar-text { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s; white-space: nowrap; }
.sidebar:hover .sidebar-text { opacity: 1; visibility: visible; transition: opacity 0.2s ease 0.1s, visibility 0s; }
.sidebar-nav { flex-grow: 1; padding-top: 1rem; }
.sidebar ul { list-style: none; }
.sidebar li a { display: flex; align-items: center; text-decoration: none; color: var(--text-secondary); border-radius: 8px; transition: background-color 0.2s, color 0.2s; font-weight: 500; overflow: hidden; height: 56px; margin: 0 0.75rem 0.5rem; }
.sidebar li a:hover { background-color: #2a2b2c; color: var(--text-primary); }
.sidebar li.active a { background-color: var(--accent-green); color: white; }
.sidebar li a i { font-size: 1.2rem; text-align: center; flex-shrink: 0; width: calc(var(--sidebar-width-collapsed) - 1.5rem); }

/* MAIN CONTENT AREA */
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.chat-container, .dictionary-container { display: flex; flex-direction: column; height: 100%; width: 100%; }
.main-header { display: none; }

/* --- CHAT AREA STYLES --- */
.chat-area { 
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 2rem; 
    width: 100%; 
    max-width: 1000px; /* Wider reading area */
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Scrollbar Integration */
.chat-area::-webkit-scrollbar { width: 8px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 4px; }
.chat-area::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }

/* Message Layout */
.message-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.message-row.user {
    justify-content: flex-end;
}

.message-row.ai {
    justify-content: flex-start;
}

/* Avatar Styling */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar.ai {
    background-color: var(--surface-dark);
    color: var(--accent-green);
    border: 1px solid var(--border-color);
}

.avatar.user {
    display: none; /* Hide user avatar for cleaner look */
}

/* Bubble Styling */
.message-bubble {
    max-width: 85%;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    line-height: 1.6;
    position: relative;
}

/* AI Bubble */
.message-bubble.ai {
    background-color: transparent; /* Seamless look */
    color: var(--text-primary);
    padding: 0; /* Remove padding to align with avatar */
    margin-top: 6px; /* Visual alignment with avatar center */
}

/* User Bubble */
.message-bubble.user {
    background-color: var(--surface-dark);
    color: var(--text-primary);
    border-radius: 18px;
    border: 1px solid var(--border-color);
}

/* Content Elements inside AI Response */
.ai-response-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-response-content p {
    margin-bottom: 0.5rem;
}

/* Input Area Fixed at Bottom */
.input-container { 
    padding: 1rem 2rem 2rem 2rem; 
    width: 100%; 
    max-width: 900px; 
    margin: 0 auto; 
    flex-shrink: 0; 
    background-color: var(--bg-dark); /* Blend with background */
    position: relative;
    z-index: 5;
}

.input-form { 
    display: flex; 
    align-items: flex-end; 
    gap: .75rem; 
    background-color: var(--surface-dark); 
    padding: .75rem 1rem; 
    border-radius: 28px; 
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

textarea { 
    flex-grow: 1; 
    background: transparent; 
    border: none; 
    color: var(--text-primary); 
    font-family: inherit; 
    font-size: 1rem; 
    resize: none; 
    max-height: 150px; 
    overflow-y: auto; 
    padding: .25rem; 
}
textarea:focus { outline: none; }

button#askButton { 
    background-color: var(--accent-green); 
    color: white; /* Contrast text */
    border: none; 
    border-radius: 50%; 
    width: 36px; 
    height: 36px; 
    font-size: 1rem; 
    cursor: pointer; 
    flex-shrink: 0; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: transform .2s, background-color .2s; 
}
button#askButton:hover {
    background-color: #2a8a42;
    transform: scale(1.05);
}
button#askButton:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

/* Prompt Suggestions - Revised Layout */
.prompt-suggestions-wrapper {
    margin-bottom: 1rem; /* Added spacing from input */
    padding: 0 1rem;
}

.prompt-suggestions-wrapper summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 0.5rem;
    list-style: none; /* Hide default arrow */
}

.prompt-suggestions { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.75rem; 
}

.suggestion-card { 
    background-color: transparent; 
    border: 1px solid var(--border-color); 
    border-radius: 20px; /* Pill shape */
    padding: 0.5rem 1rem; 
    font-size: 0.9rem; 
    cursor: pointer; 
    transition: all 0.2s; 
    color: var(--text-secondary);
}
.suggestion-card:hover {
    border-color: var(--accent-green);
    color: var(--text-primary);
    background-color: rgba(52, 168, 83, 0.1);
}

/* Thinking & Sources Styling */
.thinking-dropdown details { 
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
}
.thinking-dropdown summary { 
    padding: 0.75rem 1rem; 
    cursor: pointer; 
    font-weight: 500; 
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.thinking-dropdown-content { 
    padding: 1rem; 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
    border-top: 1px solid var(--border-color); 
    font-family: monospace; /* Distinction for thought process */
}

.sources-quote { 
    background-color: rgba(251, 188, 5, 0.1); /* Subtle yellow tint */
    border-left: 3px solid var(--accent-yellow); 
    padding: 1rem; 
    border-radius: 0 8px 8px 0;
    margin: 1rem 0; 
    font-style: italic; 
    color: var(--text-primary); 
}

.web-sources-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.web-source-card { 
    background-color: rgba(255,255,255,0.05); 
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    padding: 0.25rem 0.75rem; 
    font-size: 0.8rem; 
    text-decoration: none; 
    color: var(--text-secondary); 
    transition: border-color .2s; 
}
.web-source-card:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Loader */
.loader-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

/* --- PRESERVED DICTIONARY & OTHER STYLES BELOW --- */
/* DICTIONARY CONTENT AREA (Quran/Hadith) */
.dictionary-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    width: 100%;
    margin: 0 auto;
}

.dictionary-container .search-bar,
.dictionary-container .dictionary-content {
    max-width: none;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Search bar general */
.search-bar { padding: 1.5rem 1.5rem 0; position: relative; width: 100%; margin: 0 auto; flex-shrink: 0; margin-bottom: 1rem; }
.search-bar input { width: 100%; padding: .75rem .75rem .75rem 2.5rem; border-radius: 24px; border: 1px solid var(--border-color); background-color: var(--surface-dark); color: var(--text-primary); font-size: 1rem; }
.search-bar i {
    position: absolute;
    left: 3.5rem;
    top: 2.85rem;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* DICTIONARY CARD STYLES (GENERAL) */
.dictionary-card { background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 1rem; padding: 0; }
.dictionary-card p { color: var(--text-secondary); line-height: 1.6; }
.arabic-text { font-family: var(--font-arabic); font-size: 1.8rem; color: var(--text-primary); text-align: right; direction: rtl; margin-bottom: 1rem; line-height: 2.5rem; }
.card-body { padding: 1.5rem; border-top: 1px solid var(--border-color); }
.dictionary-card details summary { list-style: none; cursor: pointer; padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dictionary-card details summary::-webkit-details-marker { display: none; }
.dictionary-card summary::after { content: '▼'; font-size: 0.8rem; color: var(--text-secondary); transition: transform 0.2s; }
.dictionary-card details[open] summary::after { transform: rotate(180deg); }

/* HADITH CARD STYLES */
.hadith-card .header-main { flex-grow: 1; min-width: 0; }
.hadith-card h3 { font-size: 1.2rem; color: var(--text-primary); }
.hadith-card h4 { font-size: 1rem; font-weight: 500; color: var(--text-secondary); margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hadith-card .card-meta { font-size: 0.9rem; color: var(--text-secondary); text-align: right; flex-shrink: 0; }

/* QURAN CARD STYLES (GENERAL) */
.quran-card h3 { font-size: 1.2rem; font-weight: 500; flex-grow: 1; }
.quran-card .verse-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border-color); }
.quran-card .verse-item:first-child { padding-top: 0; }
.quran-card .verse-item:last-child { border-bottom: none; padding-bottom: 0; }
.quran-card .verse-meta { font-size: 0.9rem; font-weight: 600; color: var(--accent-yellow); margin-bottom: 1rem; }
.arabic-surah-name {
    font-family: var(--font-arabic);
    font-size: 1.6rem;
    color: var(--text-primary);
}

/* SEARCH NOTIFICATION STYLES */
.search-error-message {
    color: var(--accent-yellow);
    font-size: 0.85rem;
    padding-left: 1rem;
    margin-top: 0.5rem;
    height: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.search-error-message.visible { opacity: 1; }
.no-results-message { display: none; text-align: center; color: var(--text-secondary); padding: 3rem 1rem; font-size: 1.1rem; }

/* HADITH LIST STYLES */
.breadcrumbs { padding: 2rem 2rem 0rem 2rem; color: var(--text-secondary); font-size: 0.9rem; margin: 0; width: 100%; }
.breadcrumbs a { color: var(--accent-green); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { color: var(--text-primary); }

.list-card { display: block; background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 1rem; padding: 1.5rem; text-decoration: none; color: var(--text-primary); transition: background-color 0.2s; }
.list-card:hover { background-color: #2a2b2c; }
.list-card h3 { font-size: 1.2rem; font-weight: 500; }
.chapter-card-header { display: flex; align-items: center; gap: 1rem; }
.chapter-card-header .chapter-number { font-size: 1rem; color: var(--text-secondary); font-weight: 600; flex-shrink: 0; }

/* QURAN LIST & DETAIL STYLES */
.quran-list-card { display: flex; justify-content: space-between; align-items: center; }
.quran-list-header { display: flex; align-items: center; gap: 1rem; }
.quran-list-header .chapter-number { display: none; }
.surah-info { display: flex; flex-direction: column; }
.revelation-place { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.25rem; }
.latin-text { font-style: italic; color: var(--text-secondary) !important; margin-bottom: 0.5rem; }
.description-body { line-height: 1.7; color: var(--text-secondary); }
.description-body i { font-style: italic; color: var(--text-primary); }

/* QURAN DETAIL PAGE STYLING */
.quran-detail-content { padding-top: 0; max-width: none; }
.quran-detail-header-card { background: linear-gradient(to bottom right, var(--accent-green), #2a7c46); border-radius: 12px; padding: 2rem; color: white; text-align: center; margin-bottom: 1.5rem; position: relative; max-width: none; margin-left: auto; margin-right: auto; }
.quran-detail-header-card h1 { font-size: 1.8rem; font-weight: 600; margin-bottom: 0.25rem; }
.quran-detail-header-card h2 { font-size: 1.1rem; font-weight: 400; color: rgba(255, 255, 255, 0.8); margin-bottom: 0.5rem; }
.quran-detail-header-card .header-meta { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 1rem; display: block; }
.quran-detail-header-card .arabic-surah-name-header { font-family: var(--font-arabic); font-size: 2.5rem; margin-bottom: 1.5rem; }

/* Description Dropdown */
.surah-description-details { background-color: rgba(0, 0, 0, 0.1); border-radius: 8px; margin-top: 1rem; }
.surah-description-details summary { list-style: none; cursor: pointer; padding: 0.75rem 1rem; display: flex; justify-content: space-between; align-items: center; font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.surah-description-details summary::-webkit-details-marker { display: none; }
.surah-description-details summary i { font-size: 0.9rem; transition: transform 0.2s ease-in-out; }
.surah-description-details[open] summary i { transform: rotate(180deg); }
.surah-description-details .description-body { padding: 1rem; padding-top: 0.5rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); text-align: left; line-height: 1.6; }
.surah-description-details .description-body i { color: white; }

/* Separator Line */
.separator { height: 1px; background-color: var(--border-color); margin: 1.5rem auto; width: 100%; max-width: none; }
.verse-separator { margin: 0 auto; }

/* Verse Card Adjustments */
.verse-card { background-color: transparent; border: none; margin-bottom: 0; padding: 0; max-width: none; margin-left: auto; margin-right: auto; }
.verse-body { border-top: none; padding: 1.5rem 0; }
.verse-header { display: flex; justify-content: space-between; align-items: center; background-color: rgba(var(--surface-dark-rgb, 30 31 32), 0.8); padding: 0.75rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; }
.verse-number { font-weight: 600; color: var(--text-primary); background-color: var(--accent-green); border-radius: 50%; width: 28px; height: 28px; display: flex; justify-content: center; align-items: center; font-size: 0.9rem; }
.verse-actions i { color: var(--text-secondary); font-size: 1.1rem; margin-left: 1rem; cursor: pointer; transition: color 0.2s; }
.verse-actions i:hover { color: var(--text-primary); }
.verse-actions i.copied { color: var(--accent-green); }
.verse-item { padding: 0; border-bottom: none; }
.verse-item .verse-meta { display: none; }
.verse-item .arabic-text { font-size: 2.2rem; line-height: 3.5rem; margin-bottom: 1.5rem; }
.verse-item .latin-text { margin-bottom: 0.75rem; font-size: 0.95rem; }
.verse-item .translation-text { line-height: 1.7; font-size: 1rem; color: var(--text-primary); }

/* Audio player styling */
#audioPlayer { display: none; }

/* CUSTOM SCROLLBAR REPEATED FOR OTHER CONTAINERS */
.dictionary-content::-webkit-scrollbar, .surah-list-container::-webkit-scrollbar { width: 8px; }
.dictionary-content::-webkit-scrollbar-track, .surah-list-container::-webkit-scrollbar-track { background: var(--surface-dark); border-radius: 4px; }
.dictionary-content::-webkit-scrollbar-thumb, .surah-list-container::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 4px; border: 2px solid var(--surface-dark); }
.dictionary-content::-webkit-scrollbar-thumb:hover, .surah-list-container::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }
.dictionary-content, .surah-list-container { scrollbar-width: thin; scrollbar-color: var(--border-color) var(--surface-dark); }

/* MURAJAAH SELECTION PAGE */
.murajaah-card { background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 12px; margin-bottom: 1.5rem; }
.murajaah-card .card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.murajaah-card .card-header h3 { font-size: 1.2rem; font-weight: 600; }
.murajaah-card .card-body { padding: 1.5rem; }
.qari-selector { display: flex; align-items: center; gap: 1.5rem; }
.qari-image { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; border: 2px solid var(--border-color); flex-shrink: 0; }
.qari-dropdown-wrapper { flex-grow: 1; position: relative; }
.qari-dropdown-wrapper::after { content: '▼'; font-size: 0.8rem; color: var(--text-secondary); position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.qari-dropdown { flex-grow: 1; font-size: 1.1rem; padding: 0.75rem 2rem 0.75rem 1rem; background-color: var(--bg-dark); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 8px; font-family: 'Inter', sans-serif; width: 100%; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.qari-dropdown::-ms-expand { display: none; }
.murajaah-search { width: 100%; padding: 0.75rem 0.75rem 0.75rem 1rem; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-dark); color: var(--text-primary); font-size: 1rem; margin-bottom: 1.5rem; }
.surah-list-container { max-height: 400px; overflow-y: auto; padding-right: 10px; }
.surah-select-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.surah-select-card .surah-list-number { flex-shrink: 0; font-size: 1rem; font-weight: 500; color: var(--text-secondary); width: 30px; text-align: center; }
.surah-select-card .surah-list-info { flex-grow: 1; display: flex; flex-direction: column; }
.surah-select-card .surah-list-arabic { flex-shrink: 0; }
.surah-select-card h3 { font-size: 1.1rem; }
.surah-select-card .revelation-place { font-size: 0.85rem; color: var(--text-secondary); }

/* MURAJAAH DETAIL PAGE */
.murajaah-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem 1.5rem 2rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }
.header-info { text-align: left; }
.murajaah-header h1 { font-size: 2rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.murajaah-header .qari-name { font-size: 1rem; color: var(--text-secondary); }
.autoplay-control { display: flex; align-items: center; gap: 0.75rem; }
.switch-label { color: var(--text-secondary); font-size: 0.95rem; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--surface-dark); border: 1px solid var(--border-color); transition: .4s; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: var(--text-secondary); transition: .4s; }
.switch input:checked + .slider { background-color: var(--accent-green); border-color: var(--accent-green); }
.switch input:checked + .slider:before { transform: translateX(18px); background-color: white; }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* MODAL STYLES */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background-color: var(--surface-dark); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color); text-align: center; width: 90%; max-width: 400px; }
.modal-content h3 { color: var(--text-primary); margin-bottom: 1rem; }
.modal-content p { color: var(--text-secondary); margin-bottom: 2rem; }
.modal-actions { display: flex; gap: 1rem; justify-content: center; }
.modal-btn { padding: 0.75rem 1.5rem; border-radius: 8px; cursor: pointer; font-weight: 500; border: none; transition: opacity 0.2s; }
.modal-btn:hover { opacity: 0.9; }
.modal-btn.primary { background-color: var(--accent-green); color: white; }
.modal-btn.secondary { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }

.murajaah-text-content { padding-top: 1rem; padding-bottom: 3rem; }
.murajaah-arabic-text { font-family: var(--font-arabic); font-size: 2.5rem; line-height: 5rem; text-align: justify; text-justify: inter-word; direction: rtl; color: var(--text-secondary); }
.murajaah-arabic-text .ayat-span { cursor: pointer; transition: color 0.2s ease-in-out; }
.murajaah-arabic-text .ayat-span:hover { color: var(--text-primary); }
.murajaah-arabic-text .ayat-span.playing { color: var(--accent-green); }
.murajaah-separator { font-family: 'Times New Roman', serif; font-size: 1.5rem; font-weight: bold; color: var(--text-secondary); cursor: default; display: inline-block; vertical-align: middle; line-height: 1; }

/* NAVIGATION BUTTONS STYLES */
.surah-navigation { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; width: 100%; }
.nav-card { display: flex; align-items: center; background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 12px; padding: 1rem 1.5rem; text-decoration: none; color: var(--text-primary); flex: 1; transition: background-color 0.2s, border-color 0.2s; min-width: 0; }
.nav-card:hover { background-color: #2a2b2c; border-color: var(--text-secondary); }
.nav-placeholder { flex: 1; }
.prev-card { justify-content: flex-start; text-align: left; }
.prev-card i { margin-right: 1rem; color: var(--accent-green); }
.next-card { justify-content: flex-end; text-align: right; }
.next-card i { margin-left: 1rem; color: var(--accent-green); }
.nav-info { display: flex; flex-direction: column; }
.nav-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.25rem; }
.nav-surah { font-size: 1.1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* GAME MENU STYLES */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; padding: 1rem 0; }
.game-card { background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: transform 0.2s, border-color 0.2s; text-decoration: none; display: block; color: var(--text-primary); }
.game-card:hover { transform: translateY(-5px); border-color: var(--accent-green); }
.game-icon { width: 80px; height: 80px; background-color: rgba(52, 168, 83, 0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 1.5rem auto; color: var(--accent-green); font-size: 2.5rem; }
.game-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.game-card p { color: var(--text-secondary); font-size: 0.95rem; }
.game-card.disabled { opacity: 0.6; cursor: not-allowed; }
.game-card.disabled:hover { transform: none; border-color: var(--border-color); }

/* GAME CONFIG MODAL */
.config-form-group { margin-bottom: 1.5rem; text-align: left; }
.config-form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 0.9rem; }
.select-wrapper { position: relative; width: 100%; }
.select-wrapper::after { content: '▼'; font-size: 0.8rem; color: var(--text-secondary); position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.config-select { width: 100%; padding: 0.75rem 2rem 0.75rem 0.75rem; background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 1rem; outline: none; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.config-select::-ms-expand { display: none; }
.mode-toggle { display: flex; gap: 2rem; margin-top: 0.5rem; }
.radio-container { display: block; position: relative; padding-left: 30px; margin-bottom: 12px; cursor: pointer; font-size: 1rem; user-select: none; color: var(--text-primary); }
.radio-container input { position: absolute; opacity: 0; cursor: pointer; }
.checkmark { position: absolute; top: 0; left: 0; height: 20px; width: 20px; background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 50%; }
.radio-container:hover input ~ .checkmark { background-color: #2a2b2c; }
.radio-container input:checked ~ .checkmark { background-color: var(--accent-green); border-color: var(--accent-green); }
.checkmark:after { content: ""; position: absolute; display: none; }
.radio-container input:checked ~ .checkmark:after { display: block; }
.radio-container .checkmark:after { top: 6px; left: 6px; width: 8px; height: 8px; border-radius: 50%; background: white; }

/* GAME PLAY STYLES */
.game-container { max-width: 800px; margin: 0 auto; text-align: center; padding-top: 2rem; }
.game-progress { margin-bottom: 2rem; color: var(--text-secondary); font-size: 1.1rem; }
.question-box { background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 16px; padding: 3rem; margin-bottom: 2rem; }
.audio-trigger { width: 100px; height: 100px; background-color: var(--accent-green); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 1.5rem auto; cursor: pointer; transition: transform 0.2s, background-color 0.2s; box-shadow: 0 4px 15px rgba(52, 168, 83, 0.3); }
.audio-trigger:hover { transform: scale(1.05); background-color: #2a8a42; }
.audio-trigger i { font-size: 3rem; color: white; }
.audio-trigger.playing i { animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.9); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.option-btn { background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; font-size: 1.1rem; color: var(--text-primary); cursor: pointer; transition: all 0.2s; }
.option-btn:hover { background-color: #2a2b2c; border-color: var(--text-secondary); }
.option-btn.correct { background-color: rgba(52, 168, 83, 0.2); border-color: var(--accent-green); color: var(--accent-green); }
.option-btn.wrong { background-color: rgba(231, 76, 60, 0.2); border-color: #e74c3c; color: #e74c3c; }
.game-over-card { background-color: var(--surface-dark); border: 1px solid var(--border-color); border-radius: 16px; padding: 3rem; text-align: center; }
.score-display { font-size: 4rem; font-weight: bold; color: var(--accent-green); margin: 1rem 0; }