/* ===========================================================
   SaaS Clipping — Design System (Vibrant Light)
   =========================================================== */

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

:root {
    /* Brand */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #a855f7;
    --pink: #ec4899;
    --accent: #06b6d4;

    /* Feedback */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Neutrals (slate) */
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-2: #f1f3fb;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e6e9f4;

    /* Effects */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
    --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
    --shadow: 0 12px 30px -10px rgba(79,70,229,.20);
    --shadow-lg: 0 26px 60px -14px rgba(124,58,237,.36);
    --glow-primary: 0 10px 30px -6px rgba(99,102,241,.55);
    --glow-pink: 0 10px 30px -6px rgba(236,72,153,.45);
    --glow-cyan: 0 10px 30px -6px rgba(6,182,212,.45);
    --ring: 0 0 0 4px rgba(99,102,241,.18);

    /* Gradients */
    --grad: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --grad-vivid: linear-gradient(120deg, #06b6d4 0%, #6366f1 45%, #ec4899 100%);
    --grad-soft: linear-gradient(135deg, #eef2ff 0%, #faf5ff 55%, #fdf2f8 100%);
    --transition: .2s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.muted { color: var(--text-muted); }
.small { font-size: 13px; }

/* Floating decorative blobs (reusable) */
@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -24px) scale(1.08); }
    66%      { transform: translate(-22px, 18px) scale(.96); }
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* shine sweep */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-18deg);
    transition: left .6s ease;
    pointer-events: none;
}
.btn:hover::after { left: 140%; }

