:root {
    --bg: #0a0510;
    --bg-2: #150a1c;
    --card: rgba(28, 16, 38, 0.6);
    --card-border: rgba(255, 90, 90, 0.18);
    --text: #f3eef7;
    --muted: #b9a9c9;
    --red: #ff4d4d;
    --orange: #ff8a3d;
    --pink: #ff4fa3;
    --grad: linear-gradient(90deg, #ff4d4d 0%, #ff8a3d 50%, #ff4fa3 100%);
    --grad-pink: linear-gradient(90deg, #ff8a3d 0%, #ff4fa3 100%);
}

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

html, body { max-width: 100%; overflow-x: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(900px 500px at 50% -5%, rgba(120, 20, 60, 0.55), transparent 60%),
        radial-gradient(700px 500px at 90% 10%, rgba(80, 20, 120, 0.35), transparent 60%),
        var(--bg);
    min-height: 100vh;
    line-height: 1.6;
    overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.nav {
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}
.brand { justify-self: start; }
.nav-links { grid-column: 2; justify-self: center; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--grad);
}
.brand-name {
    background: var(--grad-pink);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 26px; font-size: 15px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 12px; }

/* Hamburger button (hidden on desktop) */
.nav-toggle {
    grid-column: 3; justify-self: end;
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 9px; border-radius: 10px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
}
.nav-toggle span {
    display: block; height: 2px; width: 100%; border-radius: 2px;
    background: var(--text); transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
    cursor: pointer; border: 0; transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.18); }
.btn-grad { background: var(--grad-pink); color: #fff; }

/* ---------- Layout ---------- */
.main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }

/* ---------- Hero ---------- */
.hero { text-align: center; max-width: 960px; margin: 0 auto; }
.badge {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 8px 18px; border-radius: 999px; margin: 20px 0 34px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
    font-weight: 600; font-size: 15px;
}
.badge-ico {
    display: inline-grid; place-items: center; width: 26px; height: 26px;
    border-radius: 7px; background: var(--grad);
}
.badge-free {
    padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
    background: rgba(255, 79, 163, 0.18); color: var(--pink);
}

.hero-title { font-size: clamp(36px, 8vw, 104px); font-weight: 900; letter-spacing: -2px; line-height: 1; overflow-wrap: anywhere; }
.hero-line2 { color: #fff; }
.grad-red {
    background: linear-gradient(90deg, #ff3b3b, #ff6a3d);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-pink {
    background: var(--grad-pink);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: clamp(16px, 2vw, 20px); margin: 26px auto 0; max-width: 640px; }
.hero-sub strong { color: var(--text); }

.pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 34px 0; }
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-green { background: #35d07f; box-shadow: 0 0 8px #35d07f; }

/* ---------- Paste card ---------- */
.paste-card {
    margin: 40px auto 0; max-width: 900px; padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(40,20,60,0.55), rgba(20,10,30,0.55));
    border: 1px solid rgba(120, 90, 220, 0.35);
    box-shadow: 0 0 60px rgba(120, 40, 160, 0.25);
}
.paste-row {
    display: flex; align-items: center; gap: 12px;
    background: rgba(10,6,16,0.7); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 8px 8px 8px 16px;
}
.paste-ico { font-size: 18px; opacity: .8; }
.paste-input {
    flex: 1; background: transparent; border: 0; outline: 0;
    color: var(--text); font-size: 16px; padding: 12px 0;
}
.paste-input::placeholder { color: #7c6c8c; }
.btn-paste {
    flex: 0 0 auto; padding: 9px 15px; font-size: 14px; white-space: nowrap;
    background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid rgba(255,255,255,0.12);
}
.paste-input { min-width: 0; }
.btn-getvideo {
    width: 100%; margin-top: 16px; padding: 18px; font-size: 18px;
    background: linear-gradient(180deg, rgba(90,60,150,0.55), rgba(50,30,90,0.55));
    border: 1px solid rgba(140,110,230,0.4); color: #fff;
}
.btn-getvideo:hover { background: var(--grad); border-color: transparent; }

/* ---------- Preview mode: collapse marketing, bring thumbnail up ---------- */
body.preview-mode .badge,
body.preview-mode .hero-title,
body.preview-mode .hero-sub,
body.preview-mode .pills { display: none; }
body.preview-mode .main { padding-top: 20px; }
body.preview-mode .paste-card { margin-top: 0; }
/* Keep some breathing room before the stats/sections below the preview. */
body.preview-mode .stats { margin-top: 34px; }

/* ---------- Preview (thumbnail + play) ---------- */
.preview-loading { margin-top: 18px; }
.preview-loading .progress { margin: 8px auto 10px; }

.preview { margin-top: 18px; }
.thumb {
    position: relative; display: block; width: 100%; padding: 0; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; overflow: hidden;
    background: #000; aspect-ratio: 16 / 9;
}
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 74px; height: 74px; border-radius: 50%;
    background: rgba(0,0,0,0.55); border: 2px solid rgba(255,255,255,0.85);
    display: grid; place-items: center; transition: transform .15s ease, background .15s ease;
}
.play-icon::before {
    content: ""; margin-left: 5px;
    border-style: solid; border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent #fff;
}
.thumb:hover .play-icon { transform: translate(-50%, -50%) scale(1.08); background: var(--grad); border-color: transparent; }

.preview .video-title { text-align: center; margin: 14px auto 0; }
.preview .btn-getvideo { margin-top: 14px; }

.preview-error {
    margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: 15px;
    color: #ffb3b3; background: rgba(255,60,60,0.1); border: 1px solid rgba(255,60,60,0.25);
}

/* ---------- Stats ---------- */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-top: 44px;
}
.stat {
    padding: 22px 12px; border-radius: 16px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
}
.stat-num { font-size: clamp(24px, 3.5vw, 34px); font-weight: 900; }
.stat-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ---------- Landing sections ---------- */
.section { max-width: 1100px; margin: 90px auto 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-title { font-size: clamp(28px, 5vw, 44px); font-weight: 900; letter-spacing: -1px; }
.section-sub { color: var(--muted); font-size: 17px; margin-top: 12px; }

.feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.feature-card {
    padding: 26px; border-radius: 18px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
    transition: transform .15s ease, border-color .15s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--card-border); }
.feature-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
    padding: 30px 24px; border-radius: 18px; text-align: center;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
}
.step-num {
    width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%;
    display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #fff;
    background: var(--grad);
}
.step h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
    border-radius: 14px; padding: 4px 20px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
}
.faq-item summary {
    cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 17px;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--pink); font-size: 24px; font-weight: 700; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--muted); font-size: 15px; padding: 0 0 18px; }

