/* Shared Vibrant Theme Styles */
* {
    font-family: 'Cairo', sans-serif;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-radius: 10px;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; }

.brand-text {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes heart-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.liked i { animation: heart-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

:root {
    --deep-slate: #020617;
    --c-purple: #a855f7;
    --c-indigo: #6366f1;
    --c-pink: #ec4899;
    --c-orange: #f97316;
}

/* Premium Mobile Nav Transformation */
.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.25rem;
    border-radius: 1.25rem;
    color: #94a3b8;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    gap: 1.25rem;
    text-decoration: none;
    width: 100%;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.mobile-nav-link i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.mobile-nav-link span {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(-8px);
}

.mobile-nav-link:hover i {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.1) rotate(-5deg);
}

.mobile-nav-link:active {
    scale: 0.95;
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.05));
    color: #fff;
    border-color: rgba(139, 92, 246, 0.2);
    padding-right: 1.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.mobile-nav-link.active i {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.4);
}

.mobile-nav-section-title {
    padding: 1.75rem 1.25rem 0.75rem;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.05), transparent);
}

@keyframes nav-item-slide {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.mobile-nav-item-anim {
    opacity: 0;
    animation: nav-item-slide 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Default Dark Mode (Gradient) */
body,
.gradient-bg {
    background-color: var(--deep-slate);
    background-image:
        radial-gradient(at 0% 0%, hsla(271, 91%, 65%, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(242, 91%, 65%, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, hsla(330, 81%, 60%, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(24, 91%, 60%, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    color: #fff;
}

/* Light Mode Override */
html.light body {
    background: #f8fafc !important;
    color: #1e293b !important;
    background-image: none !important;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html.light .glass-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Floating Shapes (Hidden in light mode) */
.shape {
    position: fixed;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    z-index: -1;
    animation: shape-float 15s infinite alternate ease-in-out;
    pointer-events: none;
}

html.light .shape {
    display: none;
}

.shape-purple {
    width: 500px;
    height: 500px;
    background: var(--c-purple);
    top: -10%;
    left: -10%;
}

.shape-indigo {
    width: 450px;
    height: 450px;
    background: var(--c-indigo);
    bottom: -5%;
    right: 10%;
    animation-delay: -3s;
}

.shape-pink {
    width: 400px;
    height: 400px;
    background: var(--c-pink);
    top: 20%;
    right: -5%;
    animation-delay: -6s;
}

.shape-orange {
    width: 350px;
    height: 350px;
    background: var(--c-orange);
    bottom: 10%;
    left: 5%;
    animation-delay: -9s;
}

@keyframes shape-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .shape {
        animation: none !important;
        display: none !important;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    color: #94a3b8;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 0.6rem;
    white-space: nowrap;
    position: relative;
    font-weight: 700;
    font-size: 0.9rem;
}

.nav-link i {
    font-size: 1.1rem;
    color: #64748b;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.nav-link:hover i {
    color: #fff;
    transform: scale(1.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(139, 92, 246, 0.1);
}

.nav-link.active i {
    color: var(--c-purple);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #8b5cf6, #06b6d4);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 10px;
    opacity: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 40%;
    opacity: 1;
}

/* Global Form & Dropdown Color Fixes */
select option {
    background-color: #1e293b;
    color: #ffffff;
}

html.light select option {
    background-color: #ffffff;
    color: #1e293b;
}

/* Standardize all inputs/selects in light mode to prevent "dark on dark" issues */
html.light input,
html.light select,
html.light textarea {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
    color: #94a3b8 !important;
}

/* Fix for elements using hardcoded dark backgrounds in light mode */
html.light .bg-slate-900,
html.light .bg-slate-800,
html.light .bg-white\/5,
html.light .card-radiant,
html.light .glass-card {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
}

/* Support for custom html-light utility if used */
html.light [class*="html-light:text-slate"] {
    color: #1e293b !important;
}

/* Ensure standard browser dropdown lists have enough contrast */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select:focus {
        color: #fff;
    }
    html.light select:focus {
        color: #1e293b;
    }
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 0.75rem;
    min-width: 220px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    z-index: 100;
    pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Bridge to prevent closing when moving mouse from toggle to menu */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: 90;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-right: 1.25rem;
}

@media (min-width: 1440px) {
    .nav-link {
        flex-direction: row;
        gap: 8px;
        padding: 0.5rem 1rem;
    }

    .nav-link span {
        font-size: 13px;
    }
}
/* Light Mode Overrides for Mobile Nav */
html.light #mobileNav {
    background: rgba(255, 255, 255, 0.9) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.1);
}

html.light .mobile-nav-link {
    color: #475569;
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

html.light .mobile-nav-link i {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
    color: #64748b;
}

html.light .mobile-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

html.light .mobile-nav-link.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.05));
    color: var(--c-purple);
    border-color: rgba(139, 92, 246, 0.1);
}

html.light .mobile-nav-section-title {
    color: #cbd5e1;
}

html.light #mobileAuthContainer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.05);
}

html.light .mobile-nav-link.active i {
    box-shadow: 0 8px 15px rgba(139, 92, 246, 0.2);
}