.btn-primary {
    background: var(--grad);
    background-size: 180% 180%;
    color: #fff;
    box-shadow: var(--glow-primary);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-outline {
    background: var(--surface);
    color: var(--primary-dark);
    border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost::after { display: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-large { padding: 15px 30px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* Pulsing glow on the main CTA */
@keyframes ctaPulse {
    0%, 100% { box-shadow: var(--glow-primary); }
    50%      { box-shadow: 0 14px 40px -4px rgba(168,85,247,.6); }
}
.hero-cta .btn-primary { animation: ctaPulse 2.8s ease-in-out infinite; }

/* ---------- Header ---------- */
.header {
    background: rgba(255,255,255,.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
    padding: 0 24px;
}
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.logo h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--grad);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease infinite;
    transition: transform var(--transition);
}
.logo:hover h1 { transform: translateX(1px); }

/* Logo mark — badge em gradiente suave com o emoji da marca */
.logo-mark {
    -webkit-text-fill-color: initial;     /* não some quando dentro de texto com gradiente */
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    font-size: 21px; line-height: 1;
    background: var(--grad-soft);
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.22), 0 8px 18px -10px rgba(99,102,241,.6);
    transition: transform var(--transition), box-shadow var(--transition);
}
.logo:hover .logo-mark { transform: rotate(-7deg) scale(1.07); box-shadow: inset 0 0 0 1px rgba(99,102,241,.35), 0 12px 22px -10px rgba(168,85,247,.7); }
.logo-mark.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 30px; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 100%; height: 2px;
    background: var(--grad);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { transform: scaleX(1); }
.user-name { color: var(--text); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 96px 24px 104px;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(236,72,153,.16), transparent 60%),
        radial-gradient(800px 400px at 0% 0%, rgba(99,102,241,.18), transparent 55%),
        var(--grad-soft);
    overflow: hidden;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: .55;
    z-index: 0;
    pointer-events: none;
    animation: floatBlob 20s ease-in-out infinite;
}
.hero::before { width: 440px; height: 440px; background: var(--secondary); top: -130px; right: -70px; }
.hero::after  { width: 400px; height: 400px; background: var(--accent); bottom: -150px; left: -60px; animation-delay: -10s; }
.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 56px;
    align-items: center;
}
.hero-title {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.06;
    margin-bottom: 22px;
    color: var(--text);
}
.hero-title span,
.hero-title .accent {
    background: var(--grad-vivid);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
}
.hero-subtitle { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; max-width: 540px; }
.hero-cta { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero-note { font-size: 14px; color: var(--text-muted); }

/* Hero entrance */
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-content { animation: heroIn .7s cubic-bezier(.4,0,.2,1) both; }
.hero-image { animation: heroIn .7s cubic-bezier(.4,0,.2,1) .12s both; }

/* Demo mockup */
@keyframes floatY { 0%,100% { transform: perspective(1200px) rotateY(-4deg) rotateX(3deg) translateY(0); } 50% { transform: perspective(1200px) rotateY(-4deg) rotateX(3deg) translateY(-12px); } }
.demo-mockup {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1200px) rotateY(-4deg) rotateX(3deg);
    animation: floatY 6s ease-in-out infinite;
    transition: transform var(--transition);
}
.demo-mockup:hover { animation-play-state: paused; transform: perspective(1200px) rotateY(0deg) rotateX(0deg) translateY(-6px); }
.mockup-header { background: var(--surface-2); padding: 14px 16px; display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ef4444; } .dot.yellow { background: #f59e0b; } .dot.green { background: #10b981; }
.mockup-body { padding: 24px; }
.input-group { display: flex; gap: 10px; margin-bottom: 20px; }
.input-group input {
    flex: 1; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: 10px; font-size: 14px; background: var(--surface-2);
}
.video-list { display: flex; flex-direction: column; gap: 10px; }
.video-item {
    display: flex; gap: 12px; padding: 12px; background: var(--surface-2);
    border: 1px solid var(--border); border-radius: 12px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.video-item:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.video-thumb {
    width: 56px; height: 40px; background: var(--grad); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.video-info { flex: 1; }
.video-title { font-weight: 600; font-size: 14px; }
.video-status { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Sections ---------- */
.features, .pricing { padding: 88px 24px; }
.features { background: var(--surface); }
.pricing { position: relative; background: var(--bg); overflow: hidden; }
.pricing::before {
    content: "";
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,.12), transparent 70%);
    top: -160px; left: 50%; transform: translateX(-50%);
    pointer-events: none;
}
.section-title {
    text-align: center; font-size: clamp(28px, 4vw, 38px); font-weight: 800;
    letter-spacing: -.02em; margin-bottom: 12px;
}
.section-title + .section-sub { text-align: center; color: var(--text-muted); margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.feature-card {
    position: relative;
    padding: 32px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); text-align: left;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.feature-card::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--grad);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
    font-size: 28px; border-radius: 14px; background: var(--grad-soft); margin-bottom: 18px;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.12);
    transition: transform var(--transition);
}
.feature-card:hover .feature-icon { transform: translateY(-3px) rotate(-4deg) scale(1.06); }
.feature-card h3 { font-size: 19px; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); }

