/* ===== ShortsForge — Dark Theme ===== */

:root {
    --bg-0: #0b0d12;
    --bg-1: #11141b;
    --bg-2: #181c25;
    --bg-3: #1f2430;
    --border: #262c39;
    --border-soft: #1c2230;

    --text-0: #f3f5f9;
    --text-1: #c8cdd9;
    --text-2: #8a93a6;
    --text-muted: #6b7385;

    --accent: #ff3d6e;
    --accent-2: #6c5cff;
    --accent-grad: linear-gradient(135deg, #ff3d6e 0%, #ff7a3d 50%, #6c5cff 100%);

    --success: #2ecc71;
    --warn: #f0b429;
    --error: #ff5a5f;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;

    --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-2: 0 8px 24px rgba(0,0,0,0.45);
    --shadow-glow: 0 0 0 1px rgba(108,92,255,0.25), 0 8px 32px rgba(255,61,110,0.15);

    --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(108,92,255,0.18), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(255,61,110,0.12), transparent 60%),
        var(--bg-0);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #ff6b8e; }

h1, h2, h3, h4 { color: var(--text-0); margin: 0 0 .5em; line-height: 1.2; font-weight: 600; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { color: var(--text-1); margin: .25em 0 1em; }
.muted { color: var(--text-muted) !important; }
.small { font-size: 0.85rem; }
.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

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

/* ---- Header ---- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11,13,18,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-soft);
}
.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-0);
    font-weight: 700;
    font-size: 1.05rem;
}
.brand:hover { color: var(--text-0); }
.brand-logo {
    height: 42px;
    width: auto;
    display: block;
    transform: scale(1.18);
    transform-origin: left center;
}
.brand-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--accent-grad);
    display: grid; place-items: center;
    font-weight: 800; font-size: .8rem; color: #fff;
    box-shadow: var(--shadow-1);
}
.nav-primary { display: flex; gap: 18px; flex: 1; }
.nav-primary a {
    color: var(--text-1);
    font-weight: 500;
    padding: 8px 4px;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.nav-primary a:hover { color: var(--text-0); border-bottom-color: var(--accent); }

.user-area { display: flex; align-items: center; gap: 12px; }
.user-name { color: var(--text-2); font-size: .9rem; }
.logout-form { display: inline; margin: 0; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border-radius: var(--radius);
    padding: 4px 6px;
    margin: -4px -6px;
    transition: background .15s;
}
.user-chip:hover { background: var(--bg-2); }
.mobile-menu-toggle,
.mobile-menu {
    display: none;
}
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}
.user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-0);
    background: var(--bg-3);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform .08s, background .15s, border-color .15s, opacity .15s;
    text-decoration: none;
    background: var(--bg-2);
    color: var(--text-0);
}
.btn:hover { background: var(--bg-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
    background: var(--accent-grad);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-1);
}
.btn-primary:hover {
    background: var(--accent-grad);
    filter: brightness(1.08);
    color: #fff;
}

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

.btn-lg { padding: 13px 24px; font-size: 1rem; }

/* Google sign-in button */
.btn-google {
    background: var(--bg-2);
    color: var(--text-0);
    border: 1px solid var(--border);
    font-weight: 500;
    box-shadow: var(--shadow-1);
}
.btn-google:hover {
    background: var(--bg-3);
    color: var(--text-0);
    border-color: var(--accent-2);
}
.btn-google:active { transform: translateY(1px); }
.google-icon { display: block; flex-shrink: 0; }

/* ---- Main / Footer ---- */
.main { padding: 32px 0 64px; }
.app-footer {
    border-top: 1px solid var(--border-soft);
    padding: 24px 0;
    color: var(--text-muted);
    font-size: .85rem;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-credit {
    margin-top: 8px;
    font-size: .75rem;
    color: var(--text-muted);
    opacity: 0.7;
}
.footer-credit a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-credit a:hover {
    opacity: 1;
    color: var(--text-primary, #fff);
}

/* ---- Cards ---- */
.card {
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-1);
}

.empty-state { text-align: center; padding: 48px 24px; }
.youtube-connect-state {
    max-width: 620px;
    margin: 28px auto;
    padding: 42px 32px;
    border-color: rgba(255, 61, 110, .28);
    background:
        linear-gradient(180deg, rgba(255, 0, 0, .08), rgba(255, 61, 110, .025) 46%, rgba(17, 20, 27, .96)),
        var(--bg-1);
    box-shadow: 0 18px 50px rgba(0,0,0,.28), 0 0 0 1px rgba(255, 61, 110, .06);
}
.youtube-connect-state h3 {
    margin-bottom: 8px;
    font-size: 1.22rem;
}
.youtube-connect-state p {
    max-width: 440px;
    margin: 0 auto 22px;
    color: var(--text-1);
}
.youtube-connect-state .btn {
    min-height: 44px;
    padding-inline: 18px;
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
}
.youtube-connect-state .btn:hover {
    border-color: rgba(255, 0, 0, .55);
    background: rgba(255, 0, 0, .14);
    box-shadow: 0 10px 28px rgba(255, 0, 0, .14);
}
.youtube-connect-icon {
    width: 68px;
    height: 48px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255,255,255,.05);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 30px rgba(255,0,0,.16);
}
.youtube-connect-icon svg {
    width: 54px;
    height: 54px;
    fill: #ff0033;
    filter: drop-shadow(0 8px 16px rgba(255,0,0,.24));
}
.youtube-connect-play {
    fill: #fff;
}
.youtube-connect-btn-icon {
    width: 22px;
    height: 22px;
    fill: #ff0033;
    flex-shrink: 0;
}

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.alert-error { background: rgba(255,90,95,.1); border-color: var(--error); color: var(--error); }

/* ---- Hero ---- */
.hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}
.hero-content { position: relative; max-width: 800px; z-index: 2; }
.hero-title { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 700; line-height: 1.1; margin-bottom: 16px; }
.hero-sub { font-size: 1.15rem; color: var(--text-1); max-width: 680px; }
.hero-cta { margin-top: 28px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-note { color: var(--text-muted); font-size: .85rem; }

.hero-art { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.orb-1 { width: 320px; height: 320px; background: #ff3d6e; top: -40px; right: -60px; }
.orb-2 { width: 260px; height: 260px; background: #6c5cff; top: 80px; right: 220px; }
.orb-3 { width: 200px; height: 200px; background: #ff7a3d; top: 220px; right: -40px; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.feature {
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.feature-icon { font-size: 1.6rem; margin-bottom: 12px; }

/* ---- Content pages ---- */
.content-shell {
    max-width: 860px;
}
.content-shell h1 {
    margin-bottom: 12px;
}
.content-shell h2 {
    margin-top: 28px;
}
.content-shell ul {
    margin: 0 0 18px;
    padding-left: 20px;
    color: var(--text-1);
}
.content-shell li {
    margin-bottom: 10px;
}

/* ---- Dashboard ---- */
.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.stat-pill {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    text-align: center;
}
.stat-num { display: block; font-size: 1.6rem; font-weight: 700; }
.stat-label { font-size: .8rem; color: var(--text-muted); }

/* Toolbar / sort tabs */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}
.dashboard-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(100%, 420px);
    flex: 1;
}
.dashboard-search input[type=search] {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-0);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .95rem;
}
.dashboard-search input[type=search]:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(108,92,255,.18);
}
.dashboard-load-more {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}
.sort-tabs {
    display: inline-flex;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}
.sort-tab {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: .9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.sort-tab:hover { color: var(--text-0); }
.sort-tab.active {
    background: var(--accent, #6e8bff);
    color: #fff;
    font-weight: 600;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    color: var(--text-0);
    display: flex;
    flex-direction: column;
}
.video-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-2);
    color: var(--text-0);
}

.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-3);
    overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-duration {
    position: absolute;
    right: 8px; bottom: 8px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: .75rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.video-meta { padding: 12px 14px 16px; }
.video-title {
    font-size: .95rem;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-stats { color: var(--text-muted); font-size: .8rem; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Admin ---- */
.admin-login-shell {
    min-height: calc(100vh - 220px);
    display: grid;
    place-items: center;
}
.admin-login-card {
    width: 100%;
    max-width: 520px;
    margin: 12px auto 0;
    border-color: rgba(108,92,255,.25);
    box-shadow: var(--shadow-glow);
}
.admin-login-head { margin-bottom: 14px; }
.admin-login-form {
    margin-top: 16px;
}
.admin-login-form .alert:empty {
    display: none;
}
.admin-login-btn { width: 100%; }
.admin-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-2);
}
.admin-hero {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
}
.admin-hero-copy h1 { margin-bottom: 6px; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.admin-stat {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
}
.admin-stat-value {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.1;
}
.admin-stat-label {
    color: var(--text-2);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.admin-panel-card {
    padding-top: 18px;
}
.admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.table-wrap {
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: var(--bg-1);
    border-radius: 12px;
    overflow: hidden;
}
.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
.admin-table th {
    color: var(--text-2);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: rgba(255,255,255,.02);
}
.admin-table tbody tr:hover td {
    background: rgba(255,255,255,.015);
}

/* ---- Video Details ---- */
.back-link {
    display: inline-block;
    color: var(--text-2);
    margin-bottom: 16px;
    font-size: .9rem;
}
.back-link:hover { color: var(--text-0); }

.video-details {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.player-wrap {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}
.player-wrap iframe { width: 100%; height: 100%; border: 0; }

.video-info {
    background: rgba(17,20,27,.74);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.video-info .video-stats { gap: 16px; margin: 8px 0 16px; }
.video-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}
.video-info-tile {
    background: rgba(24,28,37,.62);
    border: 1px solid rgba(38,44,57,.72);
    border-radius: var(--radius);
    padding: 11px 12px;
}
.video-info-label {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: .75rem;
}
.video-info-tile strong {
    display: block;
    color: var(--text-0);
    font-size: .95rem;
    line-height: 1.25;
}
.desc summary { cursor: pointer; color: var(--text-2); }
.desc pre { white-space: pre-wrap; word-wrap: break-word; color: var(--text-1); font-family: inherit; font-size: .9rem; margin-top: 8px; }

.generator-panel {
    position: relative;
    border-color: rgba(108,92,255,.32);
    background:
        linear-gradient(180deg, rgba(108,92,255,.08), transparent 34%),
        var(--bg-1);
    box-shadow: 0 0 0 1px rgba(108,92,255,.06), var(--shadow-1);
}
.generator-head,
.generator-action-row,
.duration-label-row,
.format-control {
    display: flex;
    align-items: center;
    gap: 14px;
}
.generator-head {
    justify-content: space-between;
    margin-bottom: 18px;
}
.generator-head h2 { margin-bottom: 4px; }
.generator-head p,
.generator-action-row p { margin: 0; }
.generator-cost-pill {
    flex: 0 0 auto;
    border: 1px solid rgba(46,204,113,.28);
    border-radius: 999px;
    background: rgba(46,204,113,.09);
    color: var(--success);
    padding: 6px 12px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s, background .15s, border-color .15s, box-shadow .15s;
}
.generator-cost-pill:hover {
    filter: brightness(1.12);
    background: rgba(46,204,113,.13);
    border-color: rgba(46,204,113,.42);
    box-shadow: 0 6px 18px rgba(46,204,113,.12);
}
.generation-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr);
    gap: 22px;
    align-items: end;
    margin-bottom: 16px;
}
.duration-control {
    min-width: 0;
}
.duration-label-row {
    justify-content: space-between;
    margin-bottom: 10px;
}
.duration-label-row label { margin: 0; }
.duration-label-row output {
    color: var(--text-0);
    font-size: .88rem;
    font-weight: 700;
}
input[type=range] {
    width: 100%;
    accent-color: var(--accent);
}
.duration-marks {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: .76rem;
}
.format-control {
    min-height: 48px;
    justify-content: flex-start;
    background: rgba(24,28,37,.72);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
}
.format-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.format-option {
    color: var(--text-0) !important;
    font-size: .9rem !important;
    font-weight: 600;
    margin: 0 !important;
    line-height: 1.2;
}
.format-helper {
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.25;
}
.generator-action-row {
    align-items: center;
    margin-top: 10px;
}
.generator-submit {
    min-width: 300px;
    min-height: 52px;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(255,61,110,.22);
}
.generator-submit:hover {
    background: var(--accent-grad);
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(255,61,110,.28);
}

#shorts-section {
    background: rgba(17,20,27,.82);
    border-color: rgba(28,34,48,.9);
}
#shorts-section .section-head {
    margin-bottom: 14px;
}
#shorts-section .section-head p {
    margin: 0;
}
.shorts-empty-state {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr);
    gap: 20px;
    align-items: center;
    border: 1px dashed rgba(138,147,166,.28);
    border-radius: var(--radius-lg);
    background: rgba(24,28,37,.42);
    padding: 22px;
}
.shorts-empty-state[hidden] { display: none; }
.empty-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.empty-copy strong {
    color: var(--text-0);
    font-size: 1.02rem;
}
.empty-copy span {
    color: var(--text-2);
    font-size: .92rem;
}
.empty-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.empty-preview-card {
    position: relative;
    aspect-ratio: 9 / 12;
    border: 1px solid rgba(38,44,57,.86);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(31,36,48,.92), rgba(17,20,27,.92));
    overflow: hidden;
}
.empty-preview-card span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.09);
}
.empty-preview-card span:nth-child(2) { bottom: 34px; }
.empty-preview-card span:nth-child(3) { bottom: 18px; width: 58%; }
.empty-preview-score {
    top: 10px;
    left: auto !important;
    right: 10px !important;
    width: 34px !important;
    height: 18px !important;
    background: rgba(255,61,110,.34) !important;
}

