/* Modern CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Color Palette (light defaults) */
    --primary: #3b82f6;            /* blue-500 */
    --primary-dark: #1d4ed8;       /* blue-700 */
    --secondary: #0ea5e9;          /* sky-500 */
    --accent: #22d3ee;             /* cyan-400 */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Neutrals */
    --black: #000000;
    --dark: #0b1220;
    --darker: #0f172a;
    --dark-gray: #1e293b;
    --gray: #334155;
    --light-gray: #6b7280;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    --gradient-dark: linear-gradient(135deg, #0b1220 0%, #0f172a 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.3);
    --shadow-neon-pink: 0 0 20px rgba(236, 72, 153, 0.3);
    
    /* Typography: single-site font (Inter) */
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-space: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 250ms ease-out;
    --transition-slow: 350ms ease-out;

    /* Animations */
    --animate-pulse: 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;

    /* THEME (light defaults) */
    --bg: #ffffff;
    --text: #0e1628;
    --surface: #f5f7fb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --muted: rgba(17, 24, 39, 0.7);
    --hover-surface: rgba(0, 0, 0, 0.06);

    /* Layout */
    --header-offset-mobile: 12px;
    --header-offset-desktop: 72px;
}

/* Animation Classes */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.animate-pulse {
  animation: var(--animate-pulse);
}

/* WhatsApp-style Message Animations */
@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes messageBubble {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes reactionPop {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.message-animate {
  animation: messageSlideIn 0.3s ease-out;
}

.message-bubble {
  animation: messageBubble 0.4s ease-out;
}

.reaction-animate {
  animation: reactionPop 0.3s ease-out;
}

/* Dark theme overrides (when html has class .dark) */
.dark {
    /* Blue/Sky Blue/Dark palette */
    --primary: #3b82f6;            /* blue-500 */
    --primary-dark: #1e40af;       /* blue-800 */
    --secondary: #0ea5e9;          /* sky-500 */
    --accent: #22d3ee;             /* cyan-400 */

    --bg: #0b1220;                 /* deep navy */
    --text: #e5f0ff;               /* near-white with blue hint */
    --surface: rgba(2, 8, 23, 0.7); /* slate-950 w/ transparency */
    --glass-bg: rgba(15, 23, 42, 0.6); /* slate-900 glass */
    --glass-border: rgba(148, 163, 184, 0.18); /* slate-400 alpha */
    --muted: rgba(203, 213, 225, 0.78); /* slate-300 alpha */
    --hover-surface: rgba(59, 130, 246, 0.12); /* primary tint */

    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #22d3ee 100%);
    --gradient-dark: linear-gradient(135deg, #0b1220 0%, #0f172a 100%);
}

/* Base Styles */
body {
    font-family: var(--font-inter);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global content wrapper spacing below fixed header */
.app-content { padding-top: var(--header-offset-mobile); }
@media (min-width: 768px) {
  .app-content { padding-top: var(--header-offset-desktop); }
}

/* Modern Typography */
.font-inter { font-family: var(--font-inter); }
.font-space { font-family: var(--font-space); }

/* Glassmorphism Effects */
.glass {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Neon Effects */
.neon-primary {
    box-shadow: var(--shadow-neon);
    border: 1px solid var(--primary);
}

.neon-secondary {
    box-shadow: var(--shadow-neon-pink);
    border: 1px solid var(--secondary);
}

/* Modern Gradients */
.gradient-primary {
    background: var(--gradient-primary);
}

.gradient-secondary {
    background: var(--gradient-secondary);
}

.gradient-dark {
    background: var(--gradient-dark);
}

/* Animated Background */
.animated-bg {
    background: radial-gradient(1200px 600px at 50% -10%, rgba(59,130,246,0.20), transparent 60%),
                radial-gradient(1000px 500px at 90% 10%, rgba(14,165,233,0.18), transparent 55%),
                radial-gradient(1000px 500px at 10% 80%, rgba(34,211,238,0.14), transparent 55%),
                var(--bg);
}

/* Section texture layers */
.section-texture {
    position: relative;
}
.section-texture::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(800px 400px at 20% 10%, rgba(59,130,246,0.08), transparent 60%),
      radial-gradient(700px 350px at 80% 20%, rgba(14,165,233,0.06), transparent 55%),
      radial-gradient(600px 300px at 50% 90%, rgba(34,211,238,0.06), transparent 55%);
    z-index: 0;
}

/* Subtle grid/dots overlay for depth */
.bg-grid {
    position: relative;
}
.bg-grid::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    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: 40px 40px, 40px 40px;
    mask-image: radial-gradient(circle at center, black, transparent 70%);
    z-index: 0;
}

/* Dotted overlay variant */
.bg-dots { position: relative; }
.bg-dots::after {
    content: "";
    position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: .6;
    mask-image: radial-gradient(circle at 50% 30%, black, transparent 70%);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

/* Microinteraction: subtle press effect */
.btn:active {
    transform: translateY(0);
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: var(--shadow-neon-pink);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--glass-border);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--hover-surface);
    border-color: var(--primary);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    background: var(--hover-surface);
    border-color: var(--primary);
}

/* Modern Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(148, 163, 184, 0.25);
}

.card-dark {
    background: var(--gradient-dark);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modern Inputs */
.input {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    outline: none;
}

.input:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-neon);
    background: var(--surface);
}