/* ---------- Pricing ---------- */
.pricing-card {
    position: relative;
    max-width: 420px; margin: 48px auto 0; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-header { background: var(--grad); background-size: 180% 180%; color: #fff; padding: 36px; text-align: center; animation: gradientShift 7s ease infinite; }
.pricing-header h3 { font-weight: 600; opacity: .95; }
.price { font-size: 50px; font-weight: 900; margin-top: 10px; letter-spacing: -.02em; }
.price span { font-size: 17px; font-weight: 500; opacity: .85; }
.pricing-body { padding: 32px; }
.pricing-features { list-style: none; margin-bottom: 24px; }
.pricing-features li { padding: 10px 0; border-bottom: 1px dashed var(--border); color: var(--text); }
.pricing-features li:last-child { border-bottom: none; }
.pricing-trial {
    text-align: center; padding: 14px; background: var(--grad-soft);
    border-radius: 12px; margin-bottom: 24px; font-size: 15px;
}

/* ---------- Footer ---------- */
.footer { background: #0b1020; color: #cbd5e1; padding: 56px 24px 28px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-section h4 { color: #fff; margin-bottom: 16px; font-size: 15px; }
.footer-section p { color: #94a3b8; }
.footer-section a { display: block; color: #94a3b8; text-decoration: none; margin-bottom: 10px; transition: color var(--transition), transform var(--transition); }
.footer-section a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); color: #64748b; }

/* ---------- Auth pages (light vibrant) ---------- */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 450px at 12% 0%, rgba(99,102,241,.20), transparent 60%),
        radial-gradient(800px 450px at 100% 100%, rgba(236,72,153,.18), transparent 60%),
        var(--grad-soft);
}
.auth-page::before, .auth-page::after {
    content: "";
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; z-index: 0;
    animation: floatBlob 22s ease-in-out infinite;
}
.auth-page::before { width: 360px; height: 360px; background: var(--secondary); top: -120px; left: -80px; }
.auth-page::after  { width: 340px; height: 340px; background: var(--accent); bottom: -120px; right: -70px; animation-delay: -11s; }
.auth-container { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.auth-card {
    background: rgba(255,255,255,.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-radius: var(--radius-lg); padding: 40px 36px;
    box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.6);
    animation: heroIn .6s cubic-bezier(.4,0,.2,1) both;
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 24px; margin-bottom: 8px;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-header p { color: var(--text-muted); }
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-weight: 600; font-size: 13px; color: var(--text); }
.form-group input, .form-group textarea {
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; font-family: inherit; background: var(--surface-2);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); background: var(--surface); box-shadow: var(--ring);
}
.form-group small { color: var(--text-muted); font-size: 12px; }

.error-message { padding: 12px 14px; background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; border-radius: 10px; font-size: 14px; }
.auth-footer { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 14px; }
.auth-footer p { margin-top: 6px; }
.auth-footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ---------- Dashboard ---------- */
.header-dashboard { background: rgba(255,255,255,.78); }
.dashboard {
    position: relative;
    padding: 36px 24px 64px;
    min-height: calc(100vh - 68px);
    background:
        radial-gradient(700px 360px at 100% -5%, rgba(168,85,247,.10), transparent 60%),
        radial-gradient(600px 320px at 0% 0%, rgba(6,182,212,.08), transparent 55%);
}
.dashboard .container { position: relative; z-index: 1; }

/* Generic entrance for cards (also fires for JS-injected nodes).
   fill-mode: backwards keeps hover transforms working after entrance. */
@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.subscription-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff; padding: 18px 24px; border-radius: var(--radius); margin-bottom: 28px;
    box-shadow: 0 12px 28px -10px rgba(16,185,129,.5); display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    animation: riseIn .5s cubic-bezier(.4,0,.2,1) backwards;
}
.subscription-banner.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 12px 28px -10px rgba(245,158,11,.5); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 36px; }
.stat-card {
    position: relative; overflow: hidden;
    background: var(--surface); padding: 22px; border-radius: var(--radius);
    border: 1px solid var(--border); display: flex; gap: 16px; align-items: center;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    animation: riseIn .5s cubic-bezier(.4,0,.2,1) backwards;
}
.stat-card::after {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--grad); opacity: 0; transition: opacity var(--transition);
}
.stat-card:nth-child(1) { animation-delay: .04s; }
.stat-card:nth-child(2) { animation-delay: .10s; }
.stat-card:nth-child(3) { animation-delay: .16s; }
.stat-card:nth-child(4) { animation-delay: .22s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d6d9ec; }
.stat-card:hover::after { opacity: 1; }
.stat-icon {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; background: var(--grad-soft);
    display: flex; align-items: center; justify-content: center; font-size: 24px;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.12);
}
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-muted); }

.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.dashboard-header h2 { font-size: 22px; font-weight: 700; }

.queues-list { display: grid; gap: 14px; }
.queue-card {
    background: var(--surface); padding: 20px 22px; border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow-xs);
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    animation: riseIn .5s cubic-bezier(.4,0,.2,1) backwards;
}
.queue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6d9ec; }
.queue-info h3 { font-size: 17px; margin-bottom: 6px; }
.queue-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.queue-actions { display: flex; gap: 10px; align-items: center; }

