/* ═══════════════════════════════════════════════════════
   Vintage Garbage — Landing Page Design System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-dark: #07070c;
    --bg-surface: #0f0f18;
    --bg-card: #16162280;
    --bg-glass: rgba(22, 22, 34, 0.6);

    --text-white: #f5f5fa;
    --text-dim: #8585a0;
    --text-muted: #4a4a65;

    --gradient-main: linear-gradient(135deg, #00d68f, #4d8eff, #a855f7);
    --gradient-warm: linear-gradient(135deg, #ff6b6b, #ffc93c);
    --gradient-cool: linear-gradient(135deg, #4d8eff, #00d68f);
    --glow-green: 0 0 60px rgba(0, 214, 143, 0.2);
    --glow-blue: 0 0 60px rgba(77, 142, 255, 0.2);

    --accent-green: #00d68f;
    --accent-blue: #4d8eff;
    --accent-purple: #a855f7;
    --accent-red: #ff4d6a;
    --accent-amber: #ffb547;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Top Navigation Bar ────────────────────────────── */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(7, 7, 12, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-brand {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.2s;
}

.nav-brand:hover {
    opacity: 0.8;
}

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

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 6px 12px;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-btn {
    background: rgba(0, 214, 143, 0.12);
    border: 1px solid rgba(0, 214, 143, 0.25);
    color: var(--accent-green);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.nav-btn:hover {
    background: rgba(0, 214, 143, 0.2);
    box-shadow: 0 0 20px rgba(0, 214, 143, 0.15);
}

/* ── Hero Section ──────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 214, 143, 0.08) 0%, rgba(77, 142, 255, 0.04) 40%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(0, 214, 143, 0.1);
    border: 1px solid rgba(0, 214, 143, 0.2);
    color: var(--accent-green);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 800px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero h1 .gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 560px;
    line-height: 1.6;
    margin-top: 20px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* ── URL Input ─────────────────────────────────────── */
.url-form {
    margin-top: 40px;
    width: 100%;
    max-width: 620px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.input-wrapper {
    display: flex;
    gap: 0;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 300ms, box-shadow 300ms;
}

.input-wrapper:focus-within {
    border-color: var(--accent-green);
    box-shadow: var(--glow-green);
}

.input-wrapper input {
    flex: 1;
    padding: 18px 20px;
    font-size: 16px;
    font-family: 'JetBrains Mono', monospace;
    background: transparent;
    border: none;
    color: var(--text-white);
    outline: none;
}

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

.submit-btn {
    padding: 18px 32px;
    background: var(--gradient-main);
    border: none;
    color: white;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 200ms, transform 200ms;
    white-space: nowrap;
}

.submit-btn:hover {
    opacity: 0.9;
}

.submit-btn:active {
    transform: scale(0.97);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Loading State ─────────────────────────────────── */
.loading-state {
    margin-top: 48px;
    text-align: center;
    animation: fadeInUp 0.4s ease-out;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.loading-bar-fill {
    height: 100%;
    width: 30%;
    background: var(--gradient-main);
    border-radius: 2px;
    animation: loadingSlide 1.2s ease-in-out infinite;
}

@keyframes loadingSlide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

.loading-state p {
    color: var(--text-dim);
    font-size: 15px;
}

/* ── Styleboards Results ───────────────────────────── */
.results-section {
    padding: 60px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.results-header p {
    color: var(--text-dim);
    margin-top: 8px;
}

.styleboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.styleboard-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 300ms, border-color 300ms, box-shadow 300ms;
    cursor: pointer;
}

.styleboard-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.styleboard-preview {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.styleboard-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.styleboard-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.styleboard-label.v1 {
    background: rgba(0, 214, 143, 0.2);
    color: var(--accent-green);
}

.styleboard-label.v2 {
    background: rgba(77, 142, 255, 0.2);
    color: var(--accent-blue);
}

.styleboard-label.v3 {
    background: rgba(168, 85, 247, 0.2);
    color: var(--accent-purple);
}

.styleboard-label.v4 {
    background: rgba(255, 181, 71, 0.2);
    color: var(--accent-amber);
}

.styleboard-info {
    padding: 16px;
}

.styleboard-name {
    font-size: 16px;
    font-weight: 700;
}

.styleboard-desc {
    color: var(--text-dim);
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.5;
}

/* ── CTA Section ───────────────────────────────────── */
.cta-section {
    text-align: center;
    padding: 60px 24px;
    animation: fadeInUp 0.6s ease-out;
}

.cta-section h2 {
    font-size: 28px;
    font-weight: 800;
}

.cta-section p {
    color: var(--text-dim);
    margin: 12px 0 24px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--gradient-main);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 200ms, transform 200ms;
    text-decoration: none;
}

.btn-cta:hover {
    opacity: 0.9;
}

.btn-cta:active {
    transform: scale(0.97);
}

/* ── Animations ────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Error Message ─────────────────────────────────── */
.error-msg {
    margin-top: 16px;
    padding: 12px 20px;
    background: rgba(255, 77, 106, 0.1);
    border: 1px solid rgba(255, 77, 106, 0.2);
    border-radius: 10px;
    color: var(--accent-red);
    font-size: 14px;
    animation: fadeInUp 0.3s ease-out;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 640px) {
    .input-wrapper {
        flex-direction: column;
        border-radius: 12px;
    }

    .submit-btn {
        border-radius: 0 0 11px 11px;
    }

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