/* ============================================
   NOW PLAYING - Glitch Studios Theme
   Professional Dark Mode Website
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f1a;
    --bg-card: #12121f;
    --bg-card-hover: #1a1a2e;
    --bg-elevated: #16162a;

    --text-primary: #e4e4ef;
    --text-secondary: #8888a8;
    --text-muted: #555577;

    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-green: #22c55e;
    --accent-yellow: #eab308;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;

    --gradient-primary: linear-gradient(135deg, #a855f7, #ec4899);
    --gradient-hero: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #06b6d4 100%);
    --gradient-card: linear-gradient(145deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.05));

    --border-color: rgba(136, 136, 168, 0.12);
    --border-glow: rgba(168, 85, 247, 0.3);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.15);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ---------- Watermark ---------- */
.watermark {
    position: fixed;
    bottom: 18px;
    right: 22px;
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(136, 136, 168, 0.3);
    text-transform: uppercase;
    z-index: 9999;
}

.watermark a {
    color: rgba(136, 136, 168, 0.3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.watermark a:hover {
    color: rgba(168, 85, 247, 0.7);
}

/* ---------- Ko-fi Button ---------- */
.kofi-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(255, 94, 58, 0.12);
    border: 1px solid rgba(255, 94, 58, 0.35);
    border-radius: 999px;
    color: #ff5e3a;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 9999;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    backdrop-filter: blur(8px);
}

.kofi-btn:hover {
    background: rgba(255, 94, 58, 0.22);
    border-color: rgba(255, 94, 58, 0.6);
    transform: translateY(-2px);
}

/* ---------- Background Animation ---------- */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.6) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.5) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(136, 136, 168, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(136, 136, 168, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 100%);
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(60px, -40px) scale(1.1); }
    50% { transform: translate(-30px, 60px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulseGlow {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
}

a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-pink);
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity var(--transition);
}

.nav-logo:hover {
    opacity: 0.85;
}

.nav-logo-img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: block;
}

.nav-logo-text {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.nav-logo-glitch {
    height: 22px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.2));
}

.nav-links {
    display: flex;
    gap: 2px;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.08);
}

.nav-link.active {
    color: var(--accent-purple);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

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

.nav-dropdown-btn {
    background: none;
    border: none;
    font-family: var(--font-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-dd-arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}

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

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(12, 12, 20, 0.97);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 6px;
    min-width: 200px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: flex;
    flex-direction: column;
}

.nav-dropdown-item {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.1);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-main);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.4);
    color: #fff;
}

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

.btn-outline:hover {
    border-color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.06);
    color: var(--text-primary);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    z-index: 1;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(1400px, 150vw, 2400px);
    height: clamp(1400px, 150vw, 2400px);
    background:
        radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, rgba(236, 72, 153, 0.06) 30%, transparent 60%),
        radial-gradient(circle at 30% 70%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    pointer-events: none;
    animation: pulseGlow 8s ease-in-out infinite;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 30px;
    padding: 6px 20px;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease;
}

.beta-warning {
    display: inline-block;
    max-width: 700px;
    margin: 0 auto 26px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(234, 179, 8, 0.35);
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(234, 179, 8, 0.08));
    color: #fef3c7;
    font-size: 0.95rem;
    line-height: 1.55;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    animation: fadeInUp 0.8s ease 0.05s both;
}

.beta-warning strong {
    color: #facc15;
    font-weight: 700;
}

.accuracy-warning {
    display: inline-block;
    max-width: 700px;
    margin: 0 auto 26px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.35);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.08));
    color: #cffafe;
    font-size: 0.95rem;
    line-height: 1.55;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    animation: fadeInUp 0.8s ease 0.08s both;
}

.accuracy-warning strong {
    color: #67e8f9;
    font-weight: 700;
}

.accuracy-warning p {
    margin: 0;
}

.accuracy-warning ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.accuracy-warning li {
    margin-top: 6px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s infinite;
}

.code-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-title .line {
    display: block;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .line .hero-emoji {
    -webkit-text-fill-color: initial;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* ---------- Section ---------- */
.section {
    position: relative;
    padding: 100px 0;
    z-index: 1;
    background: rgba(10, 10, 15, 0.85);
}

.section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(168, 85, 247, 0.035) 0%, transparent 70%);
    pointer-events: none;
}

.section-dark {
    background: rgba(15, 15, 26, 0.9);
}

.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.1), transparent);
}

.section-dark::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.2), rgba(6, 182, 212, 0.1), transparent);
}

/* ---------- Section Header ---------- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-purple);
    stroke-width: 2;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- Card Element ---------- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

/* ---------- Steps ---------- */
.steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step {
    display: flex;
    gap: 24px;
    position: relative;
}