/* Switch/toggle baseline used across settings */
.switch-track {
    position: relative;
    width: 44px; height: 24px;
    border-radius: 9999px;
    background: var(--hover-surface);
    border: 1px solid var(--glass-border);
    transition: background var(--transition-normal), border-color var(--transition-normal);
}
.switch-thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--text);
    transform: translateX(0);
    transition: transform var(--transition-normal), background var(--transition-normal);
}
.switch-checked .switch-track { background: var(--primary); border-color: var(--primary); }
.switch-checked .switch-thumb { background: #fff; transform: translateX(20px); }

.input::placeholder {
    color: var(--muted);
}

/* Modern Slider */
.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: var(--shadow-neon);
    transition: all var(--transition-normal);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-neon);
}

/* Modern Navigation */
.nav-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

/* Fix logo overlap at medium screen sizes (around 1000-1200px) */
@media (min-width: 1000px) and (max-width: 1279px) {
    .nav-glass {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .nav-glass img[alt="MusicBae"] {
        max-width: 130px !important;
        height: auto !important;
        max-height: 42px !important;
    }
    
    /* Ensure left nav section doesn't overflow */
    .nav-glass > div:first-of-type {
        flex: 0 0 auto;
        max-width: calc(50% - 75px);
        min-width: 0;
    }
    
    /* Ensure right controls section doesn't overflow */
    .nav-glass > div:last-of-type {
        flex: 0 0 auto;
        max-width: calc(50% - 75px);
        min-width: 0;
    }
}

.nav-item {
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--hover-surface);
}

.nav-item.active {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-neon);
}

/* Modern Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-fadeIn { animation: fadeIn 0.6s ease-out; }
.animate-slideInRight { animation: slideInRight 0.3s ease-out; }
.animate-slideInUp { animation: slideInUp 0.3s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Page-specific animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slideInLeft { animation: slideInFromLeft 0.6s ease-out; }
.animate-slideInRight { animation: slideInFromRight 0.6s ease-out; }
.animate-scaleIn { animation: scaleIn 0.5s ease-out; }
.animate-bounceIn { animation: bounceIn 0.8s ease-out; }

/* Stagger animations for lists */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Boombox v2 (two-column layout) */
.boombox {
    position: relative;
    width: 100%;
    background: var(--surface);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
  .boombox { grid-template-columns: 1fr 1.4fr; align-items: center; }
}
.boombox-left { display:flex; align-items:center; justify-content:center; min-height: 220px; }
.boombox-right { display:flex; flex-direction:column; gap: 12px; align-items:stretch; }

