/* Futuristic Auction Platform - Next-Gen Design System */
:root {
    /* Neon Color Palette */
    --neon-purple: #a855f7;
    --neon-cyan: #06b6d4;
    --neon-blue: #3b82f6;
    --electric-blue: #60a5fa;
    --neon-pink: #ec4899;
    --neon-green: #10b981;

    /* Dark Mode Base (Default) */
    --bg-primary: #0a0118;
    --bg-secondary: #1a0b2e;
    --bg-tertiary: #16213e;
    --bg-nav: rgba(10, 1, 24, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    /* Brightened from Slate-400 (#94a3b8) to Slate-300 */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --bg-auth-right: #0a0118;
    --bg-auth-form: rgba(10, 1, 24, 0.7);

    /* Glow Effects */
    --glow-purple: 0 0 20px rgba(168, 85, 247, 0.5), 0 0 40px rgba(168, 85, 247, 0.3);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.5), 0 0 40px rgba(6, 182, 212, 0.3);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(59, 130, 246, 0.3);
}

/* Light Mode Variables */
body.light-mode {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-nav: rgba(255, 255, 255, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    /* Darkened from #475569 to #334155 (Slate-800) for better contrast on light backgrounds */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --bg-auth-right: #f8fafc;
    --bg-auth-form: rgba(255, 255, 255, 0.8);

    /* Adjusted Neons for Light Mode */
    --neon-purple: #7c3aed;
    --neon-cyan: #0891b2;
    --neon-blue: #2563eb;

    color: var(--text-primary);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #f0fdf4 100%) !important;
}

/* Default Dark Mode Background */
body {
    background: linear-gradient(135deg, #0a0118 0%, #1a0b2e 50%, #0a0118 100%);
    min-height: 100vh;
}

html,
body {
    overflow-x: hidden;
}

/* Light Mode Text Overrides */
/* Keep text white on dark-themed components and explicitly forced elements */
body.light-mode .text-white:not([class*="bg-indigo"]):not([class*="bg-purple"]):not([class*="bg-emerald"]):not([class*="bg-red"]):not([class*="bg-amber"]):not([class*="bg-cyan"]):not([class*="bg-slate-900"]):not([class*="bg-slate-950"]):not(.no-light-override):not(.force-white):not(.neon-button):not(.nav-link-active) {
    color: var(--text-primary);
}

/* Specific fix for text on dark backgrounds in light mode */
body.light-mode .bg-black\/50.bg-black\/50.bg-black\/50 .text-white,
body.light-mode .bg-black\/60.bg-black\/60.bg-black\/60 .text-white,
body.light-mode .dark-overlay.dark-overlay.dark-overlay .text-white,
body.light-mode .dark-overlay.dark-overlay.dark-overlay h1,
body.light-mode .dark-overlay.dark-overlay.dark-overlay h2,
body.light-mode .dark-overlay.dark-overlay.dark-overlay h3,
body.light-mode .dark-overlay.dark-overlay.dark-overlay h4,
body.light-mode .dark-overlay.dark-overlay.dark-overlay p {
    color: white !important;
}

body.light-mode .bg-black\/50.bg-black\/50.bg-black\/50 .text-slate-400,
body.light-mode .bg-black\/60.bg-black\/60.bg-black\/60 .text-slate-400,
body.light-mode .bg-black\/50.bg-black\/50.bg-black\/50 .text-slate-500,
body.light-mode .bg-black\/60.bg-black\/60.bg-black\/60 .text-slate-500,
body.light-mode .dark-overlay.dark-overlay.dark-overlay .text-slate-400,
body.light-mode .dark-overlay.dark-overlay.dark-overlay .text-slate-500 {
    color: #cbd5e1 !important;
}

body.light-mode .force-light {
    color: #f8fafc !important;
}

.no-light-override {
    color: inherit !important;
}

body.light-mode .from-slate-400 {
    --tw-gradient-from: #475569 !important;
}

body.light-mode .to-slate-200 {
    --tw-gradient-to: #1e293b !important;
}

body.light-mode .from-white {
    --tw-gradient-from: var(--text-primary) !important;
}

body.light-mode .to-slate-400 {
    --tw-gradient-to: var(--text-secondary) !important;
}

body.light-mode .to-amber-100 {
    --tw-gradient-to: #b45309 !important; /* Darker amber for light mode */
}

/* Global Contrast Overrides for dim utility classes */
.text-slate-400,
.text-gray-400 {
    color: #cbd5e1 !important;
    /* Forces a brighter Slate-300 vs default Slate-400 */
}

.text-slate-500,
.text-gray-500 {
    color: #94a3b8 !important;
    /* Forces Slate-400 vs default Slate-500 */
}

/* Light Mode Overrides for utility classes */
body.light-mode .text-slate-400:not(.force-white),
body.light-mode .text-gray-400:not(.force-white),
body.light-mode .text-slate-500:not(.force-white),
body.light-mode .text-gray-500:not(.force-white) {
    color: var(--text-secondary) !important;
}

body.light-mode .text-indigo-400:not(.force-white):not([class*="bg-"]),
body.light-mode .text-indigo-300:not(.force-white):not([class*="bg-"]) { color: #4f46e5 !important; }

body.light-mode .text-emerald-400:not(.force-white):not([class*="bg-"]),
body.light-mode .text-emerald-300:not(.force-white):not([class*="bg-"]) { color: #059669 !important; }

body.light-mode .text-cyan-400:not(.force-white):not([class*="bg-"]),
body.light-mode .text-cyan-300:not(.force-white):not([class*="bg-"]) { color: #0891b2 !important; }

body.light-mode .text-purple-400:not(.force-white):not([class*="bg-"]),
body.light-mode .text-purple-300:not(.force-white):not([class*="bg-"]) { color: #9333ea !important; }

body.light-mode .text-amber-400:not(.force-white):not([class*="bg-"]),
body.light-mode .text-amber-300:not(.force-white):not([class*="bg-"]) { color: #d97706 !important; }

body.light-mode .text-pink-400:not(.force-white):not([class*="bg-"]),
body.light-mode .text-pink-300:not(.force-white):not([class*="bg-"]) { color: #db2777 !important; }

body.light-mode .text-slate-300:not(.force-white),
body.light-mode .text-gray-300:not(.force-white) {
    color: #334155 !important;
}

body.light-mode .text-slate-200:not(.force-white),
body.light-mode .text-gray-200:not(.force-white) {
    color: #1e293b !important;
}

body.light-mode .text-slate-100:not(.force-white),
body.light-mode .text-gray-100:not(.force-white) {
    color: #0f172a !important;
}

/* Light Mode Glass Components */
body.light-mode .glass:not(.no-light-override) {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

body.light-mode .glass:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.light-mode .glass-v2 {
    background: var(--bg-auth-form) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1) !important;
}

/* Light Mode Background Overrides */
body.light-mode .bg-slate-900,
body.light-mode .bg-slate-950 {
    background-color: #f1f5f9;
}

body.light-mode .bg-slate-800 {
    background-color: #e2e8f0;
}

body.light-mode .bg-slate-800\/50,
body.light-mode .bg-slate-900\/20,
body.light-mode .bg-slate-900\/30,
body.light-mode .bg-slate-900\/40,
body.light-mode .bg-slate-900\/50,
body.light-mode .bg-slate-950\/40,
body.light-mode .bg-slate-950\/50,
body.light-mode .bg-slate-950\/95 {
    background-color: rgba(241, 245, 249, 0.8) !important;
}

body.light-mode .hover\:bg-slate-800:hover {
    background-color: #f1f5f9 !important;
}

body.light-mode .hover\:bg-slate-900:hover {
    background-color: #e2e8f0 !important;
}

/* Light Mode Border Overrides */
body.light-mode .border-slate-800,
body.light-mode .border-slate-900 {
    border-color: #e2e8f0;
}

body.light-mode .border-white\/5,
body.light-mode .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.08);
}

/* Light Mode Form Inputs */
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: var(--text-primary);
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: #64748b;
    /* Darker placeholder for light mode */
}

/* Global Placeholder Contrast */
input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
}

/* Light Mode Dropdown Menus */
body.light-mode .bg-slate-900.border.border-slate-800 {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Light Mode Mobile Menu */
body.light-mode .bg-slate-950\/95 {
    background-color: rgba(248, 250, 252, 0.98);
}

/* Light Mode Cyber Grid Background */
body.light-mode .cyber-grid {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
}

/* Light Mode Footer */
body.light-mode footer {
    background-color: rgba(241, 245, 249, 0.8);
    border-color: #e2e8f0;
}

/* Light Mode Dashboard Sidebar */
body.light-mode .sidebar-link {
    color: var(--text-secondary);
}

body.light-mode .sidebar-link:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

/* Ensure accent colors remain visible */
body.light-mode .text-indigo-400 {
    color: #4f46e5;
}

body.light-mode .text-purple-400 {
    color: #9333ea;
}

body.light-mode .text-cyan-400 {
    color: #0891b2;
}

body.light-mode .text-emerald-400 {
    color: #059669;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .ml-auto {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .mr-auto {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .translate-x-1\/2 {
    transform: translateX(-50%);
}

[dir="rtl"] .translate-x-full {
    transform: translateX(-100%);
}

[dir="rtl"] .-translate-x-full {
    transform: translateX(100%);
}

[dir="rtl"] .left-0 {
    left: auto;
    right: 0;
}

[dir="rtl"] .right-0 {
    right: auto;
    left: 0;
}

/* Hero Section RTL Fix */
[dir="rtl"] #tilted-hero-grid {
    left: auto !important;
    right: 50% !important;
    transform: translate(25%, -50%) rotate(12deg) !important;
}

[dir="rtl"] .hero-text-container {
    padding-right: 0;
    padding-left: 2rem;
}

/* Lucide Icon RTL Flip */
[dir="rtl"] .lucide-chevron-right,
[dir="rtl"] .lucide-arrow-right {
    transform: rotate(180deg);
}

[dir="rtl"] .lucide-chevron-left,
[dir="rtl"] .lucide-arrow-left {
    transform: rotate(180deg);
}

/* Dashboard Sidebar RTL */
[dir="rtl"] aside.fixed.left-0 {
    left: auto !important;
    right: 0 !important;
    border-right-width: 0 !important;
    border-left-width: 1px !important;
}

@media (min-width: 768px) {
    [dir="rtl"] .md\:ml-64 {
        margin-left: 0 !important;
        margin-right: 16rem !important;
    }
}

@media (min-width: 1024px) {
    [dir="rtl"] .lg\:ml-72 {
        margin-left: 0 !important;
        margin-right: 18rem !important;
    }
}

/* Mobile Menu RTL */
[dir="rtl"] #mobile-menu {
    right: auto !important;
    left: 0 !important;
    border-left-width: 0 !important;
    border-right-width: 1px !important;
}

/* Decorative Elements RTL */
[dir="rtl"] .absolute.top-0.right-0.-skew-x-12 {
    right: auto !important;
    left: 0 !important;
    transform: skewX(12deg) translateX(-50%) !important;
}

/* Padding/Margin Utility RTL */
[dir="rtl"] .pl-6 {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .pr-6 {
    padding-right: 0;
    padding-left: 1.5rem;
}

[dir="rtl"] .pl-8 {
    padding-left: 0;
    padding-right: 2rem;
}

[dir="rtl"] .pr-8 {
    padding-right: 0;
    padding-left: 2rem;
}

[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Smooth Scrolling */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Holographic Text Effect */
.text-gradient {
    color: #a855f7; /* High-contrast fallback for clipped text */
    background: linear-gradient(135deg, #a855f7 0%, #06b6d4 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: holographic-shift 3s ease infinite;
}

@keyframes holographic-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.text-purple-pink-gradient {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: holographic-shift 3s ease infinite;
}

/* Neon Gradient Backgrounds */
.bg-luxury-gradient {
    background:
        radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1), transparent 70%);
}

/* Enhanced Glassmorphism with Glow */
.glass {
    background: rgba(26, 11, 46, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

nav.glass {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    overflow: visible !important;
    border-radius: 20px;
    margin-top: 12px;
    margin-bottom: 12px;
    width: calc(100% - 32px);
    z-index: 110 !important;
    /* Above mobile menu */
}

.nav-link-active {
    color: var(--neon-blue) !important;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-blue);
    box-shadow: var(--glow-blue);
    border-radius: 99px;
    animation: nav-glow 2s ease-in-out infinite alternate;
}

@keyframes nav-glow {
    from {
        box-shadow: 0 0 5px var(--neon-blue);
        opacity: 0.8;
    }
    to {
        box-shadow: 0 0 15px var(--neon-blue), 0 0 25px var(--neon-blue);
        opacity: 1;
    }
}

/* Glassmorphism 2.0 - More depth, refined edges */
.glass-v2 {
    background: rgba(10, 1, 24, 0.7);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 80px rgba(168, 85, 247, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-v2:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.6),
        inset 0 0 100px rgba(168, 85, 247, 0.1);
}

/* Layout Compensation for Fixed Navbar */
body {
    padding-top: 100px;
}

/* Adjust Dashboard Sidebar to clear fixed nav */
@media (min-width: 768px) {
    #dashboard-sidebar {
        top: 100px !important;
        height: calc(100vh - 100px) !important;
    }
}

/* Premium Animated Hamburger */
.hamburger-line {
    transform-origin: center;
}

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
    body {
        padding-top: 80px;
    }

    nav.glass {
        margin: 8px 12px;
        height: 60px !important;
        overflow: hidden !important;
    }
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.glass:hover::before {
    left: 100%;
}

.glass:hover {
    background: rgba(26, 11, 46, 0.6);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow:
        0 0 30px rgba(168, 85, 247, 0.3),
        0 0 60px rgba(6, 182, 212, 0.2),
        0 20px 40px -20px rgba(0, 0, 0, 0.5);
    transform: translateY(-8px) scale(1.02);
}

.no-hover-transform {
    transform: none !important;
}

.no-hover-transform:hover {
    transform: none !important;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-10px) rotate(1deg);
    }

    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.float-card {
    animation: float 6s ease-in-out infinite;
}

.float-card:nth-child(2) {
    animation-delay: 0.5s;
}

.float-card:nth-child(3) {
    animation-delay: 1s;
}

/* Neon Border Glow */
.neon-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
        linear-gradient(135deg, var(--neon-purple), var(--neon-cyan), var(--neon-blue)) border-box;
}

.neon-border::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan), var(--neon-blue));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.neon-border:hover::after {
    opacity: 1;
}