/* ---------- Result / player ---------- */
.result { max-width: 900px; margin: 20px auto; text-align: center; }
.result-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin-bottom: 10px; }
.result-sub { color: var(--muted); font-size: 17px; margin-bottom: 24px; }
.result-meta { color: var(--muted); font-size: 15px; margin-top: 6px; letter-spacing: .5px; }
.video-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 16px auto 0; max-width: 700px; }

/* ---------- Loading bar ---------- */
.loading { padding: 30px 0; }
.progress {
    max-width: 480px; height: 8px; margin: 30px auto 16px;
    border-radius: 999px; overflow: hidden;
    background: rgba(255,255,255,0.08);
}
.progress-bar {
    height: 100%; width: 40%; border-radius: 999px;
    background: var(--grad);
    animation: progress-slide 1.1s ease-in-out infinite;
}
@keyframes progress-slide {
    0%   { margin-left: -40%; }
    100% { margin-left: 100%; }
}
.loading-note { color: var(--muted); font-size: 14px; }
.player-wrap {
    border-radius: 18px; overflow: hidden; margin: 24px 0;
    border: 1px solid rgba(255,255,255,0.1); background: #000;
}
.player { width: 100%; max-height: 70vh; display: block; }
.result-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.result-back { margin-top: 22px; }

/* ---------- Content pages ---------- */
.page { max-width: 820px; margin: 0 auto; }
.page h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.page .updated { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.page h2 { font-size: 22px; font-weight: 700; margin: 28px 0 10px; }
.page p, .page li { color: #d9cfe6; margin-bottom: 12px; }
.page ul { padding-left: 22px; }
.page a.inline { color: var(--pink); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 60px; padding: 40px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: #7c6c8c; font-size: 13px; max-width: 640px; margin: 0 auto; }

/* ---------- Responsive ---------- */

/* Tablet */
@media (max-width: 900px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .section { margin-top: 64px; }
}

/* Small tablet / large phone */
@media (max-width: 820px) {
    .nav { padding: 14px 16px; position: relative; z-index: 50; }
    .nav-inner { grid-template-columns: 1fr auto; }
    .nav-toggle { display: flex; grid-column: 2; }

    /* Nav links become an overlay dropdown panel below the header */
    .nav-links {
        grid-column: 1 / -1;
        justify-self: stretch;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 6px 16px 14px;
        background: #140a1c;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 15px 4px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        font-size: 16px;
    }
    .nav-links a:last-child { border-bottom: 0; }

    .main { padding: 28px 16px 60px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Phone */
@media (max-width: 560px) {
    .nav-inner { flex-wrap: wrap; gap: 12px; }
    .brand { font-size: 18px; }
    .nav-actions { gap: 8px; }
    .btn { padding: 9px 14px; font-size: 14px; }

    .hero-title { font-size: 44px; letter-spacing: -1px; }
    .hero-sub { font-size: 16px; }

    .badge { font-size: 13px; padding: 7px 14px; }
    .pills { gap: 8px; }
    .pill { font-size: 13px; padding: 8px 13px; }

    .paste-card { padding: 14px; border-radius: 18px; }
    .paste-row { padding: 8px 12px; }
    .btn-getvideo { padding: 15px; font-size: 16px; }

    .feature-grid { grid-template-columns: 1fr; }
    .stats { gap: 10px; }
    .stat { padding: 16px 8px; }

    .section-title { font-size: 26px; }
    .footer-links { gap: 14px; }
}

/* Very small phone */
@media (max-width: 380px) {
    .hero-title { font-size: 36px; }
    .stats { grid-template-columns: 1fr; }
}