.step::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 64px;
    width: 1px;
    height: calc(100% + 32px);
    background: linear-gradient(180deg, var(--border-glow) 0%, transparent 100%);
    opacity: 0.3;
}

.step:last-child::before {
    display: none;
}

.step-number {
    min-width: 42px;
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.step-content ul {
    margin-top: 12px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.step-content li {
    margin-top: 6px;
    overflow-wrap: anywhere;
}

/* ---------- Code Block ---------- */
.code-block {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.code-block code {
    flex: 1;
    overflow-x: auto;
    color: var(--accent-cyan);
    word-break: break-all;
    white-space: pre-wrap;
}

.copy-btn {
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--transition);
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.3);
}

/* ---------- FAQ ---------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 20px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::marker {
    content: '';
}

.faq-item summary::after {
    content: '▾';
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1;
    transition: transform var(--transition), color var(--transition);
    transform: rotate(0deg);
    margin-left: 16px;
    flex-shrink: 0;
}

.faq-item summary:hover {
    background: rgba(168, 85, 247, 0.05);
    color: var(--accent-purple);
}

.faq-item[open] summary {
    background: rgba(168, 85, 247, 0.08);
    color: var(--accent-purple);
}

.faq-item[open] summary::after {
    transform: rotate(180deg);
    color: var(--accent-purple);
}

.faq-item p {
    padding: 0 20px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(10, 10, 15, 0.85);
    padding: 60px 0 20px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-purple);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-credit a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-credit a:hover {
    color: var(--accent-purple);
}

/* ---------- Overlay customiser ---------- */
.customiser-layout {
    display: grid;
    grid-template-columns: 1fr 1.55fr;
    gap: 24px;
    align-items: stretch;
}

.customiser-preview {
    min-width: 0;
    min-width: 420px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.customiser-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    min-width: 0;
}

.customiser-panel.card {
    overflow: visible;
}

.customiser-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.customiser-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customiser-field label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.full-width {
    grid-column: 1 / -1;
}

.custom-input,
.custom-range {
    width: 100%;
    display: block;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    padding: 10px 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.custom-input:focus,
.custom-range:focus {
    outline: none;
    border-color: rgba(168, 85, 247, 0.65);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

select.custom-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 34px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
        linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

select.custom-input option {
    background: #17182a;
    color: #e4e4ef;
}

select.custom-input option:checked {
    background: #2d1f47;
    color: #ffffff;
}

.custom-range {
    padding: 8px 0;
    accent-color: var(--accent-purple);
}

.customiser-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.customiser-toggles label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 8px 10px;
    border: 1px solid rgba(136, 136, 168, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.customiser-toggles input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent-purple);
}

.custom-url-block {
    margin-top: 0;
}

.custom-url-block code {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.custom-pogly-actions {
    margin-top: 14px;
}

.custom-pogly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.custom-pogly-title {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.custom-pogly-note {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.custom-pogly-json {
    margin: 0;
    max-height: min(58vh, 520px);
    overflow: auto;
    white-space: pre;
    font-size: 12px;
    line-height: 1.45;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.custom-pogly-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(8, 10, 20, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-pogly-modal.open {
    display: flex;
}

.custom-pogly-dialog {
    width: min(920px, 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #111222;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    padding: 16px;
}

.custom-pogly-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.custom-preview-label {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.custom-preview-frame-wrap {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.15), rgba(10, 10, 15, 0.95));
    min-height: 520px;
    overflow: hidden;
    flex: 1;
}

.custom-preview-frame {
    width: 100%;
    min-height: 520px;
    border: none;
    background: transparent;
}

.custom-preview-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

@media (max-width: 1024px) {
    .customiser-layout {
        grid-template-columns: 1fr;
    }

    .customiser-preview {
        min-width: 0;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .watermark {
        display: none;
    }

    .container,
    .nav-container {
        padding: 0 16px;
    }

    .navbar {
        padding: 12px 0;
    }

    .nav-logo-img {
        width: 30px;
        height: 30px;
    }

    .nav-logo-text {
        font-size: 0.95rem;
    }

    .nav-logo-glitch {
        height: 18px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px;
        border-top: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 12px 14px;
    }

    .nav-actions .btn {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-btn {
        width: 100%;
        padding: 12px 14px;
    }

    .nav-dropdown-menu {
        display: flex;
        flex-direction: column;
        position: static;
        transform: none;
        background: none;
        border: none;
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        padding: 0 0 0 8px;
        min-width: unset;
    }

    .nav-dropdown-item {
        width: 100%;
        padding: 10px 14px;
    }

    .hero {
        min-height: auto;
        padding: 108px 16px 64px;
    }

    .hero-title {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.65;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .beta-warning {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .accuracy-warning {
        width: 100%;
        padding: 10px 14px;
        font-size: 0.9rem;
        text-align: left;
    }

    .section {
        padding: 72px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .feature-card {
        padding: 24px;
    }

    .step {
        gap: 16px;
    }

    .step::before {
        left: 21px;
    }

    .card {
        padding: 24px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .customiser-layout {
        grid-template-columns: 1fr;
    }

    .customiser-preview {
        min-width: 0;
        width: 100%;
    }

    .custom-preview-frame-wrap,
    .custom-preview-frame {
        min-height: 380px;
    }

    .customiser-grid {
        grid-template-columns: 1fr;
    }

    .step {
        display: block;
        padding-left: 0;
    }

    .step::before {
        display: none;
    }

    .step-number {
        margin-bottom: 10px;
    }

    .step-content {
        min-width: 0;
    }

    .step-content ul {
        padding-left: 18px;
        line-height: 1.7;
    }

    .custom-preview-frame-wrap,
    .custom-preview-frame {
        min-height: 320px;
    }

    .custom-url-block code {
        white-space: normal;
    }

    .customiser-toggles {
        grid-template-columns: 1fr;
    }

    .code-block {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .copy-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 96px;
    }

    .hero-badge {
        margin-bottom: 20px;
    }

    .section-tag {
        font-size: 0.72rem;
    }

    .feature-card,
    .card {
        padding: 18px;
    }

    .step-content p,
    .faq-item p,
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* ============================================================
   NEW REWORK CLASSES
   ============================================================ */

/* ---------- Stat Strip (home hub) ---------- */
.stat-strip {
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
    margin: 36px 0 64px;
    background: rgba(168, 85, 247, 0.04);
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 680px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 20px 16px;
    position: relative;
}

.stat-item + .stat-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(168, 85, 247, 0.15);
}

.stat-num {
    font-size: 1.75rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------- Hub Card Variants ---------- */
.hub-card--cyan:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 24px 64px rgba(6, 182, 212, 0.08), 0 0 0 1px rgba(6, 182, 212, 0.12);
}

.hub-card--cyan:hover .hub-card-link {
    color: var(--accent-cyan);
}

.hub-card--green:hover {
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 24px 64px rgba(34, 197, 94, 0.08), 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.hub-card--green:hover .hub-card-link {
    color: #22c55e;
}

.hub-card--pink:hover {
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 24px 64px rgba(236, 72, 153, 0.08), 0 0 0 1px rgba(236, 72, 153, 0.12);
}

.hub-card--pink:hover .hub-card-link {
    color: var(--accent-pink);
}

.hub-card--purple:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 24px 64px rgba(139, 92, 246, 0.08), 0 0 0 1px rgba(139, 92, 246, 0.12);
}

.hub-card--purple:hover .hub-card-link {
    color: #a855f7;
}

.hub-card--red:hover {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 24px 64px rgba(239, 68, 68, 0.08), 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.hub-card--red:hover .hub-card-link {
    color: #ef4444;
}

.hub-card--blue:hover {
    border-color: rgba(29, 155, 240, 0.4);
    box-shadow: 0 24px 64px rgba(29, 155, 240, 0.08), 0 0 0 1px rgba(29, 155, 240, 0.12);
}

/* ============================================
   SKELETON LOADING
   ============================================ */

@keyframes sk-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

/* Base skeleton block – apply to any placeholder element */
.skeleton,
.sk-line,
.sk-block,
.sk-circle {
    background: linear-gradient(
        90deg,
        rgba(136, 136, 168, 0.06) 25%,
        rgba(136, 136, 168, 0.14) 50%,
        rgba(136, 136, 168, 0.06) 75%
    );
    background-size: 1200px 100%;
    animation: sk-shimmer 1.8s infinite linear;
    border-radius: 6px;
    display: block;
}

.sk-line  { height: 14px; border-radius: 4px; }
.sk-block { border-radius: 12px; }
.sk-circle { border-radius: 50%; }

/* Page-level loading state ──────────────────────────────────── */
/* Set on <html> immediately, removed after fonts are ready */
html.is-loading body { pointer-events: none; }

/* Fade in body content once loaded */
html.is-loaded .page-content {
    animation: sk-fade-in 0.35s ease both;
}

@keyframes sk-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hub page – skeleton cards shown while is-loading */
.hub-grid-sk {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}
html.is-loading .hub-grid { display: none; }
html.is-loading .hub-grid-sk { display: grid; }

.hub-card-skeleton {
    background: rgba(18, 18, 31, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.hub-card-skeleton .sk-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.hub-card-skeleton .sk-title {
    height: 20px;
    width: 60%;
}

.hub-card-skeleton .sk-desc-1 { height: 13px; width: 100%; }
.hub-card-skeleton .sk-desc-2 { height: 13px; width: 85%; }
.hub-card-skeleton .sk-desc-3 { height: 13px; width: 70%; }

.hub-card-skeleton .sk-tags {
    display: flex;
    gap: 6px;
}
.hub-card-skeleton .sk-tag {
    height: 20px;
    width: 72px;
    border-radius: 999px;
}

.hub-card-skeleton .sk-link {
    height: 14px;
    width: 90px;
    margin-top: 2px;
}

/* Hero skeleton placeholders */
html.is-loading .hero-content .hero-badge,
html.is-loading .hero-content .hero-title,
html.is-loading .hero-content .hero-subtitle,
html.is-loading .hero-content .hero-actions {
    opacity: 0;
}

/* Stat strip skeleton */
html.is-loading .stat-strip { opacity: 0; }

/* Section content fade while loading */
html.is-loading .section:not(.hero) .section-header,
html.is-loading .section:not(.hero) .features-grid,
html.is-loading .section:not(.hero) .setup-box {
    opacity: 0;
    transition: none;
}

html.is-loaded .section .section-header,
html.is-loaded .section .features-grid,
html.is-loaded .section .setup-box {
    animation: sk-fade-in 0.4s ease both;
}

/* ── Transition helpers ────────────────────────────────────── */
.sk-hidden { display: none !important; }
.sk-visible { display: block !important; }

.hub-card--blue:hover .hub-card-link {
    color: #1d9bf0;
}

/* ---------- Notice Bar (now-playing warnings) ---------- */
.notice-bar {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 72px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.65;
}

.notice-item--warn {
    background: rgba(234, 179, 8, 0.07);
    border: 1px solid rgba(234, 179, 8, 0.2);
    color: #fef3c7;
}

.notice-item--warn strong { color: #fcd34d; }

.notice-item--info {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.18);
    color: #cffafe;
}

.notice-item--info strong { color: #67e8f9; }

.notice-icon {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 0.95rem;
}

/* ---------- How It Works Grid ---------- */
.hiw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    position: relative;
}

.hiw-grid::before {
    content: '';
    position: absolute;
    top: 50px;
    left: calc(33.33% - 10px);
    width: calc(33.33% + 20px);
    height: 1px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
    pointer-events: none;
}

.hiw-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: border-color var(--transition), transform var(--transition);
}

.hiw-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-3px);
}

.hiw-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    margin: 0 auto 18px;
}

.hiw-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.hiw-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ---------- Emoji Decoder Overlay Mockup ---------- */
.ed-mock {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(400px, 90vw);
    padding: 24px 28px;
    margin: 32px auto 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08),
                0 0 0 1px rgba(168, 85, 247, 0.12);
    backdrop-filter: blur(20px) saturate(160%);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.ed-mock-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ed-mock-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #d8a1ff;
    font-family: var(--font-main);
}

.ed-mock-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.18);
    border: 1px solid rgba(168, 85, 247, 0.35);
    font-size: 0.75rem;
    font-weight: 600;
    color: #d8a1ff;
    white-space: nowrap;
}

.ed-mock-emojis {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    line-height: 1.2;
    letter-spacing: 8px;
    text-align: center;
}

.ed-mock-hints {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.ed-mock-hint {
    font-size: 0.88rem;
    color: #cbd5e1;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ed-mock-hint strong {
    color: #fbbf24;
    font-weight: 700;
}

.ed-mock-hint-cat {
    font-size: 0.82rem;
    color: #94a3b8;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.ed-mock-timer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ed-mock-bar-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.ed-mock-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #22c55e, #f97316);
}

.ed-mock-timer-text {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: right;
    font-family: var(--font-mono);
}

@media (max-width: 480px) {
    .ed-mock {
        padding: 18px 20px;
        gap: 12px;
    }
}

/* ---------- Params Collapsible (now-playing setup) ---------- */
.params-toggle {
    margin-top: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent-purple);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    transition: color var(--transition);
}

.params-toggle:hover { color: var(--accent-pink); }

.params-collapsible {
    display: none;
    margin-top: 10px;
}

.params-collapsible.open {
    display: block;
}

/* ---------- Responsive additions ---------- */
@media (max-width: 768px) {
    .stat-strip {
        max-width: 100%;
    }

    .hiw-grid {
        grid-template-columns: 1fr;
    }

    .hiw-grid::before {
        display: none;
    }

    .notice-bar {
        padding: 0 16px 48px;
    }
}