/* Holographic Card Effect */
.holographic {
    position: relative;
    background: linear-gradient(135deg,
            rgba(168, 85, 247, 0.1) 0%,
            rgba(6, 182, 212, 0.1) 50%,
            rgba(59, 130, 246, 0.1) 100%);
    background-size: 200% 200%;
    animation: holographic-bg 5s ease infinite;
}

@keyframes holographic-bg {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.holographic::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    background-size: 200% 200%;
    animation: shimmer 3s linear infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Animated Bid Counter */
.bid-counter {
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.bid-counter::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
    box-shadow: var(--glow-cyan);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scaleX(0.8);
    }

    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Neon Button */
.neon-button {
    position: relative;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 0 20px rgba(168, 85, 247, 0.4),
        0 0 40px rgba(6, 182, 212, 0.2);
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.neon-button:hover::before {
    width: 300px;
    height: 300px;
}

.neon-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 30px rgba(168, 85, 247, 0.6),
        0 0 60px rgba(6, 182, 212, 0.4);
}

.neon-button:active {
    transform: translateY(0);
}

/* Hero & Section Entrance Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUpFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.animate-fade-in {
    animation: fadeIn 0.7s ease forwards;
}

.animate-slide-up,
.animate-fade-in.animate-slide-up {
    animation: slideUpFadeIn 0.7s ease forwards;
}

/* Fade In on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Mobile Visibility Fail-safe */
@media (max-width: 768px) {
    .reveal,
    .reveal-child {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        transition: none !important;
    }
}

/* Staggered Reveals */
.reveal-child {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal-child.active {
    opacity: 1;
    transform: translateY(0);
}

/* Creations Grid Transitions */
.creative-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.creative-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(168, 85, 247, 0.2),
            rgba(6, 182, 212, 0.2));
    opacity: 0;
    transition: opacity 0.3s;
}

