/* =========================================
   COMMON STYLES - Shared across all pages
   ========================================= */

/* Performance Optimization: Disable transitions during theme switch */
.no-transition,
.no-transition * {
    transition: none !important;
    animation: none !important;
}

/* =========================================
   THEME VARIABLES
   ========================================= */
:root {
    /* Dark Theme (Default) */
    --color-bg-primary: #09090b;
    --color-bg-secondary: #18181b;
    --color-bg-tertiary: #27272a;
    --color-bg-elevated: #3f3f46;

    --color-text-primary: #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;

    --color-border: #000000;
    --color-border-hover: #000000;

    /* Brand colors: Yellow/Gold theme */
    --color-brand: #F5C518;
    --color-brand-light: #FFD700;

    --color-glass-bg: rgba(9, 9, 11, 0.7);
    --color-glass-border: #000000;

    --color-card-bg: rgba(24, 24, 27, 0.6);
    --color-overlay: rgba(0, 0, 0, 0.7);

    --scrollbar-track: #09090b;
    --scrollbar-thumb: #27272a;
    --scrollbar-thumb-hover: #3f3f46;

    /* Box shadows: Black theme */
    /* Neo-Brutalism: Hard shadows (no blur) */
    --shadow-sm: 2px 2px 0px 0px #000000;
    --shadow-md: 4px 4px 0px 0px #000000;
    --shadow-lg: 6px 6px 0px 0px #000000;
    --shadow-xl: 8px 8px 0px 0px #000000;
}

/* Light Theme */
html.light {
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f4f4f5;
    --color-bg-tertiary: #e4e4e7;
    --color-bg-elevated: #d4d4d8;

    --color-text-primary: #18181b;
    --color-text-secondary: #52525b;
    --color-text-muted: #71717a;

    --color-border: #000000;
    --color-border-hover: #000000;

    /* Brand colors: Yellow/Gold theme */
    --color-brand: #F5C518;
    --color-brand-light: #FFD700;

    --color-glass-bg: rgba(255, 255, 255, 0.8);
    --color-glass-border: #000000;

    --color-card-bg: #ffffff;
    --color-overlay: rgba(0, 0, 0, 0.5);

    --scrollbar-track: #f4f4f5;
    --scrollbar-thumb: #d4d4d8;
    --scrollbar-thumb-hover: #a1a1aa;

    /* Box shadows: Black theme */
    /* Neo-Brutalism: Hard shadows (no blur) */
    --shadow-sm: 2px 2px 0px 0px #000000;
    --shadow-md: 4px 4px 0px 0px #000000;
    --shadow-lg: 6px 6px 0px 0px #000000;
    --shadow-xl: 8px 8px 0px 0px #000000;
}

/* --- Glass Navigation --- NEO-BRUTALISM */
.glass-nav {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 3px solid #000000;
}

/* Nav text colors for light mode (neo-brutalism) */
.glass-nav .nav-logo-text {
    color: #18181b !important;
}

.glass-nav .nav-logo-text:hover {
    color: #52525b !important;
}

.glass-nav .nav-menu-item {
    color: #52525b !important;
}

.glass-nav .nav-menu-item:hover,
.glass-nav .nav-menu-item.active-page {
    color: #18181b !important;
}

.glass-nav .nav-donate-btn,
.glass-nav .nav-login-btn {
    color: #52525b !important;
}

.glass-nav .nav-donate-btn:hover,
.glass-nav .nav-login-btn:hover {
    color: #18181b !important;
}

.glass-nav .nav-mobile-btn {
    color: #52525b !important;
}

.glass-nav .nav-mobile-btn:hover {
    color: #18181b !important;
}

/* --- Global Reset & Typography --- */
body {
    font-family: 'Be Vietnam Pro', sans-serif;
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
    width: 100%;
    position: relative;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* --- Mobile Menu Drawer --- */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--color-bg-primary);
    border-right: 1px solid var(--color-border);
    transform: translateX(-100%);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease;
    z-index: 50;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu-drawer.open {
    transform: translateX(0);
}

/* Mobile Menu Buttons (menu + close) */
.nav-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-mobile-btn:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 2px solid #000000;
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
}

html.light .nav-mobile-btn:hover {
    background: #F5C518;
    color: #000000;
    border: 2px solid #000000;
    box-shadow: var(--shadow-sm);
    transform: translate(-1px, -1px);
}

/* Mobile Menu Items */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.15s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.mobile-nav-link i {
    width: 1.25rem;
    height: 1.25rem;
}