/* ---- Form ---- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: .85rem; color: var(--text-2); margin-bottom: 6px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: end; }

input[type=text], input[type=number], input[type=email], input[type=password], textarea {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-0);
    padding: 10px 12px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .95rem;
    transition: border-color .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(108,92,255,.18);
}

.prompt-presets {
    margin-top: 10px;
}

.prompt-presets-label {
    margin-bottom: 8px;
    color: var(--text-2);
    font-size: .8rem;
    font-weight: 600;
}

.prompt-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    color: var(--text-1);
    cursor: pointer;
    font-family: var(--font);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 8px 11px;
    transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
}

.prompt-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.prompt-chip:hover {
    background: var(--bg-3);
    border-color: var(--accent-2);
    color: var(--text-0);
}

.prompt-chip:focus-visible {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(108,92,255,.18);
}

.prompt-chip:active {
    transform: translateY(1px);
}

.prompt-chip.active {
    background: rgba(108,92,255,.18);
    border-color: var(--accent-2);
    color: var(--text-0);
    box-shadow: 0 0 0 1px rgba(108,92,255,.18);
}

.prompt-chip.active .prompt-chip-icon {
    background: var(--accent-grad);
    color: #fff;
}

.checkbox-row { display: flex; align-items: center; gap: 12px; padding-top: 24px; color: var(--text-1); }

/* iOS-style switch */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; cursor: pointer;
    inset: 0;
    background-color: var(--bg-3);
    transition: .2s;
    border-radius: 24px;
}
.switch .slider::before {
    position: absolute; content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: #fff;
    transition: .2s;
    border-radius: 50%;
}
.switch input:checked + .slider { background: var(--accent-grad); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
.spinner[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Generation Status ---- */
.generation-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-1);
}
.generation-status.error { border-color: var(--error); color: var(--error); background: rgba(255,90,95,.06); }
.generation-status.success { border-color: var(--success); color: var(--success); background: rgba(46,204,113,.06); }
.generation-status.warning { border-color: var(--warn); color: var(--warn); background: rgba(240,180,41,.07); }