.creative-item:hover::before {
    opacity: 1;
}

.creative-item.active {
    flex-grow: 10;
}

@media (max-width: 1024px) {
    #creations-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .creative-item {
        width: 100% !important;
        height: 250px !important;
        flex-grow: 0 !important;
    }

    .creative-item div {
        opacity: 1 !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%) !important;
    }
}

/* Counter Style */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Glowing Text */
.glow-text {
    text-shadow:
        0 0 10px rgba(168, 85, 247, 0.8),
        0 0 20px rgba(168, 85, 247, 0.6),
        0 0 30px rgba(168, 85, 247, 0.4);
}

/* Particle Effect Background */
@keyframes particle-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(20px, -20px) scale(1.2);
        opacity: 0.6;
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, var(--neon-cyan), transparent);
    border-radius: 50%;
    animation: particle-float 8s ease-in-out infinite;
    pointer-events: none;
}

/* Category Card Hover Effect */
.category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 0 30px rgba(168, 85, 247, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive Optimizations */
@media (max-width: 768px) {
    #tilted-hero-grid {
        display: none;
        /* Hide complex grid on small mobile */
    }

    .glass {
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }

    .glass:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .neon-button {
        padding: 10px 24px;
    }

    /* Reduce navbar border radius on mobile */
    nav.glass {
        border-radius: 12px;
        margin: 8px 12px;
        width: calc(100% - 24px);
    }

    /* Ensure touch targets are minimum 44px */
    button,
    a.neon-button {
        min-height: 44px;
    }
}