/* Mobile Nav Section (for grouped items like Tools) */
.mobile-nav-section {
    margin: 0.5rem 0;
}

.mobile-nav-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-nav-label i {
    width: 1rem;
    height: 1rem;
}

.mobile-nav-sublink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border-radius: 0.75rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.mobile-nav-sublink:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.mobile-nav-sublink i {
    width: 1rem;
    height: 1rem;
}


/* Neo-Brutalism Overrides for Mobile Menu (Light Mode) */
html.light .mobile-menu-drawer {
    background: #ffffff !important;
    border-right: 3px solid #000000 !important;
}

html.light .mobile-nav-link {
    color: #52525b;
    border: 2px solid transparent;
    /* Reserve space for border */
}

html.light .mobile-nav-link:hover,
html.light .mobile-nav-link.active {
    background: #F5C518 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    transform: translate(-2px, -2px);
}

html.light .mobile-nav-label {
    color: #52525b;
}

html.light .mobile-nav-sublink {
    color: #52525b;
}

html.light .mobile-nav-sublink:hover {
    background: #F5C518 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    box-shadow: 3px 3px 0px 0px #000000 !important;
    transform: translate(-1px, -1px);
}

/* =========================================
   RESPONSIVE HEADER @ 900px
   Override Tailwind md: breakpoint for nav
   ========================================= */
@media (max-width: 900px) {
    .nav-menu {
        display: none !important;
    }

    .nav-actions {
        display: none !important;
    }

    .nav-mobile-toggle {
        display: block !important;
    }
}

