/* assets/css/main.css - Ultra-Modern Glassmorphism Design System & Animation Engine */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Brand Accent Colors */
    --primary-400: #a78bfa;
    --primary-500: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    
    --accent-cyan: #06b6d4;
    --accent-teal: #14b8a6;
    --accent-pink: #ec4899;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    
    --success-500: #10b981;
    --danger-500: #f43f5e;
    --warning-500: #f59e0b;
    --info-500: #3b82f6;

    /* Dark Space Theme Palette (Default) */
    --bg-primary: #080c16;
    --bg-secondary: #0f1527;
    --bg-tertiary: #161e36;
    --bg-elevated: #1e284a;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(139, 92, 246, 0.5);
    --border-glow: rgba(6, 182, 212, 0.4);
    
    /* Glassmorphism Tokens */
    --glass-bg: rgba(15, 21, 39, 0.75);
    --glass-card: rgba(22, 30, 54, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    --glass-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-aurora: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.12) 50%, rgba(236, 72, 153, 0.08) 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.35);
    --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.35);

    /* Radii */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 150ms var(--ease-out);
    --transition-base: 250ms var(--ease-out);
    --transition-slow: 400ms var(--ease-out);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(139, 92, 246, 0.6);
    --border-glow: rgba(6, 182, 212, 0.4);
    
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-card: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.2) 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.2);
}

/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Ambient Background Light Orbs */
body::before {
    content: '';
    position: fixed;
    top: -200px;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(6, 182, 212, 0.04) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: auroraFloat 18s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -150px;
    right: 5%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    animation: auroraFloat 22s ease-in-out infinite alternate-reverse;
}

@keyframes auroraFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-40px, 70px) scale(0.95); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); }
h4 { font-size: 1.25rem; font-weight: 700; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a {
    color: var(--primary-400);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--primary-500);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.text-gradient-cyan {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.75rem;
    position: relative;
    z-index: 1;
}

/* ========================================================
   NAVIGATION BAR
   ======================================================== */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    border-bottom-color: rgba(139, 92, 246, 0.2);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
    gap: 1.75rem;
}

/* Brand */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.navbar-brand:hover .brand-icon-wrapper {
    transform: rotate(-6deg) scale(1.08);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.brand-dot {
    color: var(--accent-cyan);
    font-weight: 900;
}

/* Search Bar */
.navbar-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.nav-search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.nav-search-form input {
    width: 100%;
    padding: 0.75rem 5.5rem 0.75rem 2.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: all var(--transition-base);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-search-form input:focus {
    border-color: var(--primary-500);
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-search-form .search-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.nav-search-form input:focus + .search-icon {
    color: var(--primary-400);
}

.search-shortcut {
    position: absolute;
    right: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-clear-btn {
    position: absolute;
    right: 3.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.search-clear-btn:hover {
    color: var(--text-primary);
}

/* Autocomplete Flyout */
.search-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: var(--glass-blur);
    overflow: hidden;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-base);
}

.search-autocomplete-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.autocomplete-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.autocomplete-header i {
    color: var(--accent-cyan);
}

.autocomplete-badge {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary-400);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

.autocomplete-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.autocomplete-item:hover, .autocomplete-item.active {
    background: rgba(139, 92, 246, 0.12);
}

.autocomplete-thumb {
    width: 38px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.autocomplete-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-title {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.autocomplete-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.autocomplete-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.15);
    text-align: right;
}

.autocomplete-footer a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-400);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Nav Links */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
}

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

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform var(--transition-base);
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-base);
    z-index: 1050;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mega Menu for Browse (Redesigned) */
.mega-menu {
    width: 760px;
    max-width: 92vw;
    right: -140px;
    padding: 1.5rem;
    overflow-x: hidden !important;
}

.mega-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.85rem;
}

.mega-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mega-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-title i { color: var(--accent-cyan); }

.mega-badge {
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary-400);
    font-size: 0.74rem;
    font-weight: 700;
}

.view-all-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--primary-400);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-fast);
}

.view-all-link:hover {
    color: var(--primary-300);
}

/* Quick Filter Inside Mega Menu */
.mega-search-box {
    position: relative;
    margin-bottom: 0.85rem;
}

.mega-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.82rem;
    pointer-events: none;
}

#mega-category-filter {
    width: 100%;
    padding: 0.55rem 2rem 0.55rem 2.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.84rem;
    outline: none;
    transition: all var(--transition-fast);
}

#mega-category-filter:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.mega-filter-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.mega-filter-clear:hover {
    color: white;
}

/* Mega Menu Grid - 3 Columns with zero horizontal overflow */
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden !important;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
}

.mega-menu-grid::-webkit-scrollbar {
    width: 5px;
}

.mega-menu-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.mega-menu-grid::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.35);
    border-radius: 4px;
}

.mega-menu-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 500;
    text-decoration: none;
    min-width: 0;
    transition: all var(--transition-fast);
}