/* Extra small screens (320px - 480px) */
@media (max-width: 480px) {

    /* Reduce padding for very small screens */
    .glass {
        padding: 1rem !important;
    }

    /* Stack buttons vertically */
    .flex.gap-5>button,
    .flex.gap-4>button {
        width: 100%;
    }

    /* Reduce animation intensity on mobile for performance */
    .holographic::before {
        animation: none;
    }

    .float-card {
        animation: none;
    }
}

/* Loading Shimmer Effect */
@keyframes loading-shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg,
            transparent,
            rgba(168, 85, 247, 0.2),
            transparent);
    background-size: 1000px 100%;
    animation: loading-shimmer 2s infinite;
}

/* Cyber Grid Background */
.cyber-grid {
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    position: relative;
}

.cyber-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 100%);
    pointer-events: none;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.5);
}

/* Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.2) transparent;
}

/* Custom Gold Gradient Animation */
.gradient-text {
    font-size: 24px;
    font-weight: 700;
    text-align: center;

    /* Gradient color */
    background: linear-gradient(90deg,
            #d4af37,
            #ffd700,
            #ffffff,
            #d4af37);

    background-size: 300% auto;

    /* Clip gradient inside text */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Animation */
    animation: shine 4s linear infinite, float-text 3s ease-in-out infinite;
}

/* Responsive gradient text sizes */
@media (min-width: 640px) {
    .gradient-text {
        font-size: 32px;
    }
}

@media (min-width: 1024px) {
    .gradient-text {
        font-size: 42px;
    }
}


/* Moving Gradient Animation */
@keyframes shine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 300% center;
    }
}

