/* --- style.css (Fixed: Coming Soon + Login Styles) --- */

/* 1. Design Tokens */
:root {
    --brand-navy: #0e1b4d; 
    --brand-blue: #1a2b6d;
    --action-orange: #f3703e;
    --action-orange-hover: #d35400;
    
    /* Accents */
    --accent-green: #00d66c;
    --accent-purple: #a2179eff;
    
    --text-main: #1a1a1a;
    --text-muted: #5e6d82;
    --bg-body: #f4f7fa;
    --white: #ffffff;
    
    --radius: 8px;
    --shadow: 0 4px 20px rgba(14, 27, 77, 0.08);

    /* Quiz Theme Overrides */
    --brand-blue-light: #1e293b;
    --brand-orange: #f3703e;
}

/* --- RESET & LAYOUT FIXES --- */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* 2. Global Styles */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, .nav-link, .menu-btn {
    font-family: 'Poppins', sans-serif;
}

/* Utilities */
.hidden-important {
    display: none !important;
}

/* 3. Navigation */
nav {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 40px; 
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--brand-navy);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--brand-navy);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--brand-navy);
}

.nav-btn {
    background-color: var(--brand-navy);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(14, 27, 77, 0.2);
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-btn:hover {
    background-color: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(14, 27, 77, 0.3);
}

/* --- Dropdowns --- */
.nav-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 32px 8px 16px;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    background-color: #f8f9fa;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230e1b4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.nav-select:hover {
    background-color: #fff;
    border-color: var(--brand-navy);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.nav-select:focus {
    border-color: var(--action-orange);
}

#courseSelect {
    border: 1px solid #e0e6ed;
}
#courseSelect:hover {
    border-color: var(--brand-blue);
}

#mobileLangSelect, #mobileCourseSelect {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none; /* Hidden on Desktop */
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brand-navy);
    font-size: 1rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--brand-navy);
    border-radius: 2px;
}

.mobile-menu-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid #eee;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: all 0.3s ease-in-out;
    z-index: 99;
}

.mobile-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-dropdown a {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--brand-navy);
    font-weight: 600;
}