.boombox .vinyl {
    position: relative;
    width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle at 54% 46%, var(--dark-gray) 0 62%, transparent 63%),
                radial-gradient(circle at center, var(--dark) 0 35%, transparent 36%),
                repeating-radial-gradient(circle at center, var(--darker) 0, var(--darker) 6px, var(--dark) 6px, var(--dark) 12px);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.6), 0 10px 25px rgba(0,0,0,0.35);
    border: 6px solid var(--primary-dark);
}
/* Light mode vinyl adjustments */
.light .boombox .vinyl {
    background: radial-gradient(circle at 54% 46%, #4b5563 0 62%, transparent 63%),
                radial-gradient(circle at center, #374151 0 35%, transparent 36%),
                repeating-radial-gradient(circle at center, #1f2937 0, #1f2937 6px, #374151 6px, #374151 12px);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3), 0 10px 25px rgba(0,0,0,0.2);
    border: 6px solid var(--primary-dark);
}
.boombox .vinyl .vinyl-label { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:70px; height:70px; border-radius:50%; object-fit:cover; box-shadow:0 0 0 8px var(--secondary); }
.boombox .vinyl .vinyl-label-fallback { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:70px; height:70px; border-radius:50%; background:var(--secondary); box-shadow:0 0 0 8px var(--accent); }
.boombox.playing .vinyl { animation: spin 6s linear infinite; }

.boombox .track-meta { text-align:left; }
.boombox .track-meta .title { color:var(--text); font-weight:700; font-size:1.1rem; }
.boombox .track-meta .artist { color:var(--muted); font-size:0.9rem; }

.boombox-controls { display:flex; align-items:center; gap: 10px; background: var(--glass-bg); border:1px solid var(--glass-border); border-radius: 999px; padding: 8px 12px; backdrop-filter: blur(10px); }
.boombox-controls .time { color:var(--muted); font-size:12px; min-width:46px; text-align:center; }
.boombox-controls .progress { flex:1; appearance:none; height:6px; border-radius:999px; background:var(--hover-surface); outline:none; }
.boombox-controls .progress::-webkit-slider-thumb { appearance:none; width:14px; height:14px; border-radius:50%; background:var(--primary); box-shadow:0 0 0 3px rgba(59,130,246,.25); }
.boombox-controls .progress::-moz-range-thumb { width:14px; height:14px; border-radius:50%; background:var(--primary); border:none; }
.boombox-controls .volume { width:100px; appearance:none; height:6px; border-radius:999px; background:var(--hover-surface); }
.boombox-controls .volume::-webkit-slider-thumb { appearance:none; width:12px; height:12px; border-radius:50%; background:var(--secondary); box-shadow:0 0 0 3px rgba(14,165,233,.25); }
.boombox-controls .volume::-moz-range-thumb { width:12px; height:12px; border-radius:50%; background:var(--secondary); border:none; }
/* Light mode slider adjustments */
.light .boombox-controls .progress { background:rgba(0,0,0,0.15); }
.light .boombox-controls .volume { background:rgba(0,0,0,0.15); }

/* Enhanced card hover effects */
.card-hover {
    transition: all var(--transition-normal);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Contact form enhancements */
.contact-form {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
}

.contact-form:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-neon);
}

/* Social media hover effects */
.social-link {
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.social-link::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.5s;
}

.social-link:hover::before {
    left: 100%;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

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

/* Modern Grid Layouts */
.grid-modern {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* Modern Music Player */
.player {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.player-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-neon);
}

/* Modern Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--hover-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

/* Modern Toast */
.toast {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

/* Microinteraction: ripple helper (optional utility) */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0; height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 400ms ease, height 400ms ease, opacity 500ms ease;
    opacity: 0;
}
.ripple:active::after { width: 200%; height: 200%; opacity: 1; }

/* Confetti canvas baseline (when using canvas-confetti) */
.confetti-canvas { pointer-events: none; position: fixed; inset: 0; }

/* Modern Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Shimmer animation for progress bar */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-shimmer {
    animation: shimmer 2s ease-in-out infinite;
}

/* Modern Responsive Design */
@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }
    
    .card {
        padding: var(--space-md);
    }
    
    .input {
        padding: 0.625rem 0.875rem;
    }
}

/* Modern Focus States */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Modern Selection */
::selection {
    background: var(--primary);
    color: var(--white);
}

/* FAQ toggle: remove default blue focus ring while keeping keyboard accessibility */
.faq-toggle { outline: none; }
.faq-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: var(--radius-md);
}