/* Floating Text Animation */
@keyframes float-text {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* Custom Purple Gradient Animation */
.gradient-text-purple {
    font-size: 24px;
    font-weight: 700;
    /* text-align: center; removed to allow inheritance or utility override */

    /* Gradient color */
    background: linear-gradient(90deg,
            #a855f7,
            #e9d5ff,
            #ffffff,
            #a855f7);

    background-size: 300% auto;

    /* Clip gradient inside text */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Animation */
    animation: shine 4s linear infinite, float-text 3s ease-in-out infinite;
}

@media (min-width: 640px) {
    .gradient-text-purple {
        font-size: 32px;
    }
}

@media (min-width: 1024px) {
    .gradient-text-purple {
        font-size: 42px;
    }
}

/* Custom Pink Gradient Animation */
.gradient-text-pink {
    font-size: 24px;
    font-weight: 700;
    /* text-align: center; removed to allow inheritance or utility override */

    /* Gradient color */
    background: linear-gradient(90deg,
            #ec4899,
            #fbcfe8,
            #ffffff,
            #ec4899);

    background-size: 300% auto;

    /* Clip gradient inside text */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Animation */
    animation: shine 4s linear infinite, float-text 3s ease-in-out infinite;
}

@media (min-width: 640px) {
    .gradient-text-pink {
        font-size: 32px;
    }
}

@media (min-width: 1024px) {
    .gradient-text-pink {
        font-size: 42px;
    }
}

/* Light Mode Specific Gradient Adjustments */
body.light-mode .gradient-text {
    background: linear-gradient(90deg, #b45309, #d97706, #b45309);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-mode .gradient-text-purple {
    background: linear-gradient(90deg, #7c3aed, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-mode .gradient-text-pink {
    background: linear-gradient(90deg, #db2777, #9d174d, #db2777);
    -webkit-background-clip: text;
    background-clip: text;
}

body.light-mode .text-gradient {
    background: linear-gradient(135deg, #4f46e5, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hard override for cinematic sections */
.force-white,
body.light-mode .force-white,
body.light-mode .hero-content .force-white {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}