.mega-menu-item:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--text-primary);
    transform: translateX(2px);
}

.cat-bullet {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-500);
    flex-shrink: 0;
}

.cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.cat-badge {
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    flex-shrink: 0;
    font-weight: 600;
}

.mega-no-results {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Mega Menu Footer */
.mega-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    margin-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mega-footer-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition-fast);
}

.mega-footer-link:hover {
    color: white;
}

/* User Menu */
.user-menu {
    min-width: 220px;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.user-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.5rem 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-500);
    transform: rotate(20deg) scale(1.05);
}

/* Mobile Toggle Hamburger */
.mobile-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1010;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-toggle-btn.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-toggle-btn.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Slide-over Drawer */
.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    z-index: 1300;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-slow);
    overflow-y: auto;
}

.mobile-nav-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.4rem;
}

.drawer-body {
    padding: 1.5rem;
    flex: 1;
}

.drawer-search {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0.4rem 0.8rem;
    align-items: center;
    margin-bottom: 1.75rem;
}

.drawer-search input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.drawer-links {
    list-style: none;
    margin-bottom: 2rem;
}

.drawer-links li {
    margin-bottom: 0.5rem;
}

.drawer-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.drawer-links a:hover, .drawer-links a.active {
    background: var(--gradient-primary);
    color: white;
}

.drawer-categories h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.drawer-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cat-pill {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
}

.drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.drawer-theme-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

/* ========================================================
   PREMIUM BUTTON SYSTEM
   ======================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.85rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s ease;
}

.btn:hover::after {
    left: 120%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.6);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-400);
    border: 1.5px solid var(--primary-500);
}

.btn-outline-primary:hover {
    background: var(--primary-500);
    color: white;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-white {
    background: white;
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    color: #0f172a;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-xs {
    padding: 0.35rem 0.65rem;
    font-size: 0.76rem;
    border-radius: var(--radius-md);
    gap: 0.35rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* ========================================================
   BOOK CARDS (3D Hover & Micro-interactions)
   ======================================================== */
.book-card {
    background: var(--glass-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.book-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(139, 92, 246, 0.2);
}

.book-card-cover {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: block;
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.book-card:hover .book-card-cover img {
    transform: scale(1.08);
}

/* Realistic Spine Shadow */
.book-card-cover::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 12px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.book-card-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-cyan);
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Action Overlay on Hover */
.book-card-actions {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 22, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 4;
}

.book-card:hover .book-card-actions {
    opacity: 1;
    visibility: visible;
}

.book-card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-title a {
    color: var(--text-primary);
}

.book-card-title a:hover {
    color: var(--primary-400);
}

.book-card-author {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.book-card-meta a {
    color: var(--primary-400);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.book-card-meta a:hover {
    color: var(--primary-500);
}

/* Placeholder */
.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-muted);
    font-size: 2.75rem;
}

.cover-placeholder span {
    font-size: 0.8rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-muted);
}

/* ========================================================
   BOOK SHOWCASE COMPONENT (Authentic Hardcover 3D Book Cards)
   ======================================================== */
.books-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 1.75rem;
}

/* Authentic Book Geometry - Natural spine on left, trim on right (not cylindrical!) */
.showcase-book {
    position: relative;
    aspect-ratio: 1 / 1.45;
    border-radius: 4px 10px 10px 4px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        -2px 0 6px rgba(0, 0, 0, 0.3),
        0 10px 24px -5px rgba(0, 0, 0, 0.5),
        0 4px 6px -2px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.showcase-book:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 
        -4px 0 14px rgba(0, 0, 0, 0.4),
        0 22px 42px -8px rgba(0, 0, 0, 0.7),
        0 0 28px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Realistic 3D Book Spine & Hinge Fold (Left Edge) */
.showcase-book::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 24px;
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.48) 0%, 
        rgba(255, 255, 255, 0.16) 12%, 
        rgba(0, 0, 0, 0.32) 28%, 
        rgba(0, 0, 0, 0.08) 60%, 
        transparent 100%
    );
    border-right: 1px solid rgba(0, 0, 0, 0.28);
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.12);
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
    z-index: 5;
    pointer-events: none;
}

/* Realistic Paper Block / Book Trim Edge (Right Edge) */
.showcase-book::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.06) 40%, 
        rgba(255, 255, 255, 0.22) 80%, 
        rgba(0, 0, 0, 0.45) 100%
    );
    border-top-right-radius: inherit;
    border-bottom-right-radius: inherit;
    z-index: 5;
    pointer-events: none;
}

/* Category Pill Badge */
.showcase-pill,
.showcase-category-pill {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.22rem 0.65rem;
    border-radius: var(--radius-full);
    background: rgba(11, 15, 28, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-cyan);
    z-index: 6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* Cover Image & Links */
.showcase-cover-link,
.showcase-cover-wrap {
    position: absolute;
    inset: 0;
    display: block;
    z-index: 1;
    border-radius: inherit;
}

.showcase-book > img,
.showcase-cover-link img,
.showcase-cover-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: transform 0.6s var(--ease-out);
    display: block;
    z-index: 1;
}