/* Modern Backdrop */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 50;
}

/* Modern Modal */
.modal {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    margin: 2rem auto;
    animation: fadeIn 0.3s ease-out;
}

/* Icon-only button for navbar theme toggle */
.icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}
.icon-btn:hover { background: var(--hover-surface); }

/* Ensure SVG icons display properly on all devices */
span[class*="inline-flex"] svg,
span[class*="inline-flex"] > svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    flex-shrink: 0;
}

/* Icon component SVG styling */
span[style*="inline-flex"] svg {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

/* Light mode overrides for common Tailwind utility combos used in markup */
.light .text-white { color: #0f0f0f !important; }
.light .text-white\/90 { color: rgba(15, 15, 15, 0.9) !important; }
.light .text-white\/80 { color: rgba(15, 15, 15, 0.8) !important; }
.light .text-white\/70 { color: rgba(15, 15, 15, 0.7) !important; }
.light .text-white\/60 { color: rgba(15, 15, 15, 0.6) !important; }
.light .text-white\/50 { color: rgba(15, 15, 15, 0.55) !important; }
.light .text-white\/40 { color: rgba(15, 15, 15, 0.5) !important; }
.light .border-white\/10 { border-color: rgba(0, 0, 0, 0.1) !important; }
.light .bg-white\/5 { background-color: rgba(0, 0, 0, 0.03) !important; }
.light .bg-white\/10 { background-color: rgba(0, 0, 0, 0.08) !important; }
.light .hover\:bg-white\/10:hover { background-color: rgba(0, 0, 0, 0.06) !important; }

/* Theme-aware utility classes using CSS variables */
.text-theme { color: var(--text); }
.text-theme-muted { color: var(--muted); }
.bg-theme-surface { background-color: var(--surface); }
.bg-theme-glass { background-color: var(--glass-bg); }
.border-theme-glass { border-color: var(--glass-border); }
.hover\:bg-theme-hover:hover { background-color: var(--hover-surface); }

/* Utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
} 

/* ===== Homepage refinements ===== */
.section-divider {
	width: 100%;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(148,163,184,0.25), transparent);
	margin: 2.5rem 0;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 9999px;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.02em;
	border: 1px solid var(--glass-border);
	background: var(--gradient-glass);
	backdrop-filter: blur(10px);
}
.badge-primary {
	border-color: rgba(59, 130, 246, 0.35);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.section-header { text-align: center; margin-bottom: 2rem; }
.section-title {
	font-size: 2.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.section-subtitle {
	color: var(--muted);
	max-width: 42rem;
	margin: 0.75rem auto 0;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}
@media (min-width: 768px) {
	.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
}
.stat-card {
	background: var(--surface);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-xl);
	padding: 1rem;
	text-align: center;
	transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.stat-icon { font-size: 1.5rem; opacity: 0.9; margin-bottom: 0.25rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-value { font-weight: 700; }
.stat-label { font-size: 0.8rem; color: var(--muted); }

/* Overview grid spacing tightening for 1 & 3 alignment */
.overview-grid { align-items: stretch; }
.overview-grid .card-full { height: 100%; padding: 1.25rem; }
.overview-grid .card-full h3 { margin-bottom: 0.5rem; }
.overview-grid .card-full .bullets { margin-top: 0.25rem; }