.generation-status .progress-message {
    font-size: 14px;
    margin-bottom: 8px;
}
.generation-status .progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    overflow: hidden;
}
.generation-status .progress-track .bar {
    height: 100%;
    background: var(--accent, #6e8bff);
    border-radius: 999px;
    transition: width .35s ease;
}
.generation-status .progress-track .bar.bar-success { background: var(--success); }
.generation-status .progress-track .bar.bar-error   { background: var(--error); }
.generation-status .progress-percent {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-2, #aaa);
    text-align: right;
}

.generation-results { margin-top: 16px; }
.generation-results .result-item {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--bg-2);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* ---- Shorts list (existing) ---- */
.shorts-list { list-style: none; padding: 0; margin: 0; }
.short-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-2);
    border-radius: var(--radius);
    margin-bottom: 8px;
    gap: 12px;
}
.short-meta { display: flex; flex-direction: column; gap: 4px; }
.short-actions { display: flex; gap: 8px; }

/* ---- Shorts grid (Video Details page) ---- */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.short-card {
    background: var(--bg-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: fadeInShort .25s ease-out;
}
@keyframes fadeInShort {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Thumbnail with play overlay + score badge */
.short-thumb {
    position: relative;
    aspect-ratio: 9/16;
    background: #000;
    overflow: hidden;
    max-height: 320px;
}
.short-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-3);
}
.thumb-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent, #6e8bff);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.18);
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.play-overlay:hover { background: rgba(0,0,0,.36); }
.play-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    padding-left: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    transition: transform .15s;
}
.play-overlay:hover .play-icon { transform: scale(1.08); }

