/* 
   ExploreAIn Base System 
   Shared Infrastructure: 9-Dot Menu, Auth Modal, and Common Resets
*/

:root {
    --global-font: 'Outfit', sans-serif;
    --global-bg-dark: #0b0f14;
    --global-glass-bg: rgba(255, 255, 255, 0.1);
    --global-glass-border: rgba(255, 255, 255, 0.2);
}

/* ================================================
   NAVBAR ACTION BUTTONS (Shared)
   ================================================ */
.nav-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.25s ease;
    font-size: 1.1rem;
    cursor: pointer;
}

.nav-action-btn:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ================================================
   PREMIUM PROFILE TRIGGER (Neural-Link UI)
   ================================================ */
.premium-profile-wrapper {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-profile-trigger {
    width: 200px;
    height: 50px;
    background: transparent;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0;
}

.premium-profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(3.5); /* Zoom in to bypass internal padding */
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.premium-profile-trigger:hover {
    transform: scale(1.05); /* slightly scale the container, img has scale 3.5 already */
}

.premium-profile-trigger .user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-label {
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: var(--global-font);
}

.premium-profile-wrapper:hover .profile-label {
    opacity: 1;
    transform: translateX(0);
}

/* Neural Pulse for Non-Logged In State */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.5);
    animation: neural-pulse 2s infinite;
}

@keyframes neural-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ================================================
   TOP-RIGHT BRANDING
   ================================================ */
.top-right-branding {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align to the right */
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px; /* For 3D depth */
    pointer-events: none; /* FIX: scaled logo was intercepting clicks on panels */
}

.top-right-branding:hover {
    transform: scale(1.05);
}

.header-logo {
    height: 100%;
    width: 100%;
    object-fit: contain;
    transform: scale(3.5); /* Zoom in to bypass internal padding */
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none; /* FIX: prevent scaled hit area from blocking panel buttons */
}

/* Hover effect removed */

/* ================================================
   9-DOT MENU OVERLAY STYLES
   ================================================ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.menu-container {
    position: relative;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    font-family: var(--global-font);
}

.close-menu-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.menu-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.menu-item:hover:not(.dummy) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.5);
}

.menu-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #00d4ff;
}

/* ================================================
   AUTH MODAL STYLES (Neural-Link Premium UI)
   ================================================ */
#auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#auth-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal {
    background: rgba(8, 12, 18, 0.85); /* Premium Deep Black Glass */
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 30px rgba(0, 212, 255, 0.1),
                inset 0 0 20px rgba(0, 212, 255, 0.05);
    border-radius: 24px;
    width: 420px;
    max-width: 90%;
    padding: 35px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Outfit', sans-serif;
    color: white;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

#auth-modal-overlay.active .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.auth-close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    color: white;
    transform: rotate(90deg);
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
}

.auth-tab.active {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form.hidden {
    display: none;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.form-group input:focus {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(0, 212, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15), inset 0 2px 4px rgba(0,0,0,0.2);
}

.auth-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, #0072ff 0%, #00d4ff 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(0, 114, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.auth-divider {
    text-align: center;
    margin: 25px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    text-transform: uppercase;
}

.auth-divider span {
    background: rgba(8, 12, 18, 1);
    padding: 0 15px;
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}


/* Responsive Media Queries for Shared Elements */
@media (max-width: 768px) {
    .menu-container { 
        padding: 1.5rem 1rem; 
        max-width: 92%; 
        width: 92%;
        border-radius: 20px;
        overflow: hidden;
    }
    .menu-grid { 
        gap: 0.75rem; 
    }
    .menu-item {
        padding: 1.2rem 0.5rem;
        min-height: 100px;
    }
    .menu-item i {
        font-size: 1.5rem;
    }
    .menu-item span {
        font-size: 0.75rem;
    }
    .close-menu-btn {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2rem;
    }
}
