:root {
    --primary-red: #f30707;
    --dark-blue: #0a1a3a;
    --dark-secondary: #111827;
    --light-bg: #f6f8fc;
    --surface: #ffffff;
    --border-gray: #dfe5ef;
    --muted-text: #6b7280;
    --panel-bg: #fbfcff;
    --shadow: 0 8px 24px rgba(10, 26, 58, 0.06);
    --radius: 12px;
    --radius-lg: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; background: var(--light-bg); color: var(--dark-secondary); font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, .button { border: 1px solid transparent; background: var(--primary-red); color: #fff; padding: 10px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.18s ease; }
button:hover, .button:hover { filter: brightness(0.98); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-gray); border-radius: 8px; background: #fff; color: var(--dark-secondary); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #b8c4d9; box-shadow: 0 0 0 3px rgba(10, 26, 58, 0.05); }
textarea { min-height: 92px; resize: vertical; }
.container { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(860px, calc(100% - 32px)); }
.site-main { min-height: calc(100vh - 160px); }
.site-header { background: var(--dark-blue); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.nav-row { min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.main-nav { display: flex; align-items: center; gap: 14px; }
.main-nav a { color: rgba(255,255,255,0.88); font-weight: 600; font-size: 14px; }
.main-nav a:hover { color: #fff; }
.nav-cta { background: var(--primary-red); color: #fff !important; padding: 9px 14px; border-radius: 8px; }
.hero { background: var(--dark-blue); color: #fff; }
.hero-centered { padding: 54px 0 52px; }
.hero-simple { max-width: 760px; text-align: center; }
.eyebrow { display: inline-block; color: rgba(255,255,255,0.72); font-weight: 700; font-size: 12px; letter-spacing: 0.02em; margin-bottom: 10px; }
.hero h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; letter-spacing: -0.03em; }
.lead { margin: 14px auto 0; color: rgba(255,255,255,0.8); font-size: 15px; max-width: 620px; }
.centered { text-align: center; }
.hero-alert { margin-left: auto; margin-right: auto; max-width: 720px; }
.hero-form { display: flex; gap: 8px; align-items: center; }
.hero-form-compact { max-width: 640px; margin: 28px auto 0; background: rgba(255,255,255,0.06); padding: 4px; border-radius: 10px; }
.hero-form-compact input { flex: 1 1 auto; border: 0; min-height: 44px; }
.hero-form-compact button { min-width: 180px; min-height: 44px; }
.section { padding: 52px 0; }
.section-soft { background: #fff; }
.section-heading { margin-bottom: 22px; }
.centered-heading { text-align: center; justify-content: center; }
.centered-heading h1, .centered-heading h2 { margin: 0; color: var(--dark-blue); font-size: clamp(28px, 3vw, 44px); letter-spacing: -0.03em; }
.centered-heading p { margin: 8px 0 0; color: var(--muted-text); }
.feature-grid-clean { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature-box-clean { background: #fff; border: 1px solid var(--border-gray); border-radius: 10px; box-shadow: var(--shadow); padding: 28px 22px; text-align: center; }
.feature-icon { width: 42px; height: 42px; margin: 0 auto 16px; border-radius: 10px; background: #f4f7fc; border: 1px solid var(--border-gray); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--dark-blue); letter-spacing: 0.06em; }
.feature-box-clean h3 { margin: 0 0 10px; color: var(--dark-blue); font-size: 16px; }
.feature-box-clean p { margin: 0; color: var(--muted-text); font-size: 14px; }
.faq-wrap { max-width: 760px; }
.faq-list-clean { display: grid; gap: 10px; }
details { background: #fff; border: 1px solid var(--border-gray); border-radius: 8px; padding: 0; overflow: hidden; }
summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--dark-blue); position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-text); font-size: 20px; }
details[open] summary::after { content: '-'; }
details p { margin: 0; padding: 0 16px 14px; color: var(--muted-text); }
.site-footer { background: var(--dark-blue); color: #fff; padding: 52px 0 20px; margin-top: 32px; }
.footer-grid { display: grid; gap: 24px; }
.footer-grid-4 { grid-template-columns: 1.2fr 0.8fr 0.8fr 0.8fr; }
.site-footer h3, .site-footer h4 { margin: 0 0 10px; color: #fff; }
.site-footer p, .footer-links a { color: rgba(255,255,255,0.74); }
.footer-links { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-links.column { flex-direction: column; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 34px; padding-top: 14px; text-align: center; color: rgba(255,255,255,0.62); }
.panel, .price-card, .auth-card, .stat-card, .history-card, .admin-stat-card, .admin-menu-card, .admin-activity-card, .admin-page-panel { background: #fff; border: 1px solid var(--border-gray); border-radius: 14px; box-shadow: var(--shadow); }
.panel, .price-card, .auth-card, .stat-card { padding: 16px; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert.error { background: #fff1f1; border: 1px solid #f8caca; color: #b42318; }
.alert.success { background: #effbf4; border: 1px solid #b8ecc9; color: #047857; }
.result-page-shell { padding-top: 20px; }
.result-top-form { margin-bottom: 18px; }
.result-grid { display: grid; gap: 14px; align-items: start; }
.compact-result-grid { grid-template-columns: 300px minmax(0, 1fr) 280px; }
.slim-panel { padding: 14px; }
.sticky-panel { position: sticky; top: 18px; }
.video-thumb { width: 100%; border-radius: 8px; border: 1px solid var(--border-gray); margin-bottom: 12px; }
.video-title-small { font-size: 18px; line-height: 1.35; margin: 0 0 4px; color: var(--dark-blue); }
.channel-name { margin: 0 0 10px; color: var(--muted-text); }
.meta-list { margin: 0; display: grid; gap: 0; }
.compact-meta-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf1f7; }
.compact-meta-list div:last-child { border-bottom: 0; }
.meta-list dt { color: var(--muted-text); }
.meta-list dd { margin: 0; color: var(--dark-blue); text-align: right; word-break: break-all; }
.compact-card { border: 1px solid var(--border-gray); border-radius: 8px; background: var(--panel-bg); }
.compact-card-tight { padding: 12px; margin-top: 12px; }
.card-title-row h3, .section-card h3 { margin: 0; font-size: 15px; color: var(--dark-blue); }
.description-text[data-collapsed="true"] { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.link-button { border: 0; background: transparent; color: var(--primary-red); padding: 0; margin-top: 6px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.compact-tags span { background: #f3f5f9; border: 1px solid transparent; color: var(--dark-blue); border-radius: 999px; padding: 6px 12px; font-size: 12px; line-height: 1; }
.transcript-panel-head, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.transcript-panel-head h2 { margin: 0; color: var(--dark-blue); }
.transcript-mini-stats { display: flex; gap: 14px; color: var(--muted-text); font-size: 13px; }
.transcript-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; margin-top: 14px; }
.segmented { display: inline-flex; background: #f1f4f9; padding: 3px; border-radius: 8px; }
.segmented button { background: transparent; border: 0; color: var(--dark-blue); padding: 8px 10px; border-radius: 6px; }
.segmented button.active { background: #fff; border: 1px solid var(--border-gray); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.compact-sub-toolbar { margin-top: 10px; }
.transcript-actions, .compact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small-button, .tool-button, .button.ghost { border: 1px solid var(--border-gray); background: #fff; color: var(--dark-blue); padding: 9px 12px; border-radius: 8px; font-weight: 600; }
.tool-button { width: 100%; text-align: center; }
.tool-button-primary { background: var(--primary-red); color: #fff; border-color: var(--primary-red); }
.transcript-list { margin-top: 12px; }
.transcript-list-clean { max-height: 730px; overflow: auto; display: grid; gap: 8px; padding-right: 4px; }
.transcript-row-clean { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border: 1px solid var(--border-gray); border-radius: 8px; background: #fff; }
.transcript-row .time { color: var(--primary-red); font-weight: 700; font-size: 12px; padding-top: 2px; }
.transcript-row p { margin: 0; }
.compact-tool-group { gap: 8px; display: grid; }
.response-box { margin: 12px 0 0; white-space: pre-wrap; border-radius: 8px; min-height: 140px; padding: 12px; }
.response-box-light { background: #f8fafc; border: 1px solid var(--border-gray); color: var(--dark-secondary); }
.hidden-textarea { position: absolute; left: -9999px; top: -9999px; }
.empty-state { background: #fff; border: 1px dashed var(--border-gray); border-radius: 10px; padding: 28px; text-align: center; color: var(--muted-text); }
.auth-section { padding-top: 52px; }
.auth-card form, .form-grid { display: grid; gap: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border-gray); }
.stats-grid, .pricing-grid, .dashboard-grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-card.featured { border-color: rgba(243, 7, 7, 0.22); box-shadow: 0 10px 28px rgba(243, 7, 7, 0.08); }
.price-tag { margin: 8px 0 14px; font-size: 30px; color: var(--dark-blue); font-weight: 700; }
.admin-page-body { background: var(--light-bg); }
.admin-main { min-height: auto; }
.admin-panel-section { padding-top: 24px; padding-bottom: 30px; }
.admin-page-grid { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 18px; align-items: start; }
.admin-page-grid-dashboard { grid-template-columns: 252px minmax(0, 1fr); }
.admin-page-grid-inner { grid-template-columns: 252px minmax(0, 1fr); }
.admin-menu-card { padding: 10px; position: sticky; top: 18px; }
.admin-menu-head { padding: 4px 6px 10px; }
.admin-menu-head h1 { margin: 0; color: var(--dark-blue); font-size: 18px; letter-spacing: -0.02em; }
.admin-page-nav { display: grid; gap: 6px; }
.admin-page-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--dark-blue); font-weight: 600; }
.admin-page-nav a.active { background: var(--primary-red); color: #fff; }
.admin-nav-icon { min-width: 26px; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: #f5f7fb; }
.admin-nav-icon svg { width: 15px; height: 15px; fill: currentColor; }
.admin-page-nav a.active .admin-nav-icon { background: rgba(255,255,255,0.16); color: #fff; }
.admin-page-content { display: grid; gap: 14px; }
.admin-dashboard-view { display: grid; gap: 16px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-stat-card { padding: 14px 16px; }
.admin-stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-stat-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #fff3f3; color: var(--primary-red); }
.admin-stat-icon svg { width: 16px; height: 16px; fill: currentColor; }
.admin-stat-trend { color: #16a34a; font-weight: 700; font-size: 12px; }
.admin-stat-card strong { display: block; font-size: 17px; color: var(--dark-blue); margin-bottom: 2px; }
.admin-stat-card span { color: var(--muted-text); }
.admin-activity-card, .admin-page-panel { padding: 16px 18px; }
.admin-activity-card h2, .admin-panel-head h2 { margin: 0; color: var(--dark-blue); font-size: 16px; }
.compact-admin-head { margin-bottom: 12px; }
.admin-activity-list { display: grid; }
.admin-activity-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-gray); }
.admin-activity-row:last-child { border-bottom: 0; padding-bottom: 0; }
.admin-activity-row strong { display: block; color: var(--dark-blue); margin-bottom: 2px; }
.admin-activity-row p, .admin-activity-row span { margin: 0; color: var(--muted-text); }
.admin-form-panel { box-shadow: none; border-radius: 12px; }
.admin-form-tight { gap: 10px; }
.compact-admin-panel { display: grid; gap: 12px; }
.compact-admin-grid { gap: 12px; }
.compact-admin-subpanel { padding: 14px; }
.compact-admin-subpanel h3 { margin: 0 0 10px; color: var(--dark-blue); font-size: 15px; }
.compact-table-wrap { border: 1px solid var(--border-gray); border-radius: 10px; }
.admin-table-tight th, .admin-table-tight td { padding: 12px 14px; font-size: 13px; }
.admin-table-tight thead th { color: var(--dark-blue); background: #fbfcff; }
.table-subtext { display: block; color: var(--muted-text); font-size: 12px; margin-top: 2px; }
.plan-pill { color: var(--primary-red); font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pill-active { background: #dcfce7; color: #15803d; }
.status-pill-muted { background: #e5e7eb; color: #4b5563; }
.table-link { color: var(--primary-red); font-weight: 600; }
.compact-stack-list { gap: 10px; }
.compact-history-card { padding: 12px 14px; }
.compact-history-card p { margin: 4px 0 0; color: var(--muted-text); }
@media (max-width: 1180px) {
    .compact-result-grid { grid-template-columns: 280px minmax(0, 1fr) 250px; }
    .feature-grid-clean, .stats-grid, .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .compact-result-grid, .pricing-grid, .dashboard-grid, .admin-page-grid, .admin-page-grid-dashboard, .admin-page-grid-inner, .compact-admin-grid { grid-template-columns: 1fr; }
    .sticky-panel, .admin-menu-card { position: static; }
}
@media (max-width: 720px) {
    .container { width: min(100% - 20px, 1000px); }
    .nav-row, .main-nav, .hero-form, .transcript-panel-head, .row-between, .compact-sub-toolbar, .admin-activity-row, .compact-admin-head { flex-direction: column; align-items: stretch; }
    .hero-centered { padding: 42px 0; }
    .hero h1 { font-size: 30px; }
    .hero-form-compact { padding: 0; background: transparent; }
    .hero-form-compact button { min-width: 100%; }
    .feature-grid-clean, .stats-grid, .footer-grid-4, .transcript-toolbar, .pricing-grid, .form-grid, .admin-stat-grid { grid-template-columns: 1fr; }
    .transcript-row-clean { grid-template-columns: 1fr; }
}

.topbar-row { min-height: 64px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.brand-with-badge { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.brand-badge { width: 30px; height: 30px; border-radius: 10px; background: var(--primary-red); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
.topbar-center-nav { justify-content: center; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.topbar-button { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; padding: 11px 18px; border-radius: 10px; font-weight: 700; }
.topbar-button-outline { border: 2px solid rgba(255,255,255,0.75); color: #fff; background: transparent; }
.topbar-button-solid { background: var(--primary-red); color: #fff; }
.admin-form-single { padding: 18px; display: grid; gap: 16px; }
.admin-field-stack { display: grid; gap: 8px; }
.admin-field-stack label, .admin-field-stack > label { color: var(--dark-blue); font-weight: 700; }
.admin-field-stack small { color: var(--muted-text); font-size: 12px; }
.admin-brand-row { display: grid; }
.brand-logo-uploader { display: flex; align-items: center; gap: 18px; }
.brand-logo-preview { width: 64px; height: 64px; border-radius: 12px; background: var(--primary-red); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.brand-upload-actions { display: grid; gap: 10px; min-width: 260px; }
.color-input-row { display: flex; align-items: center; gap: 10px; }
.color-chip { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--border-gray); flex: 0 0 auto; }
.admin-two-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-two-col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-actions-row { display: flex; justify-content: flex-start; }
.setting-switch-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 2px 0 16px; border-bottom: 1px solid var(--border-gray); }
.setting-switch-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.setting-switch-row strong { display: block; color: var(--dark-blue); font-size: 15px; margin-bottom: 2px; }
.setting-switch-row p { margin: 0; color: var(--muted-text); }
.switch-control { position: relative; display: inline-flex; width: 44px; height: 26px; flex: 0 0 auto; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-slider { position: absolute; inset: 0; border-radius: 999px; background: #eceff4; transition: .18s ease; }
.switch-slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.08); transition: .18s ease; }
.switch-control input:checked + .switch-slider { background: var(--primary-red); }
.switch-control input:checked + .switch-slider::before { transform: translateX(18px); }
.admin-inline-limit { max-width: 320px; }
.compact-switch-row { padding-top: 4px; }
@media (max-width: 980px) {
    .topbar-row { grid-template-columns: 1fr; justify-items: start; }
    .topbar-center-nav { justify-content: flex-start; }
    .topbar-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
    .topbar-actions, .brand-logo-uploader, .admin-two-colors, .admin-two-col-grid, .setting-switch-row { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
    .topbar-button { width: 100%; }
    .brand-upload-actions { min-width: 0; }
}

.brand-with-logo { min-width: 0; }
.brand-image { height: 46px; width: auto; display: block; object-fit: contain; }
.footer-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.footer-brand-image { height: 46px; width: auto; display: block; object-fit: contain; }
.admin-brand-assets-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.brand-logo-preview img, .footer-brand-image, .brand-image { max-width: 100%; }
.brand-logo-preview-large { width: 72px; height: 72px; }
.brand-logo-preview-small { width: 56px; height: 56px; font-size: 14px; }
.brand-logo-preview { overflow: hidden; }
.brand-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.brand-upload-actions input[type="file"] { padding: 10px 12px; border: 1px dashed var(--border-gray); border-radius: 10px; background: #fff; }

.branding-slot-favicon { grid-column: 1 / -1; max-width: 420px; }
.brand-logo-uploader-vertical { align-items: flex-start; }
.brand-logo-preview-dark { background: var(--dark-blue); }
.footer-brand-row h3 { margin: 0; }
@media (max-width: 720px) { .admin-brand-assets-grid { grid-template-columns: 1fr; } .branding-slot-favicon { grid-column: auto; max-width: none; } }



.card-title-row-tags { margin-bottom: 10px; }
.tag-copy-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--primary-red); padding: 0; font-weight: 600; }
.tag-copy-button svg { width: 15px; height: 15px; fill: currentColor; }

.transcript-row-no-time { grid-template-columns: minmax(0, 1fr); }
.transcript-row-no-time p { width: 100%; }
