/* FUNGEO NAVBAR - MOBILE PERFECT (Mar 16, 2026) */

/* DESKTOP NAVBAR */
.navbar {
    background: linear-gradient(90deg, #3498db, #2980b9);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: visible;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar strong {
    font-size: 24px;
    display: inline-block;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.nav-logo {
    cursor: pointer;
    font-size: 24px;
}

.nav-link {
    color: white !important;
    margin-right: 20px;
    text-decoration: none;
    font-weight: bold;
    line-height: 24px;
}

/* CLICK DROPDOWN SYSTEM */
.dropdown {
    position: relative;
    display: inline-block;
    margin-left: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: white;
    min-width: 160px;
    max-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    border-radius: 8px;
    margin-top: 5px;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dropdown-content.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

.dropbtn {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    color: white;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    line-height: 1;
    margin-left: 5px;
}

/* Dropdown items */
.dropdown-content a, 
.dropdown-content button {
    color: black !important;
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-content a:hover, 
.dropdown-content button:hover {
    background-color: #f1f1f1;
}

.body-content {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* MOBILE HAMBURGER BUTTON */
.navbar .nav-right .hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10001 !important;
}

.navbar .nav-right .hamburger span {
    display: block !important;
    height: 4px !important;
    width: 100% !important;
    background: #ffffff !important;
    border-radius: 2px !important;
    margin: 2px 0 !important;
    transition: all 0.25s ease !important;
}

.navbar .nav-right .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px) !important;
}

.navbar .nav-right .hamburger.active span:nth-child(2) {
    opacity: 0 !important;
    transform: translateX(20px) !important;
}

.navbar .nav-right .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px) !important;
}

/* SHOW ON MOBILE ONLY */
@media (max-width: 768px) {
    .navbar .nav-right .hamburger {
        display: flex !important;
    }
}

/* PERFECT MOBILE RESPONSIVE - ALL ITEMS IDENTICAL */
/* PERFECT MOBILE RESPONSIVE - ALL ITEMS IDENTICAL (FIXED) */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }
    
    .nav-right {
        position: relative;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    .mobile-menu.active {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(90deg, #3498db, #2980b9);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        padding: 20px;  /* Reduced padding */
        flex-direction: column;
        gap: 10px;
        z-index: 10000;
        max-height: 70vh;
        overflow: visible;  /* Changed */
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* SIMPLIFIED: All items same padding + background */
    .mobile-menu .language-toggle,
    .mobile-menu .nav-link,
    .mobile-menu .dropdown {
        background: rgba(255,255,255,0.2) !important;
        border-radius: 12px !important;
        padding: 16px 20px !important;
        margin: 0 !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border: 2px solid rgba(255,255,255,0.1);
    }
    
    /* Language */
    .mobile-menu .language-toggle select {
        width: 100%;
        background: transparent !important;
        border: none !important;
        color: white !important;
        font-size: 16px;
        padding: 0 !important;
    }
    
    /* Home - SAME as others */
    .mobile-menu .nav-link {
        color: white !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        line-height: 1.2 !important;
        border: none !important;
    }
    
    /* Username button - SAME as others */
    .mobile-menu .dropbtn {
        background: transparent !important;
        border: none !important;
        color: white !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        text-align: left;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 !important;  /* Uses parent padding */
        cursor: pointer;
    }
    
    /* DROPDOWN FIX - EXPANDS FULL WIDTH BELOW */
    .mobile-menu .dropdown {
        position: relative !important;
        background: rgba(255,255,255,0.2) !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;  /* Space for dropdown */
    }
    
    .mobile-menu .dropdown-content {
        position: absolute !important;
        left: 20px !important;  /* Match padding */
        right: 20px !important;
        top: 100% !important;
        background: white !important;
        border-radius: 0 0 12px 12px !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
        z-index: 10002 !important;
        margin-top: 4px !important;
        max-height: 220px;
        overflow-y: auto;
        display: none;
        opacity: 0;
        transform: translateY(-5px);
        transition: all 0.25s ease;
    }
    
    .mobile-menu .dropdown-content.show {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
    
    /* Rest unchanged */
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 18px;
        position: sticky;
        top: 0;
        z-index: 10001;
    }
    
    .nav-left { gap: 12px; }
    .nav-logo { font-size: 20px; }
    .navbar span { display: none !important; }
}


/* ALL OTHER STYLES (unchanged) */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-title {
    color: #3498db;
}

.premium-active {
    color: green;
    font-weight: bold;
}

.premium-inactive {
    color: orange;
}

.premium-loading {
    color: orange;
}

.btn-upgrade {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.premium-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 50px;
}

.premium-title {
    color: #e74c3c;
}

.premium-status-active {
    color: green;
}

.premium-status-inactive {
    color: orange;
}

.premium-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
}

.premium-login-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
}

.premium-back-link {
    margin-top: 30px;
}

.register-container {
    max-width: 400px;
    margin: auto;
}

.register-title {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.form-error {
    color: red;
}

.register-btn {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.register-login-link {
    text-align: center;
    margin-top: 20px;
}

.login-container {
    max-width: 400px;
    margin: auto;
}

.login-title {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.login-register-link {
    text-align: center;
    margin-top: 20px;
}

.quiz-title-cell {
    font-weight: 500;
}

.language-toggle {
    display: inline-block;
    margin-left: 1rem;
}

.switch-container {
    display: inline-flex;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

.switch-btn {
    padding: 6px 12px;
    border: none;
    background: #f8f9fa;
    color: #555;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.switch-btn-en {
    border-right: 1px solid #ddd;
}

.switch-btn-hi {
    border-left: 1px solid #ddd;
}

.switch-btn.active {
    background: #3498db;
    color: white;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-link:hover {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .quiz-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; 
    }
    .quiz-buttons { 
        flex-direction: column; 
        gap: 12px; 
    }
}


.site-footer {
    margin-top: 60px;
    padding: 20px 10px;
    text-align: center;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #ddd;
}

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

.site-footer a {
    color: #3498db;
    text-decoration: none;
    margin: 0 4px;
}

.site-footer a:hover {
    text-decoration: underline;
}