.short-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.short-card-body h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}
.short-desc {
    margin: 6px 0 0 0;
    font-size: .85rem;
    color: var(--text-1);
    white-space: pre-wrap;
    max-height: 4.5em;
    overflow: hidden;
}
.short-reason {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(108,92,255,.24);
    border-radius: var(--radius);
    background: rgba(108,92,255,.1);
    color: var(--text-1);
    font-size: .85rem;
    line-height: 1.4;
}
.short-reason strong {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    color: var(--text-0);
    font-size: .78rem;
}
.short-reason-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: var(--accent);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    flex: 0 0 auto;
}
.short-card-actions {
    display: flex;
    gap: 8px;
    padding: 0 14px 14px 14px;
}
.short-card-actions .btn { flex: 1; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }

/* Score badge — gradient pill on top-right of thumbnail. */
.score-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .9rem;
    color: #fff;
    z-index: 2;
    pointer-events: none;
}
.score-badge.score-high {
    background: linear-gradient(135deg, #ff5f6d 0%, #ffc371 100%);
    box-shadow: 0 2px 12px rgba(255, 95, 109, .45);
}
.score-badge.score-mid {
    background: linear-gradient(135deg, #6e8bff 0%, #8e7bff 100%);
}
.score-badge.score-low {
    background: rgba(0,0,0,.6);
    color: #ddd;
}

/* ---- Modals ---- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFade .15s ease-out;
}
.modal[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.modal-panel {
    position: relative;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: modalSlide .2s ease-out;
}
.modal-panel.preview-panel {
    max-width: 420px;
    padding: 16px;
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg-2); color: var(--text-0); }
.modal-title {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.preview-video-wrap {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 9/16;
    max-height: 70vh;
}
.preview-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.publish-icon {
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 8px;
}

/* ---- Badges ---- */
.badge {
    display: inline-block;
    font-size: .7rem;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: var(--bg-3);
    color: var(--text-1);
    width: fit-content;
}
.badge-completed { background: rgba(46,204,113,.15); color: var(--success); }
.badge-uploaded { background: rgba(108,92,255,.18); color: #a99bff; }
.badge-failed { background: rgba(255,90,95,.15); color: var(--error); }
.badge-uploading, .badge-cutting, .badge-pending, .badge-transcribing, .badge-analyzingmoments, .badge-downloading {
    background: rgba(240,180,41,.15); color: var(--warn);
}

/* ---- Shorts grid (My Shorts page) ---- */
.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.short-card {
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.my-shorts-grid .short-card-video {
    aspect-ratio: 9/16;
    background: #000;
    max-height: 480px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-soft);
}
.my-shorts-grid .short-card-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.short-placeholder { color: var(--text-2); font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.my-shorts-grid .short-card-body {
    padding: 18px 14px 14px;
    flex: 1;
    position: relative;
    z-index: 1;
    background: var(--bg-1);
}
.my-shorts-grid .short-card-body h4 { margin-bottom: 8px; }
.short-card-actions { padding: 12px 14px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.yt-link { display: inline-block; margin-top: 6px; font-size: .85rem; }

/* ============================================================
   RESPONSIVE — mobile-first overrides
   ============================================================ */

/* ---- Shared small-screen utilities ---- */
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .main { padding: 20px 0 48px; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.2rem; }
}

/* ---- Header / Nav ---- */
@media (max-width: 860px) {
    .header-inner {
        gap: 12px;
        height: 64px;
        min-height: 64px;
        flex-wrap: nowrap;
        padding: 8px 0;
    }

    /* Logo: enlarge the padded asset without increasing header height */
    .brand-logo {
        height: 40px;
        transform: scale(1.12);
    }

    .nav-primary { display: none; }

    .mobile-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 42px;
        height: 42px;
        order: 3;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: rgba(17, 20, 27, 0.92);
        color: var(--text-0);
        padding: 0 11px;
        cursor: pointer;
        transition: background .15s, border-color .15s;
    }
    .mobile-menu-toggle:hover {
        background: var(--bg-2);
        border-color: var(--accent);
    }
    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform .15s ease, opacity .15s ease;
    }
    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .user-area {
        gap: 8px;
        order: 2;
        margin-left: auto;
    }
    .user-area .user-chip,
    .user-area .btn-topup,
    .user-area .logout-form {
        display: none;
    }
    .user-area .balance-chip {
        display: inline-flex;
    }

    .mobile-menu {
        display: block;
        border-top: 1px solid var(--border-soft);
        background: rgba(11,13,18,0.98);
        backdrop-filter: blur(16px);
    }
    .mobile-menu[hidden] { display: none; }
    .mobile-menu-inner {
        padding-top: 14px;
        padding-bottom: 18px;
    }
    .mobile-menu-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 0 14px;
        border-bottom: 1px solid var(--border-soft);
        margin-bottom: 14px;
    }
    .mobile-menu-profile-copy {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }
    .mobile-menu-label {
        color: var(--text-muted);
        font-size: .72rem;
        text-transform: uppercase;
        letter-spacing: .08em;
    }
    .mobile-menu-name {
        color: var(--text-0);
        font-size: .96rem;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-nav {
        display: grid;
        gap: 6px;
    }
    .mobile-nav a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 12px;
        border-radius: var(--radius);
        color: var(--text-1);
        background: transparent;
        transition: background .15s, color .15s;
    }
    .mobile-nav a:hover,
    .mobile-nav a:focus-visible {
        background: var(--bg-2);
        color: var(--text-0);
    }
    .mobile-menu-actions {
        display: grid;
        gap: 10px;
        margin-top: 16px;
    }
    .mobile-menu-actions .btn,
    .mobile-menu-actions .mobile-logout-btn {
        width: 100%;
        min-height: 44px;
    }
    .mobile-logout-form {
        display: block;
        margin: 0;
    }
}

/* Hide nav entirely on very narrow screens (≤480) and show a hamburger-less 
   compact strip instead */
@media (max-width: 480px) {
    .header-inner { flex-wrap: nowrap; }
    .brand-logo {
        height: 38px;
        transform: scale(1.08);
    }
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        padding: 0 10px;
    }
    .balance-chip {
        padding: 4px 8px;
    }
    .balance-icon {
        display: none;
    }
    .balance-value {
        font-size: .78rem;
    }
}