/* Status pills (shared) */
.queue-status { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.queue-status.draft { background: var(--surface-2); color: var(--text-muted); }
.queue-status.pending { background: #dbeafe; color: #1d4ed8; }
.queue-status.processing { background: #fef3c7; color: #b45309; }
.queue-status.completed { background: #d1fae5; color: #047857; }
.queue-status.failed { background: #fee2e2; color: #b91c1c; }
.queue-status.cancelled { background: var(--surface-2); color: var(--text-muted); }

.empty-state {
    text-align: center; padding: 72px 24px; color: var(--text-muted);
    background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
    animation: riseIn .5s cubic-bezier(.4,0,.2,1) backwards;
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.empty-state p { margin-bottom: 20px; }

/* ---------- Queue Detail ---------- */
.loading-state { text-align: center; padding: 80px 0; color: var(--text-muted); }
.spinner {
    width: 40px; height: 40px; margin: 0 auto 16px; border-radius: 50%;
    border: 4px solid var(--surface-2); border-top-color: var(--primary); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.breadcrumb { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.breadcrumb:hover { color: var(--primary); }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.detail-header h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; }
.detail-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.detail-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 36px; max-width: 560px; }
.detail-stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.detail-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.detail-stat-label { display: block; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-stat-value { font-size: 24px; font-weight: 800; }

.section-subtitle { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.videos-detail-list { display: grid; gap: 14px; }
.video-detail-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow-xs);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    animation: riseIn .5s cubic-bezier(.4,0,.2,1) backwards;
}
.video-detail-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d6d9ec; }
.video-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.video-detail-title { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.vd-icon { font-size: 18px; }
.video-tag { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.video-tag.pending { background: var(--surface-2); color: var(--text-muted); }
.video-tag.processing { background: #fef3c7; color: #b45309; }
.video-tag.completed { background: #d1fae5; color: #047857; }
.video-tag.failed { background: #fee2e2; color: #b91c1c; }

.transcription-box {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
    padding: 16px 18px; font-size: 14px; line-height: 1.7; white-space: pre-wrap;
    max-height: 340px; overflow-y: auto; font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.transcription-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
    background: var(--surface); border-radius: var(--radius-lg); max-width: 520px; width: 100%;
    max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: popIn .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-large { max-width: 720px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 18px; }
.modal-close { background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); gap: 16px; }
.price-summary { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
#pricePreview { font-weight: 800; font-size: 18px; }

/* Video selection */
.video-selection-list { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.video-select-item {
    display: flex; gap: 12px; padding: 12px; background: var(--surface-2);
    border: 2px solid transparent; border-radius: 12px; cursor: pointer; transition: all var(--transition);
}
.video-select-item:hover { background: #e9ecf6; }
.video-select-item.selected { background: var(--grad-soft); border-color: var(--primary); }
.video-select-item input[type="checkbox"] { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--primary); }
.video-select-thumb {
    width: 72px; height: 54px; background: var(--grad); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.video-select-info { flex: 1; }
.video-select-title { font-weight: 600; margin-bottom: 4px; }
.video-select-meta { font-size: 12px; color: var(--text-muted); }

/* Payment modal */
.qr-container { margin: 18px auto; display: flex; justify-content: center; }
.qr-container img { width: 220px; height: 220px; border-radius: 12px; border: 1px solid var(--border); }
.qr-placeholder {
    width: 220px; height: 220px; border-radius: 12px; border: 2px dashed var(--border);
    display: flex; align-items: center; justify-content: center; text-align: center; color: var(--text-muted);
}
.pix-code { text-align: left; margin: 18px 0; }
.pix-code label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.pix-code-row { display: flex; gap: 8px; margin-top: 6px; }
.pix-code-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; background: var(--surface-2); }
.price-big { font-size: 24px; font-weight: 800; margin: 8px 0; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--text); color: #fff; padding: 12px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 500; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
    transition: opacity var(--transition), transform var(--transition); z-index: 2000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Scroll reveal (landing) ---------- */
.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
.reveal-ready .reveal.delay-1 { transition-delay: .08s; }
.reveal-ready .reveal.delay-2 { transition-delay: .16s; }
.reveal-ready .reveal.delay-3 { transition-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-image { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .detail-stats { grid-template-columns: 1fr; }
    .nav-link { display: none; }
    .queue-card { flex-direction: column; align-items: flex-start; }
    .detail-header { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal-ready .reveal { opacity: 1 !important; transform: none !important; }
}