/* 4. Hero Section */
header {
    background-color: var(--brand-navy);
    color: var(--white);
    padding: 4rem 1rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(
        rgba(14, 27, 77, 0.85), 
        rgba(14, 27, 77, 0.85)
    ), 
    url('https://images.unsplash.com/photo-1529156069898-49953e39b3ac?q=80&w=1600'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

header::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

header p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
    font-weight: 300;
}

.cta-btn {
    display: inline-block;
    padding: 16px 40px;
    background-color: var(--action-orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 10px 20px rgba(243, 112, 62, 0.3);
}

.cta-btn:hover {
    background-color: var(--action-orange-hover);
    transform: translateY(-2px);
}

/* 5. Main Grid */
.container {
    max-width: 1100px;
    margin: -20px auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-top: 6px solid transparent;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

/* --- Theme Button --- */
#theme-toggle {
    display: flex; 
    align-items: center;
    justify-content: center;
}

#mobile-theme-toggle {
    display: none; /* Hidden on Desktop */
}

/* Card Accents */
.card.blue { border-top-color: #00E5FF; }
.card.green { border-top-color: var(--accent-green); }
.card.orange { border-top-color: var(--action-orange); }
.card.purple { border-top-color: var(--accent-purple); }

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}

.card h3 {
    margin: 0 0 10px;
    color: var(--brand-navy);
    font-size: 1.2rem;
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.text-link {
    color: var(--brand-navy);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.text-link::after {
    content: '→';
    transition: margin-left 0.2s;
}

.text-link:hover::after { margin-left: 8px; }

/* 6. Footer */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 30px 0 30px;
    font-size: 0.95rem;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col:first-child h4 {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-col:first-child p {
    max-width: 300px;
    line-height: 1.6;
    opacity: 0.8;
}

.footer-col h4 {
    color: #ffffff;
    margin-bottom: 25px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { 
    margin-bottom: 15px; 
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer-links a:hover { 
    color: var(--action-orange); 
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
    opacity: 0.6;
}

/* 7. RTL Support */
html[dir="rtl"] body {
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
    text-align: right;
}

html[dir="rtl"] .nav-links {
    flex-direction: row-reverse; 
}

html[dir="rtl"] .text-link::after {
    content: '←'; 
    margin-left: 0;
    margin-right: 5px;
}

html[dir="rtl"] .text-link:hover::after {
    margin-right: 8px;
}

html[dir="rtl"] .logo-link {
    margin-left: 20px; 
    margin-right: 0;
}

html[dir="rtl"] .card {
    align-items: flex-start; 
}

/* --- LOGIN / SIGNUP PAGE STYLES --- */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f4f7fa 0%, #e3e9f0 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(14, 27, 77, 0.1);
    width: 100%;
    max-width: 450px;
    border-top: 6px solid var(--brand-navy);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--brand-navy);
    margin-bottom: 10px;
    font-size: 2rem;
}

.login-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--brand-navy);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e6ed;
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    border-color: var(--action-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 112, 62, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--brand-navy);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
}

.login-btn:hover {
    background-color: var(--brand-blue);
    transform: translateY(-2px);
}

.auth-toggle {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--action-orange);
    text-decoration: none;
    font-weight: 600;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* --- COMING SOON PAGE (RESTORED) --- */
.coming-soon-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f4f7fa 0%, #e3e9f0 100%);
    padding: 20px;
}

.coming-soon-card {
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 500px;
    width: 100%;
    border-top: 6px solid var(--action-orange);
}

.cs-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.coming-soon-card h1 {
    color: var(--brand-navy);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.coming-soon-card p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 40%;
    background-color: var(--action-orange);
    border-radius: 4px;
    animation: loading 2s infinite linear;
    transform-origin: 0% 50%;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* --- CHATBOT STYLES --- */
@keyframes pulse-animation {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
    50% { transform: scale(1.1); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
}

/* RTL Chat Support */
html[dir="rtl"] .chat-window {
    text-align: right;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}
html[dir="rtl"] .chat-header { flex-direction: row-reverse; }
html[dir="rtl"] #close-chat { margin-right: auto; margin-left: 0; }
html[dir="rtl"] .chat-title { flex-direction: row-reverse; }
html[dir="rtl"] .chat-input-area { flex-direction: row-reverse; }
html[dir="rtl"] #user-input { text-align: right; }
html[dir="rtl"] #send-btn { transform: rotate(180deg); }
html[dir="rtl"] .message.user { align-self: flex-start; border-bottom-right-radius: 10px; border-bottom-left-radius: 2px; }
html[dir="rtl"] .message.bot { align-self: flex-end; border-bottom-left-radius: 10px; border-bottom-right-radius: 2px; }

/* --- QUIZ INTEGRATION --- */
/* Override Tailwind Teal with Brand Navy */
.bg-teal-600, .bg-teal-500 { background-color: var(--brand-navy) !important; }
.hover\:bg-teal-700:hover { background-color: var(--brand-blue-light) !important; }
.text-teal-600, .text-teal-700 { color: var(--brand-navy) !important; }
.text-teal-500 { color: var(--brand-orange) !important; }
.border-teal-500 { border-color: var(--brand-navy) !important; }
.bg-teal-50 { background-color: #f1f5f9 !important; } 
.ring-teal-300 { --tw-ring-color: var(--brand-orange) !important; }
.focus\:ring-teal-500:focus { --tw-ring-color: var(--brand-orange) !important; }

.quiz-wrapper {
    min-height: 80vh;
    padding: 2rem 1rem;
    background-color: #f3f4f6;
    display: flex;
    justify-content: center;
}

.quiz-card {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gradient-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, #1e293b 100%) !important;
}

.option-button {
    transition: all 0.2s;
    border: 2px solid #e5e7eb;
}
.option-button:hover:not(:disabled) {
    border-color: var(--brand-navy);
    background-color: #f8fafc;
}

.cefr-button {
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}
.cefr-button:hover {
    transform: translateY(-4px);
    border-color: var(--brand-orange);
}

.fixed.inset-0 { z-index: 1000; }

/* --- CARD BACKGROUNDS --- */
.card[class*="bg-"] {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card[class*="bg-"] h3,
.card[class*="bg-"] p,
.card[class*="bg-"] .text-link {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 2;
}

.card[class*="bg-"] .text-link:hover {
    color: var(--action-orange);
}

.card[class*="bg-"] .icon-box {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bg-speak { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1719437364589-17a545612428?q=80&w=687&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'); }
.bg-listen { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1758273239194-034091896501?q=80&w=1331&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'); }
.bg-grammar { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?q=80&w=800'); }
.bg-write { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1455390582262-044cdead277a?q=80&w=800'); }
.bg-vocabulary { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1491841550275-ad7854e35ca6?q=80&w=800'); }
.bg-quiz { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1606326608606-aa0b62935f2b?q=80&w=800'); }
.bg-read { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1506880018603-83d5b814b5a6?q=80&w=800'); }
.bg-personas { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://plus.unsplash.com/premium_photo-1682464708085-95b4486e2c32?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NzN8fGFpJTIwYm90fGVufDB8fDB8fHww'); }
.bg-games { background-image: linear-gradient(rgba(14, 27, 77, 0.8), rgba(14, 27, 77, 0.6)), url('https://images.unsplash.com/photo-1758523668137-b491b94f9735?q=80&w=1332&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'); }

.card[class*="bg-"]:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* --- USER PROFILE DROPDOWN --- */
.user-profile-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 15px;
    /* Initially hidden via JS if not logged in, but we can rely on JS to toggle */
}

.nav-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #e0e6ed;
    transition: all 0.3s ease;
}

.nav-avatar:hover {
    border-color: var(--action-orange);
    box-shadow: 0 4px 10px rgba(14, 27, 77, 0.2);
    transform: scale(1.05);
}

.profile-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: 220px;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    border-top: 4px solid var(--brand-navy); 
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: var(--brand-navy);
    font-size: 1rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 8px 0;
}

.profile-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background-color: #f8f9fa;
    color: var(--brand-navy);
}

.profile-dropdown .logout-link { color: #e74c3c; cursor: pointer; }
.profile-dropdown .logout-link:hover { color: #c0392b; background-color: #fff5f5; }

/* Desktop-only hidden elements */
.mobile-profile-container, .mobile-nav-group {
    display: none;
}

/* 8. Unified Responsive Logic (Mobile) */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .nav-container { padding: 0 12px; }
    
    .logo-link { margin-right: 0; gap: 8px; }
    .logo-text { font-size: 1.2rem; }
    
    /* Header Sizing */
    header { padding: 2rem 1rem 7rem; min-height: auto; }
    header h1 { font-size: 2rem; margin-bottom: 15px; }
    header p { font-size: 1rem; margin-bottom: 25px; }
    
    /* Grid Adjustments */
    .container { 
        margin-top: -50px; 
        padding: 0 15px; 
        gap: 15px; 
        grid-template-columns: 1fr; 
    }
    .card { padding: 20px; }
    
    /* Footer */
    .footer-container { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-col:first-child p { margin: 0 auto; }
    .footer-links a:hover { transform: none; }
    
    /* Chat Window */
    .chat-window { width: 90%; right: 5%; bottom: 100px; }
    
    /* Theme Toggle */
    #mobile-theme-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto; 
        margin-right: 5px; 
        line-height: 1;    
    }

    /* --- Navigation Items --- */
    /* Hide Desktop Items */
    .nav-links { display: none; }
    
    /* Show Mobile Groups */
    .mobile-nav-group {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-left: auto;
        flex-shrink: 0;
    }
    
    /* Force Menu Button Visible */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        flex-shrink: 0;
    }

    /* Mobile Profile Section */
    .mobile-profile-container {
        display: block;
        position: relative; 
        flex-shrink: 0; 
    }

    .mobile-avatar-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #e0e6ed;
        cursor: pointer;
        display: block;
    }

    /* Mobile Dropdown Positioning */
    .mobile-dropdown-pos {
        width: 200px;
        right: -10px;
        top: 45px;
        position: absolute;
        z-index: 1001;
    }
    
    /* Mobile User Details specific styles */
    .mobile-user-details { display: flex; flex-direction: column; }
    .mobile-username { font-weight: 700; color: var(--brand-navy); font-size: 1.1rem; }
    .mobile-email { font-size: 0.85rem; color: var(--text-muted); }
    .mobile-divider { border: none; border-top: 1px solid #eee; margin: 5px 0 15px 0; width: 100%; }
    
    .camera-icon {
        position: absolute;
        bottom: 0;
        right: 0;
        background: var(--white);
        border-radius: 50%;
        padding: 2px;
        font-size: 12px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
}