/* ---- Hero ---- */
@media (max-width: 700px) {
    .hero { padding: 48px 0 36px; }
    .hero-title { font-size: clamp(1.6rem, 6vw, 2.4rem); }
    .hero-sub { font-size: 1rem; }
    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .hero-note { font-size: .8rem; }
    /* Orbs are decorative — shrink so they don't overflow */
    .orb-1 { width: 200px; height: 200px; right: -40px; }
    .orb-2 { width: 160px; height: 160px; right: 80px; }
    .orb-3 { width: 120px; height: 120px; }
}

/* ---- Feature cards ---- */
@media (max-width: 600px) {
    .features { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
}

/* ---- Dashboard / Video grid ---- */
@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-search { min-width: unset; width: 100%; }
    .sort-tabs { width: 100%; justify-content: center; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .video-title { font-size: .88rem; }
    .dashboard-load-more { justify-content: center; }
}

/* ---- Video Details ---- */
@media (max-width: 860px) {
    .video-details { grid-template-columns: 1fr; gap: 16px; }
    .generation-controls { grid-template-columns: 1fr; }
    .format-control { max-width: 100%; }
}

/* ---- Shorts grid ---- */
@media (max-width: 600px) {
    .shorts-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .short-thumb { max-height: 240px; }
}

/* ---- Generator form ---- */
@media (max-width: 600px) {
    .form-row.two-col { grid-template-columns: 1fr; }
    .checkbox-row { padding-top: 12px; }
    .generator-head,
    .generator-action-row {
        align-items: stretch;
        flex-direction: column;
    }
    .generator-cost-pill { width: fit-content; }
    .generator-submit {
        width: 100%;
        min-width: 0;
    }
    .format-control {
        align-items: center;
    }
    .video-info-grid,
    .shorts-empty-state,
    .empty-preview-grid {
        grid-template-columns: 1fr;
    }
    .empty-preview-grid {
        display: none;
    }
}

/* ---- Admin ---- */
@media (max-width: 860px) {
    .admin-hero { grid-template-columns: 1fr; gap: 12px; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
    .admin-stats { grid-template-columns: 1fr; }
}

/* ---- Cards (content / legal pages) ---- */
@media (max-width: 600px) {
    .card { padding: 16px; }
    .content-shell { max-width: 100%; }
}

/* ---- Footer ---- */
@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-inner > div {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
}

/* ---- Modals ---- */
@media (max-width: 600px) {
    .modal { padding: 12px; }
    .modal-panel { padding: 16px; border-radius: var(--radius); }
    .modal-panel.preview-panel { max-width: 100%; }
    .modal-actions { flex-direction: column; }
    .modal-actions .btn { width: 100%; }
}

/* ---- Pricing page ---- */
@media (max-width: 860px) {
    .pricing-card-popular { transform: none; }
    .pricing-card-popular:hover { transform: translateY(-4px); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .pricing-grid-section { padding-bottom: 32px; }
    .pricing-hero { padding: 48px 0 28px; }
}
@media (max-width: 600px) {
    .pricing-grid { max-width: 100%; }
    .pricing-card-inner { padding: 20px 20px 18px; }
    .pricing-note-section { grid-template-columns: 1fr; }
} */
.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(46, 204, 113, 0.10);
    border: 1px solid rgba(46, 204, 113, 0.28);
    border-radius: 999px;
    padding: 4px 12px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
    cursor: pointer;
    color: var(--success);
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    isolation: isolate;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.balance-chip:hover {
    background: rgba(46, 204, 113, 0.18);
    border-color: rgba(46, 204, 113, 0.5);
    color: var(--success);
    box-shadow: 0 0 0 6px rgba(24, 28, 37, 0.9);
}
.balance-chip:visited,
.balance-chip:active,
.balance-chip:focus {
    color: var(--success);
    text-decoration: none;
    outline: none;
    box-shadow: none;
}
.balance-chip:focus-visible {
    color: var(--success);
    outline: none;
    box-shadow: 0 0 0 6px rgba(24, 28, 37, 0.9), 0 0 0 2px rgba(46, 204, 113, 0.18);
}
.balance-icon { font-size: .85rem; line-height: 1; }
.balance-value {
    font-size: .85rem;
    font-weight: 600;
    color: var(--success);
}

/* ---- Top Up button ---- */
.btn-topup {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.35);
    color: var(--success);
    padding: 6px 14px;
    font-size: .85rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background .15s, border-color .15s, transform .08s;
    white-space: nowrap;
}
.btn-topup:hover {
    background: rgba(46, 204, 113, 0.22);
    border-color: rgba(46, 204, 113, 0.6);
    color: var(--success);
    transform: translateY(-1px);
}
.btn-topup:active { transform: translateY(0); }

/* ---- Balance Info Modal ---- */
.balance-modal-panel {
    max-width: 480px;
    text-align: center;
}
.balance-modal-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    line-height: 1;
}
.balance-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-0);
}
.balance-modal-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: rgba(46,204,113,.10);
    border: 1px solid rgba(46,204,113,.30);
    border-radius: 999px;
    padding: 8px 24px;
    margin-bottom: 20px;
}
.balance-modal-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--success);
    line-height: 1;
}
.balance-modal-unit {
    font-size: .95rem;
    font-weight: 600;
    color: var(--success);
    opacity: .75;
}
.balance-modal-desc {
    color: var(--text-2);
    font-size: .95rem;
    line-height: 1.6;
    margin: 0 0 24px;
}
.balance-modal-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    margin-bottom: 4px;
}
.balance-modal-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.balance-modal-feature-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.balance-modal-feature div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.balance-modal-feature strong {
    font-size: .9rem;
    color: var(--text-0);
}
.balance-modal-feature span {
    font-size: .82rem;
    color: var(--text-2);
    line-height: 1.5;
}