.showcase-book:hover > img,
.showcase-book:hover .showcase-cover-link img,
.showcase-book:hover .showcase-cover-wrap img {
    transform: scale(1.05);
}

.showcase-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-muted);
    font-size: 2.75rem;
    padding: 1.5rem;
    text-align: center;
    border-radius: inherit;
    z-index: 1;
}

.showcase-placeholder span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Sleek Frosted Glass Hover Overlay (Clean, unobscured book cover in resting state; smooth hover reveal) */
.showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(8, 12, 24, 0.96) 0%, 
        rgba(8, 12, 24, 0.82) 48%, 
        rgba(8, 12, 24, 0.25) 80%, 
        transparent 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.4rem;
    border-radius: inherit;
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.showcase-book:hover .showcase-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.showcase-overlay h3 {
    color: white;
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.showcase-overlay h3 a {
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.showcase-overlay h3 a:hover {
    color: var(--primary-400);
}

.showcase-author {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0 0 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.showcase-meta-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.showcase-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.showcase-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.showcase-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-fast);
}

.showcase-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 22px rgba(139, 92, 246, 0.6);
    color: white;
}

.showcase-quick-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.showcase-quick-btn:hover {
    background: white;
    color: #0f172a;
    transform: scale(1.1);
}

/* ========================================================
   MODERN FOOTER
   ======================================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 5rem 0 2rem;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

/* Newsletter Showcase */
.footer-newsletter-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 4.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.footer-newsletter-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.newsletter-content {
    max-width: 540px;
}

.newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary-400);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.newsletter-content h3 {
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    max-width: 480px;
}

.newsletter-input-group {
    position: relative;
    flex: 1;
}

.newsletter-input-group i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.newsletter-input-group input {
    width: 100%;
    padding: 0.9rem 1.25rem 0.9rem 3rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.newsletter-input-group input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 3.5rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    max-width: 360px;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.footer-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 28px; height: 2px;
    background: var(--primary-500);
    border-radius: 2px;
}

.footer-nav {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.footer-nav a i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--primary-400);
    transform: translateX(4px);
}

.footer-nav a:hover i {
    color: var(--primary-400);
    transform: translateX(2px);
}

.footer-cat-count {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-legal-links a {
    color: var(--text-muted);
}

.footer-legal-links a:hover {
    color: var(--text-primary);
}

/* ========================================================
   CIRCULAR SCROLL PROGRESS & BACK TO TOP BUTTON
   ======================================================== */
.scroll-progress-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all var(--transition-base);
}

.scroll-progress-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-progress-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    color: var(--primary-400);
}

.progress-ring {
    position: absolute;
    top: 0; left: 0;
    transform: rotate(-90deg);
}

.progress-ring-indicator {
    stroke-dasharray: 125.6;
    stroke-dashoffset: 125.6;
    transition: stroke-dashoffset 0.1s linear;
}

/* ========================================================
   INTERACTIVE TOAST NOTIFICATIONS
   ======================================================== */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 300px;
    max-width: 420px;
    color: var(--text-primary);
    font-size: 0.92rem;
    transform: translateX(120%);
    transition: transform 0.35s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success-500); }
.toast-error .toast-icon { color: var(--danger-500); }
.toast-info .toast-icon { color: var(--info-500); }

.toast-content {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    width: 100%;
    background: var(--primary-500);
    animation: toastTimer 4.5s linear forwards;
}

@keyframes toastTimer {
    from { width: 100%; }
    to { width: 0%; }
}

/* ========================================================
   MODAL SYSTEM
   ======================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 12, 0.75);
    backdrop-filter: blur(10px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.95);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: var(--glass-blur);
    z-index: 2100;
    width: 90%;
    max-width: 720px;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-spring);
    padding: 2.5rem;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    color: white;
    background: var(--danger-500);
}

/* ========================================================
   ANIMATION UTILITIES (AOS)
   ======================================================== */
[data-animate] {
    opacity: 0;
    transition-duration: 0.8s;
    transition-timing-function: var(--ease-out);
    will-change: transform, opacity;
}

[data-animate="fade-up"] {
    transform: translateY(30px);
}

[data-animate="fade-down"] {
    transform: translateY(-30px);
}

[data-animate="zoom-in"] {
    transform: scale(0.92);
}

[data-animate="fade-in"] {
    transform: translateY(0);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger Delay Classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .footer-newsletter-card { flex-direction: column; text-align: center; gap: 2rem; }
    .newsletter-content { max-width: 100%; }
    .newsletter-form { max-width: 100%; width: 100%; }
    .navbar-search { max-width: 320px; }
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .mobile-toggle-btn { display: flex; }
    .navbar-search { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .footer-newsletter-card { padding: 2rem 1.5rem; }
    .scroll-progress-btn { bottom: 1.25rem; right: 1.25rem; }
}