@media (min-width: 901px) {
    .nav-menu {
        display: flex !important;
    }

    .nav-actions {
        display: flex !important;
    }

    .nav-mobile-toggle {
        display: none !important;
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* --- Glass Effects --- */
.glass-nav {
    /* Neo-Brutalism: White background, black border bottom */
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 3px solid #000000;
    transition: background 0.15s ease, border-color 0.15s ease;
    z-index: 60;
    position: relative;
}

.glass-card {
    background: var(--color-card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.glass-sidebar {
    background: var(--color-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--color-border);
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* --- Grid Pattern Background --- */
.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* --- Ambient Background --- */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.ambient-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(120px);
}

.ambient-blob-1 {
    top: 0;
    left: 25%;
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.05);
}

.ambient-blob-2 {
    bottom: 0;
    right: 25%;
    width: 600px;
    height: 600px;
    background: rgba(59, 130, 246, 0.05);
}

/* --- Animation Classes --- */
.animate-blob {
    animation: blob 10s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* --- Toast Notifications --- */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 20rem;
    padding: 1rem;
    gap: 1rem;
    background: #27272a;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(5rem);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
    border-radius: 0.5rem;
}

/* --- Quick Toast (Center Bottom) --- */
.quick-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 10px 30px -5px rgba(34, 197, 94, 0.4);
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* --- Range Slider Styling --- */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    width: 100%;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 16px;
    width: 16px;
    /* Neo-Brutalism: Boxy thumb */
    border-radius: 2px;
    background: var(--color-brand);
    border: 2px solid #000000;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 2px 2px 0px 0px #000000;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #000000;
    border-radius: 0;
}

input[type=range]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 2px;
    background: var(--color-brand);
    border: 2px solid #000000;
    cursor: pointer;
    box-shadow: 2px 2px 0px 0px #000000;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #000000;
    border-radius: 0;
}

/* Light Theme Slider Styling */
html.light input[type=range]::-webkit-slider-thumb {
    background: #4f46e5;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

html.light input[type=range]::-webkit-slider-runnable-track {
    background: #d4d4d8;
}

html.light input[type=range]::-moz-range-thumb {
    background: #4f46e5;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

html.light input[type=range]::-moz-range-track {
    background: #d4d4d8;
}

/* --- Custom Scrollbar for Elements --- */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #ffffff;
    border-left: 2px solid #000000;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid #000000;
    border-radius: 0;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-brand);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* --- Active Navigation Item --- */
.nav-menu-item.active-page {
    color: white !important;
    font-weight: 600;
}

/* --- Tools Dropdown Neo-Brutalism Hover --- */
/* Tools dropdown menu items */
.relative.group .absolute a[href*="kit_builder"],
.relative.group .absolute a[href*="svg_viewer"] {
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.relative.group .absolute a[href*="kit_builder"]:hover,
.relative.group .absolute a[href*="svg_viewer"]:hover {
    border: 2px solid #000000 !important;
    box-shadow: 3px 3px 0px 0px #000000 !important;
    transform: translate(-1px, -1px);
}

/* Light mode Tools dropdown */
html.light .relative.group .absolute a[href*="kit_builder"],
html.light .relative.group .absolute a[href*="svg_viewer"] {
    border: 2px solid transparent;
}

html.light .relative.group .absolute a[href*="kit_builder"]:hover,
html.light .relative.group .absolute a[href*="svg_viewer"]:hover {
    background: #F5C518 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    box-shadow: 3px 3px 0px 0px #000000 !important;
    transform: translate(-1px, -1px);
}

/* --- Fast Copy Notification --- */
.fast-copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: rgba(34, 197, 94, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.fast-copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.fast-copy-notification i {
    font-size: 1.25rem;
    background: transparent !important;
    box-shadow: none !important;
}

/* =========================================
   LIGHT THEME OVERRIDES (GLOBAL)
   ========================================= */

/* Body & Background */
html.light body {
    background-color: #ffffff !important;
    color: #18181b !important;
}

html.light .bg-zinc-950 {
    background-color: #ffffff !important;
}

html.light .bg-zinc-900 {
    background-color: #f4f4f5 !important;
}

html.light .bg-zinc-800 {
    background-color: #f8f8f8 !important;
}

/* Text Colors */
html.light .text-zinc-200,
html.light .text-white {
    color: #18181b !important;
}

html.light .text-zinc-300 {
    color: #3f3f46 !important;
}

html.light .text-zinc-400 {
    color: #52525b !important;
}

html.light .text-zinc-500 {
    color: #71717a !important;
}

html.light .text-zinc-600 {
    color: #52525b !important;
}

/* Borders */
html.light .border-zinc-800,
html.light .border-zinc-700 {
    border-color: #e4e4e7 !important;
}

html.light .border-white\/5,
html.light .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Navigation - NEO-BRUTALISM */
html.light .glass-nav {
    background: #ffffff !important;
    border-bottom: 3px solid #000000 !important;
}

html.light .nav-logo-text {
    color: #000000 !important;
    font-weight: 800 !important;
    text-shadow: 1px 1px 0px #e4e4e7;
}

html.light .nav-menu-item {
    color: #000000 !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
}

html.light .nav-menu-item:hover {
    background: #F5C518 !important;
    color: #000000 !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
    transform: translate(-1px, -1px) !important;
}

html.light .nav-menu-item.active-page,
html.light .nav-menu-active {
    background: #6366f1 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

/* Nav Buttons - NEO-BRUTALISM */
html.light .nav-login-btn {
    color: #000000 !important;
    font-weight: 600 !important;
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

html.light .nav-login-btn:hover {
    background: #F5C518 !important;
    color: #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    transform: translate(-2px, -2px) !important;
}

html.light .nav-signup-btn {
    background: #6366f1 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
    font-weight: 700 !important;
    box-shadow: 3px 3px 0px 0px #000000 !important;
}

html.light .nav-signup-btn:hover {
    background: #818cf8 !important;
    transform: translate(-2px, -2px) !important;
    box-shadow: 5px 5px 0px 0px #000000 !important;
}

/* Ensure Nav Colors are correct */
html.light .nav-menu-item.active-page,
html.light .nav-menu-active {
    background: #6366f1 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

html.light .nav-logout-btn {
    color: #000000 !important;
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

html.light .nav-logout-btn:hover {
    background: #F5C518 !important;
    color: #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    transform: translate(-2px, -2px) !important;
}

html.light .nav-donate-btn {
    color: #000000 !important;
    font-weight: 600 !important;
    padding: 0.5rem 1rem !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

html.light .nav-donate-btn:hover {
    background: #F5C518 !important;
    color: #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    transform: translate(-2px, -2px) !important;
}

html.light .nav-github-btn {
    background: #000000 !important;
    color: white !important;
    border: 2px solid #000000 !important;
}

/* Common Components */
html.light .hero-badge {
    background: #f4f4f5 !important;
    border-color: #e4e4e7 !important;
    color: #52525b !important;
}

/* Search Container - NEO-BRUTALISM */
html.light .search-container {
    background: #ffffff !important;
    border-radius: 8px !important;
}

html.light .search-container:focus-within {
    background: #ffffff !important;
    border-color: var(--color-brand) !important;
    box-shadow: 3px 3px 0px 0px #000000 !important;
}

html.light .search-input {
    color: #18181b !important;
}

html.light .search-input::placeholder {
    color: #a1a1aa !important;
}

html.light .search-shortcut kbd {
    background: #e4e4e7 !important;
    border-color: #d4d4d8 !important;
    color: #52525b !important;
}

html.light #search-results {
    background: #ffffff !important;
    border-color: #e4e4e7 !important;
}

/* Collection Cards */
html.light .collection-card {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    border-radius: 8px !important;
}

html.light .collection-card:hover {
    box-shadow: 8px 8px 0px 0px #000000 !important;
    border-color: #000000 !important;
    transform: translate(-2px, -2px);
}

html.light .collection-card-title {
    color: #18181b !important;
    text-shadow: none !important;
}

html.light .icons-container {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03) !important;
}

html.light .icons-container i {
    color: #475569 !important;
}

html.light .collection-card:hover .icons-container i {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* Trending Icons & Cards - NEO-BRUTALISM (match icon-card style) */
html.light .trending-icon-card {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: 0px 0px 0px 0px #000000 !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.1s ease !important;
}

html.light .trending-icon-card:hover {
    background: #F5C518 !important;
    border-color: #000000 !important;
    box-shadow: 6px 6px 0px 0px #000000 !important;
    transform: translate(-3px, -3px) !important;
}

html.light .trending-icon-card i:not([data-lucide]) {
    color: #374151 !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
}

html.light .trending-icon-card:hover i:not([data-lucide]) {
    color: #000000 !important;
    transform: scale(1.1) !important;
}

html.light .trending-icon-name {
    color: #71717a !important;
    background: transparent !important;
    border-top: none !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
}

html.light .trending-icon-card:hover .trending-icon-name {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Modal */
/* Modal */
html.light .modal-overlay {
    background: rgba(255, 255, 255, 0.8) !important;
}

html.light .modal-content {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    box-shadow: 0px 12px 0px 5px #000000 !important;
    border-radius: 12px !important;
}

html.light .modal-close-btn {
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 6px !important;
}

html.light .modal-close-btn:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
}

html.light .modal-icon-preview {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
}

html.light .modal-icon-preview.dark-mode {
    background: #1e293b !important;
    border: 2px solid #000000 !important;
}

html.light .modal-icon-name {
    color: #000000 !important;
    font-weight: 700 !important;
}

html.light .modal-icon-subtitle {
    color: #3f3f46 !important;
}

html.light .modal-actions {
    background: #ffffff !important;
    border-top: 2px solid #000000 !important;
}

html.light .modal-action-btn {
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    box-shadow: 2px 2px 0px 0px #000000 !important;
    margin-right: 0.5rem;
}

html.light .modal-action-btn:hover {
    background: var(--color-brand) !important;
    color: #000000 !important;
    box-shadow: 4px 4px 0px 0px #000000 !important;
    transform: translate(-2px, -2px);
}

html.light .modal-code-container {
    background: #1e293b !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
}

html.light .modal-icon-details {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 8px !important;
}

html.light .modal-icon-license {
    color: #52525b !important;
}

/* Footer - NEO-BRUTALISM */
html.light .site-footer {
    background: #ffffff !important;
    border-top: 2px solid #000000 !important;
}

html.light .footer-logo-text {
    color: #000000 !important;
    font-weight: 700 !important;
}

html.light .footer-tagline {
    color: #000000 !important;
}

html.light .footer-links-title {
    color: #000000 !important;
    font-weight: 700 !important;
}

html.light .footer-link {
    color: #000000 !important;
}

html.light .footer-link:hover {
    color: var(--color-brand) !important;
    text-decoration: underline !important;
}

html.light .footer-copyright {
    color: #000000 !important;
}

/* Grid Pattern - Visible in light mode with subtle gray lines */
html.light .grid-pattern {
    opacity: 0.5 !important;
    background-image: linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px) !important;
}

/* Ambient Blobs - Subtle in light mode */
html.light .ambient-blob-1,
html.light .ambient-blob-2 {
    opacity: 0.3 !important;
}

/* Scrollbar */
html.light ::-webkit-scrollbar-track {
    background: #f4f4f5 !important;
}

html.light ::-webkit-scrollbar-thumb {
    background: #d4d4d8 !important;
}

html.light ::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa !important;
}

/* =========================================
   LOW SPEC MODE + LIGHT THEME
   ========================================= */
html.light.low-spec-mode body,
html.light.low-spec-mode .bg-zinc-950,
html.light.low-spec-mode .glass-nav,
html.light.low-spec-mode .glass-card,
html.light.low-spec-mode .collection-card,
html.light.low-spec-mode .sidebar-tab.active {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.light.low-spec-mode .bg-zinc-900,
html.light.low-spec-mode .bg-zinc-800,
html.light.low-spec-mode .hero-badge,
html.light.low-spec-mode .search-container,
html.light.low-spec-mode .trending-icon-card,
html.light.low-spec-mode .dx-badge,
html.light.low-spec-mode .modal-actions,
html.light.low-spec-mode .editor-header,
html.light.low-spec-mode .editor-sidebar-wrapper,
html.light.low-spec-mode .btn-tool,
html.light.low-spec-mode .editor-footer {
    background: #f4f4f5 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.light.low-spec-mode .icons-container {
    background: #f1f5f9 !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

html.light.low-spec-mode .grid-pattern,
html.light.low-spec-mode .ambient-bg {
    display: none !important;
}

/* =========================================
   LIGHT THEME REFINEMENTS
   ========================================= */

/* Collection Page & Icons Page - Card Styling - NEO-BRUTALISM */
html.light .icon-card {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

html.light .icon-card:hover {
    background: var(--color-brand) !important;
    border: 3px solid #000000 !important;
    box-shadow: 6px 6px 0px 0px #000000 !important;
    transform: translate(-3px, -3px) !important;
}

/* Icon Colors in Cards (Collection & Icons Page) */
html.light .icon-card i:not([data-lucide]) {
    color: #374151 !important;
    /* Dark gray icons */
}

html.light .icon-card:hover i:not([data-lucide]) {
    color: #000000 !important;
    /* Black on hover */
}

html.light .icon-card .icon-name {
    color: #374151 !important;
}

html.light .icon-card:hover .icon-name {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Control Island (Collection Page) */
html.light .glass-island {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(228, 228, 231, 0.5) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1) !important;
}

html.light .control-search-input {
    background: rgba(244, 244, 245, 0.7) !important;
    color: #18181b !important;
    border: 1px solid rgb(221, 221, 221) !important;
}

html.light .control-search-input:focus {
    background: #ffffff !important;
    border-color: #6366f1 !important;
}

html.light .control-search-input::placeholder {
    color: #a1a1aa !important;
}

html.light .control-search-icon {
    color: #71717a !important;
}

html.light .btn-download-zip,
html.light .btn-copy-cdn,
html.light #btn-share-collection {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #52525b !important;
    border: 1px solid rgba(228, 228, 231, 0.8) !important;
}

html.light .btn-download-zip:hover,
html.light .btn-copy-cdn:hover,
html.light #btn-share-collection:hover {
    background: #f4f4f5 !important;
    color: #18181b !important;
}

html.light .control-view-icon {
    color: #71717a !important;
}

html.light .control-view-slider {
    background: #e4e4e7 !important;
}

/* Pagination Buttons (Covers both .pagination-btn and .page-number) - NEO-BRUTALISM */
html.light .pagination-btn,
html.light .page-number {
    background: #ffffff !important;
    border: 2px solid #000000 !important;
    border-radius: 6px !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

html.light .pagination-btn:hover:not(:disabled),
html.light .page-number:hover,
html.light .page-number.active {
    background: var(--color-brand) !important;
    color: #000000 !important;
    border-color: #000000 !important;
    box-shadow: 3px 3px 0px 0px #000000 !important;
    transform: translate(-1px, -1px) !important;
}

html.light .pagination-btn:disabled {
    background: #f4f4f5 !important;
    color: #a1a1aa !important;
    opacity: 0.5 !important;
}

/* Buttons in Cards - Transparent Background */
html.light .icon-action-btn,
html.light .trending-icon-card .add-btn,
html.light .vote-btn {
    background: transparent !important;
    border-color: transparent !important;
    color: #71717a !important;
    box-shadow: none !important;
}

html.light .icon-action-btn:hover,
html.light .trending-icon-card .add-btn:hover,
html.light .vote-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #18181b !important;
}

html.light .icon-action-btn i,
html.light .icon-action-btn svg,
html.light .trending-icon-card .add-btn i,
html.light .trending-icon-card .add-btn svg,
html.light .vote-btn i,
html.light .vote-btn svg {
    color: inherit !important;
}

html.light .icon-action-btn.vote-btn.voted {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

html.light .icon-action-btn.add-btn.added,
html.light .trending-icon-card .add-btn.added {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.1) !important;
}

/* Collections Page - Collection Hero Icon */
html.light .collection-icon-wrapper {
    background: #ffffff !important;
    border: 1px solid #e4e4e7 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

html.light .collection-icon-wrapper svg {
    fill: #18181b !important;
}

/* Github Nav Button - Force White Background in Light Mode */
html.light .nav-github-btn {
    background: #ffffff !important;
    color: #18181b !important;
    border: 1px solid #e4e4e7 !important;
}

html.light .nav-github-btn:hover {
    background: #f4f4f5 !important;
    border-color: #d4d4d8 !important;
}

html.light .nav-github-btn .bg-black\/10 {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #18181b !important;
}

/* Trending Icons - Red Vote Buttons & Count */
html.light .vote-btn {
    color: #ef4444 !important;
    /* Red by default as requested */
}

html.light .vote-btn:hover {
    color: #dc2626 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

html.light .vote-count {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Ensure vote icon stroke is current color */
html.light .vote-btn i,
html.light .vote-count i {
    stroke: currentColor !important;
}

/* Font Builder Badge - Fixed White Color */
.font-builder-badge {
    color: white !important;
}

html.light .font-builder-badge {
    color: white !important;
}

/* Login & Sign Up Buttons */
.nav-login-btn {
    color: #a1a1aa !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s !important;
}

.nav-login-btn:hover {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.nav-signup-btn {
    background: #6366f1 !important;
    color: white !important;
}

.nav-signup-btn:hover {
    background: #818cf8 !important;
}

/* Light Theme - Login & Sign Up Buttons */
html.light .nav-login-btn {
    color: #52525b !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html.light .nav-login-btn:hover {
    color: #18181b !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    background: rgba(0, 0, 0, 0.03) !important;
}

html.light .nav-signup-btn {
    background: #6366f1 !important;
    color: white !important;
}

html.light .nav-signup-btn:hover {
    background: #818cf8 !important;
}

/* Light theme overrides for zinc colors */
html.light .text-zinc-400 {
    color: #9ca3af !important;
}

html.light .bg-zinc-900\/50 {
    background: rgba(255, 255, 255, 0.5) !important;
}

html.light .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Active Navigation Menu Item */
.nav-menu-active {
    border-bottom: 2px solid #6366f1;
    color: white !important;
}

/* Utility to hide spin buttons in number inputs */
input[type=number].no-spinner::-webkit-inner-spin-button,
input[type=number].no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type=number].no-spinner {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* ========================================
   COLLECTION PAGE RESPONSIVE
======================================== */

/* Collection Hero Info - Responsive */
@media (max-width: 640px) {
    .collection-hero-info {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 10px !important;
    }

    .collection-hero-info .collection-icon-wrapper {
        margin-bottom: 1rem;
    }

    .collection-hero-info .collection-meta {
        width: 100%;
    }

    .collection-hero-info .collection-badges {
        justify-content: center !important;
    }

    .collection-hero-info .collection-title {
        font-size: 1.75rem !important;
    }

    /* Description with View More */
    .collection-description {
        max-height: 4.5em;
        overflow: hidden;
        position: relative;
        transition: max-height 0.3s ease;
    }

    .collection-description.expanded {
        max-height: none;
    }

    .collection-description-wrapper {
        position: relative;
    }

    .view-more-btn {
        display: inline-flex !important;
        margin-top: 0.5rem;
    }
}

@media (min-width: 641px) {
    .view-more-btn {
        display: none !important;
    }
}

/* Control Island Responsive */
@media (max-width: 640px) {
    .control-island {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .control-island .control-search {
        width: 100% !important;
        min-width: unset !important;
    }

    .control-island .control-divider {
        display: none !important;
    }

    .control-island .control-actions {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* --- User Requested Logo Style --- */
html body .nav-logo .nav-logo-text,
html.light body .text-white.nav-logo-text,
html .nav-logo-text {
    text-shadow: 2px 2px 0 #000000, 4px 4px 0 #000000 !important;
    color: #818CF8 !important;
    font-weight: 800 !important;
}

/* --- Fix Active Page Color Override --- */
html body .nav-menu-item.active-page,
html.light body .text-white.nav-menu-item.active-page,
html body .nav-menu-active {
    color: #ffffff !important;
    background-color: #6366f1 !important;
}