/* ---- Pricing page ---- */
.pricing-hero {
    position: relative;
    padding: 72px 0 48px;
    overflow: hidden;
    text-align: center;
}
.pricing-hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}
.pricing-eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(108,92,255,.12);
    border: 1px solid rgba(108,92,255,.25);
    border-radius: 999px;
    padding: 4px 14px;
    margin-bottom: 16px;
}
.pricing-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 12px;
}
.pricing-sub {
    font-size: 1.05rem;
    color: var(--text-1);
    margin: 0;
}
.pricing-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 620px;
    margin: 18px auto 0;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(45, 212, 191, .28);
    background: linear-gradient(135deg, rgba(45, 212, 191, .15), rgba(108, 92, 255, .12));
    box-shadow: 0 14px 40px rgba(45, 212, 191, .12);
    color: var(--text-0);
    font-size: .92rem;
    font-weight: 650;
    line-height: 1.4;
}
.pricing-status[hidden] {
    display: none;
}
.pricing-status-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    flex: 0 0 22px;
    background: rgba(45, 212, 191, .18);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, .36);
    font-size: .82rem;
    font-weight: 800;
}
.pricing-status-error {
    border-color: rgba(255, 61, 110, .32);
    background: rgba(255, 61, 110, .09);
    box-shadow: 0 14px 40px rgba(255, 61, 110, .12);
}
.pricing-status-error .pricing-status-mark {
    background: rgba(255, 61, 110, .16);
    color: #ff8aaa;
    border-color: rgba(255, 61, 110, .34);
}
.pricing-orbs { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.pricing-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .4; }
.pricing-orb-1 { width: 340px; height: 340px; background: #6c5cff; top: -60px; right: -80px; }
.pricing-orb-2 { width: 280px; height: 280px; background: #ff3d6e; bottom: -40px; left: -60px; }

.pricing-grid-section { padding: 8px 0 56px; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
}

.pricing-card {
    position: relative;
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    transition: transform .15s, border-color .15s, box-shadow .15s;
    overflow: hidden;
}
.pricing-card:hover {
    transform: translateY(-4px);
    border-color: var(--border);
    box-shadow: var(--shadow-2);
}
.pricing-card-popular {
    border-color: rgba(108,92,255,.5);
    box-shadow: 0 0 0 1px rgba(108,92,255,.2), var(--shadow-2);
    transform: scale(1.03);
}
.pricing-card-popular:hover {
    transform: scale(1.03) translateY(-4px);
    border-color: rgba(108,92,255,.8);
    box-shadow: 0 0 0 1px rgba(108,92,255,.35), 0 20px 50px rgba(108,92,255,.25);
}
.pricing-popular-ribbon {
    background: var(--accent-grad);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-align: center;
    padding: 6px 0;
}
.pricing-card-inner { padding: 28px 28px 24px; }

.pricing-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 12px;
    margin-bottom: 20px;
}
.pricing-badge-starter { background: rgba(138,147,166,.12); color: var(--text-2); border: 1px solid var(--border); }
.pricing-badge-pro     { background: rgba(108,92,255,.15);  color: #a99bff;        border: 1px solid rgba(108,92,255,.3); }
.pricing-badge-power   { background: rgba(255,61,110,.12);  color: #ff8aaa;        border: 1px solid rgba(255,61,110,.3); }

.pricing-minutes {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}
.pricing-minutes-num {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1;
}
.pricing-minutes-label {
    font-size: .95rem;
    color: var(--text-2);
    font-weight: 500;
}

.pricing-video-hint {
    font-size: .8rem;
    color: var(--text-muted);
    margin: -12px 0 14px;
    font-style: italic;
}

.pricing-price {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 4px;
}
.pricing-currency {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-1);
    margin-top: 6px;
    line-height: 1;
}
.pricing-amount {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1;
}
.pricing-per {
    font-size: .82rem;
    color: var(--text-muted);
    margin: 0 0 24px;
}
.pricing-save { color: var(--success); }

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .9rem;
    color: var(--text-1);
    margin: 0;
}
.pricing-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    border-radius: 50%;
    font-size: .7rem;
    color: var(--success);
    font-weight: 700;
}

.pricing-btn {
    width: 100%;
    justify-content: center;
    font-size: .95rem;
    padding: 12px 20px;
}
.coming-soon-btn {
    position: relative;
    cursor: not-allowed;
    opacity: .75;
}
.coming-soon-btn:hover { filter: none; transform: none; }
.coming-soon-label::after {
    content: ' 🔒';
    font-size: .8rem;
}

/* Pricing notes */
.pricing-note-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding-bottom: 56px;
}
.pricing-note-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-1);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}
.pricing-note-icon {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.pricing-note-card strong { color: var(--text-0); display: block; margin-bottom: 4px; }
.pricing-note-card p { margin: 0; font-size: .9rem; color: var(--text-1); }
