/* AI Youtube Magic — AI Magic Neon Theme */

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

:root,
[data-theme="dark"] {
    --ytcp-bg: #0B0F19;
    --ytcp-bg-secondary: #161B26;
    --ytcp-bg-card: #161B26;
    --ytcp-bg-input: #0B0F19;
    --ytcp-border: rgba(255, 255, 255, 0.06);
    --ytcp-border-focus: #8B5CF6;
    --ytcp-text: #F9FAFB;
    --ytcp-text-muted: #9CA3AF;
    --ytcp-text-dim: #6B7280;
    --ytcp-accent: #8B5CF6;
    --ytcp-accent-hover: #7C3AED;
    --ytcp-accent-2: #EC4899;
    --ytcp-accent-2-hover: #F472B6;
    --ytcp-red: var(--ytcp-accent);
    --ytcp-red-hover: var(--ytcp-accent-hover);
    --ytcp-yellow: var(--ytcp-accent-2);
    --ytcp-yellow-hover: var(--ytcp-accent-2-hover);
    --ytcp-gradient: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --ytcp-gradient-hover: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
    --ytcp-accent-soft: rgba(139, 92, 246, 0.12);
    --ytcp-accent-border: rgba(139, 92, 246, 0.35);
    --ytcp-pink: #EC4899;
    --ytcp-pink-soft: rgba(236, 72, 153, 0.12);
    --ytcp-black: #000000;
    --ytcp-white: #ffffff;
    --ytcp-green: #22c55e;
    --ytcp-danger: #EF4444;
    --ytcp-sidebar-width: 260px;
    --ytcp-radius: 12px;
    --ytcp-radius-lg: 16px;
    --ytcp-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    --ytcp-glow: 0 0 24px rgba(139, 92, 246, 0.4), 0 4px 32px rgba(236, 72, 153, 0.2);
    --ytcp-glow-red: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    --ytcp-glass: rgba(22, 27, 38, 0.72);
}

[data-theme="light"] {
    --ytcp-bg: #F4F6FB;
    --ytcp-bg-secondary: #FFFFFF;
    --ytcp-bg-card: #FFFFFF;
    --ytcp-bg-input: #EEF2F7;
    --ytcp-border: #D8DEE9;
    --ytcp-border-focus: #7C3AED;
    --ytcp-text: #0F172A;
    --ytcp-text-muted: #475569;
    --ytcp-text-dim: #64748B;
    --ytcp-accent: #7C3AED;
    --ytcp-accent-hover: #6D28D9;
    --ytcp-accent-2: #DB2777;
    --ytcp-accent-2-hover: #BE185D;
    --ytcp-red: var(--ytcp-accent);
    --ytcp-red-hover: var(--ytcp-accent-hover);
    --ytcp-yellow: var(--ytcp-accent-2);
    --ytcp-yellow-hover: var(--ytcp-accent-2-hover);
    --ytcp-gradient: linear-gradient(135deg, #7C3AED 0%, #DB2777 100%);
    --ytcp-gradient-hover: linear-gradient(135deg, #6D28D9 0%, #BE185D 100%);
    --ytcp-accent-soft: rgba(124, 58, 237, 0.1);
    --ytcp-accent-border: rgba(124, 58, 237, 0.35);
    --ytcp-pink: #DB2777;
    --ytcp-pink-soft: rgba(219, 39, 119, 0.1);
    --ytcp-black: #0F172A;
    --ytcp-white: #ffffff;
    --ytcp-green: #16A34A;
    --ytcp-danger: #DC2626;
    --ytcp-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    --ytcp-glow: 0 0 18px rgba(124, 58, 237, 0.18), 0 4px 20px rgba(219, 39, 119, 0.1);
    --ytcp-glow-red: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
    --ytcp-glass: rgba(255, 255, 255, 0.92);
}

/* Reset within app scope */
.ytcp-app,
.ytcp-app * {
    box-sizing: border-box;
}

.ytcp-app {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--ytcp-bg);
    background-image: var(--ytcp-glow-red);
    background-attachment: fixed;
    color: var(--ytcp-text);
    min-height: 100vh;
    width: 100%;
    line-height: 1.5;
    font-size: 14px;
}

.ytcp-app a { color: var(--ytcp-accent); text-decoration: none; }
.ytcp-app a:hover { color: var(--ytcp-accent-2); }

.ytcp-app a.ytcp-btn--primary,
.ytcp-app a.ytcp-btn--primary:hover,
.ytcp-landing a.ytcp-btn--primary,
.ytcp-landing a.ytcp-btn--primary:hover,
.ytcp-landing a.ytcp-btn--magic,
.ytcp-landing a.ytcp-btn--magic:hover,
a.ytcp-btn--primary,
a.ytcp-btn--primary:hover,
a.ytcp-btn--magic,
a.ytcp-btn--magic:hover {
    color: #ffffff;
    text-decoration: none;
}

.ytcp-app a.ytcp-btn--outline,
.ytcp-app a.ytcp-btn--outline:hover,
.ytcp-app a.ytcp-btn--muted,
.ytcp-app a.ytcp-btn--muted:hover,
.ytcp-app a.ytcp-btn--yellow,
.ytcp-app a.ytcp-btn--yellow:hover {
    text-decoration: none;
}

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

.ytcp-text-red { color: var(--ytcp-red) !important; }
.ytcp-text-yellow { color: var(--ytcp-yellow) !important; }
.ytcp-text-green { color: var(--ytcp-green) !important; }
.ytcp-text-muted { color: var(--ytcp-text-muted) !important; }

/* Layout */
.ytcp-layout {
    display: flex;
    min-height: 100vh;
}

.ytcp-main {
    flex: 1;
    width: calc(100% - var(--ytcp-sidebar-width));
    padding: 32px 40px;
    margin-left: var(--ytcp-sidebar-width);
    min-height: 100vh;
    background: var(--ytcp-bg);
}

/* Sidebar — sticky shell, scrollable nav */
.ytcp-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--ytcp-sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: var(--ytcp-bg-secondary);
    border-right: 1px solid var(--ytcp-border);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    z-index: 100;
    overflow: hidden;
    overscroll-behavior: contain;
}

.ytcp-sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -4px;
    padding: 0 4px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--ytcp-border) transparent;
}

.ytcp-sidebar__nav::-webkit-scrollbar {
    width: 4px;
}
.ytcp-sidebar__nav::-webkit-scrollbar-thumb {
    background: var(--ytcp-border);
    border-radius: 4px;
}

.ytcp-sidebar__brand {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 4px 8px 12px;
    flex-shrink: 0;
    background: var(--ytcp-bg-secondary);
}

.ytcp-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    flex-shrink: 0;
    border: 1px solid var(--ytcp-border);
    border-radius: 8px;
    background: var(--ytcp-bg-input);
    color: var(--ytcp-text-muted);
    cursor: pointer;
    padding: 0;
}
.ytcp-sidebar-close:hover {
    color: var(--ytcp-text);
    border-color: var(--ytcp-accent);
}

.ytcp-sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1100;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ytcp-border);
    border-radius: 10px;
    background: var(--ytcp-bg-card);
    color: var(--ytcp-text);
    box-shadow: var(--ytcp-shadow);
    cursor: pointer;
    padding: 0;
}
.ytcp-sidebar-toggle .ytcp-icon {
    width: 18px;
    height: 18px;
}
.ytcp-sidebar-toggle:hover {
    border-color: var(--ytcp-accent);
    color: var(--ytcp-accent);
}

.ytcp-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}
.ytcp-sidebar-backdrop.is-visible,
.ytcp-sidebar-backdrop:not([hidden]) {
    display: block;
}

.ytcp-logo {
    display: block;
    height: auto;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.ytcp-logo--sidebar {
    width: 100%;
    max-width: 196px;
    height: auto;
    border-radius: 8px;
}

.ytcp-logo--header,
.ytcp-logo--footer,
.ytcp-logo--onboarding {
    width: auto;
    max-width: 200px;
    height: 40px;
    border-radius: 6px;
}

.ytcp-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--ytcp-gradient);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.35);
}

.ytcp-logo-icon .ytcp-icon {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
}

.ytcp-logo-text {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .5px;
}

.ytcp-sidebar__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ytcp-text-muted);
    letter-spacing: 1.2px;
    margin: 18px 8px 8px;
    text-transform: uppercase;
    opacity: .9;
}

.ytcp-sidebar__label:first-child {
    margin-top: 4px;
}

.ytcp-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--ytcp-text-muted);
    font-weight: 500;
    font-size: 13px;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    border-left: 2px solid transparent;
    min-height: 38px;
    position: relative;
}

/* Beat .ytcp-app a accent so sidebar labels stay readable in dark mode */
.ytcp-app a.ytcp-nav-item,
.ytcp-app a.ytcp-nav-item:visited {
    color: var(--ytcp-text-muted);
}
.ytcp-app a.ytcp-nav-item .ytcp-nav-label,
.ytcp-app a.ytcp-nav-item .ytcp-nav-icon {
    color: inherit;
}

a.ytcp-nav-item:hover,
.ytcp-app a.ytcp-nav-item:hover {
    background: var(--ytcp-accent-soft);
    color: var(--ytcp-text);
}
.ytcp-nav-item.is-active,
.ytcp-app a.ytcp-nav-item.is-active {
    background: var(--ytcp-accent-soft);
    color: var(--ytcp-text);
    border-left-color: var(--ytcp-accent);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px var(--ytcp-accent-border);
}
.ytcp-nav-item--output.is-active,
.ytcp-app a.ytcp-nav-item--output.is-active {
    border-left-color: var(--ytcp-accent-2);
}
.ytcp-nav-item--muted { opacity: .5; cursor: default; }

.ytcp-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--ytcp-text-muted);
    opacity: 1;
    transition: transform .28s cubic-bezier(.34, 1.4, .64, 1), background .2s ease, color .2s ease, box-shadow .2s ease;
}
.ytcp-nav-icon .ytcp-icon {
    width: 15px;
    height: 15px;
    transition: transform .28s cubic-bezier(.34, 1.4, .64, 1), stroke-width .2s ease;
}

.ytcp-nav-item:hover .ytcp-nav-icon,
.ytcp-app a.ytcp-nav-item:hover .ytcp-nav-icon {
    color: var(--ytcp-accent);
    background: var(--ytcp-accent-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.18);
}
.ytcp-nav-item:hover .ytcp-nav-icon .ytcp-icon,
.ytcp-app a.ytcp-nav-item:hover .ytcp-nav-icon .ytcp-icon {
    animation: ytcp-nav-icon-pop .45s cubic-bezier(.34, 1.4, .64, 1);
}

.ytcp-nav-item.is-active .ytcp-nav-icon,
.ytcp-app a.ytcp-nav-item.is-active .ytcp-nav-icon {
    color: var(--ytcp-accent);
    background: var(--ytcp-accent-soft);
    box-shadow: 0 0 0 1px var(--ytcp-accent-border);
}
.ytcp-nav-item.is-active .ytcp-nav-icon .ytcp-icon {
    animation: ytcp-nav-icon-pulse 2.4s ease-in-out infinite;
}

@keyframes ytcp-nav-icon-pop {
    0% { transform: scale(1) rotate(0deg); }
    40% { transform: scale(1.22) rotate(-8deg); }
    70% { transform: scale(0.94) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes ytcp-nav-icon-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: .88; }
}

@media (prefers-reduced-motion: reduce) {
    .ytcp-nav-item,
    .ytcp-nav-icon,
    .ytcp-nav-icon .ytcp-icon {
        transition: none !important;
        animation: none !important;
    }
}

.ytcp-nav-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform .2s ease;
}
.ytcp-nav-item:hover .ytcp-nav-label {
    transform: translateX(2px);
}

.ytcp-nav-lock {
    display: flex;
    opacity: .45;
    margin-left: auto;
    color: var(--ytcp-text-muted);
    transition: transform .25s ease, opacity .2s ease;
}
.ytcp-nav-item.is-locked:hover .ytcp-nav-lock {
    opacity: .8;
    transform: scale(1.1);
}

.ytcp-nav-item.is-locked,
.ytcp-settings-nav__item.is-locked {
    opacity: .7;
    cursor: pointer;
}
.ytcp-settings-nav__item.is-locked {
    pointer-events: none;
    cursor: not-allowed;
}
a.ytcp-nav-item.is-locked:hover,
.ytcp-app a.ytcp-nav-item.is-locked:hover {
    opacity: .9;
    background: var(--ytcp-accent-soft);
    color: var(--ytcp-text);
}

.ytcp-sidebar-backdrop[hidden] {
    display: none !important;
}

.ytcp-nav-upgrade {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ytcp-accent);
    margin-left: 6px;
    flex-shrink: 0;
}

.ytcp-badge--upgrade,
.ytcp-app a.ytcp-badge--upgrade,
.ytcp-app a.ytcp-badge--upgrade:hover,
.ytcp-app a.ytcp-badge--upgrade:visited {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--ytcp-accent), var(--ytcp-pink));
    padding: 2px 8px;
    border-radius: 999px;
    text-decoration: none;
}

.ytcp-badge--lg {
    font-size: 12px;
    padding: 6px 14px;
}

.ytcp-auth__plan-badge {
    margin-bottom: 12px;
}

.ytcp-settings-nav__item.is-locked .ytcp-nav-upgrade {
    margin-left: auto;
}

.ytcp-export-menu button.is-locked {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.ytcp-export-menu button.is-locked .ytcp-nav-upgrade {
    margin-left: auto;
}

.ytcp-btn.is-locked[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

/* SVG icon system */
.ytcp-icon {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
}
.ytcp-icon--xs { width: 12px; height: 12px; }
.ytcp-icon--sm { width: 14px; height: 14px; }
.ytcp-icon--lg { width: 40px; height: 40px; opacity: .25; }

.ytcp-btn .ytcp-icon,
.ytcp-btn-icon .ytcp-icon { width: 14px; height: 14px; }

.ytcp-theme-toggle {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    color: var(--ytcp-text-muted);
    padding: 0;
}
.ytcp-theme-toggle .ytcp-icon { width: 15px; height: 15px; }

.ytcp-credits-widget {
    margin-top: 12px;
    padding: 14px;
    background: var(--ytcp-bg-card);
    border-radius: var(--ytcp-radius);
    border: 1px solid var(--ytcp-border);
    flex-shrink: 0;
    color: var(--ytcp-text);
}

.ytcp-credits-widget__header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 8px;
    color: var(--ytcp-text-muted);
}

.ytcp-credits-widget__header span:last-child {
    color: var(--ytcp-text);
}

.ytcp-progress {
    height: 4px;
    background: var(--ytcp-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.ytcp-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ytcp-red), var(--ytcp-yellow));
    border-radius: 2px;
    transition: width .3s;
}

.ytcp-credits-widget__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--ytcp-text);
}

.ytcp-credits-widget__usage {
    min-width: 0;
    line-height: 1.3;
    color: var(--ytcp-text);
}

.ytcp-credits-widget__plan {
    margin-top: 8px;
    display: flex;
    width: 100%;
}

.ytcp-credits-widget__badge {
    max-width: 100%;
    width: auto;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    padding: 3px 8px;
    gap: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ytcp-credits-widget__extra,
.ytcp-app a.ytcp-credits-widget__extra,
.ytcp-app a.ytcp-credits-widget__extra:visited {
    font-size: 11px;
    color: var(--ytcp-text-muted);
    margin-top: 6px;
    display: block;
}
.ytcp-app a.ytcp-credits-widget__extra:hover {
    color: var(--ytcp-accent);
}

.ytcp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.ytcp-badge--yellow {
    background: var(--ytcp-pink-soft);
    color: var(--ytcp-accent-2);
    border: 1px solid rgba(236, 72, 153, 0.35);
}

.ytcp-sidebar__footer {
    margin-top: 12px;
    padding-top: 4px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background: var(--ytcp-bg-secondary);
}

.ytcp-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease;
}
.ytcp-user:hover {
    background: var(--ytcp-accent-soft);
    border-color: var(--ytcp-border);
}

.ytcp-user__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ytcp-gradient);
    color: var(--ytcp-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.ytcp-user__info { flex: 1; min-width: 0; }
.ytcp-user__name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ytcp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ytcp-user__email {
    display: block;
    font-size: 11px;
    color: var(--ytcp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ytcp-sidebar .ytcp-btn-icon,
.ytcp-sidebar .ytcp-logout-btn {
    color: var(--ytcp-text-muted);
}
.ytcp-sidebar .ytcp-btn-icon:hover,
.ytcp-sidebar .ytcp-logout-btn:hover {
    color: var(--ytcp-accent);
}

/* Buttons */
.ytcp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--ytcp-radius);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .3px;
    border: none;
    cursor: pointer;
    transition: all .15s;
    text-transform: uppercase;
}

.ytcp-btn--primary {
    background: var(--ytcp-gradient);
    color: var(--ytcp-white);
    box-shadow: var(--ytcp-glow);
    border: none;
}
.ytcp-btn--primary:hover:not(:disabled) {
    background: var(--ytcp-gradient-hover);
    box-shadow: 0 0 28px rgba(139, 92, 246, 0.5), 0 4px 32px rgba(236, 72, 153, 0.3);
    color: #ffffff;
}
.ytcp-btn--primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.ytcp-btn--magic {
    background: var(--ytcp-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--ytcp-glow);
    transition: all .15s;
}
.ytcp-btn--magic:hover {
    background: var(--ytcp-gradient-hover);
    box-shadow: 0 0 32px rgba(139, 92, 246, 0.55), 0 4px 36px rgba(236, 72, 153, 0.35);
}

.ytcp-btn--yellow {
    background: var(--ytcp-yellow);
    color: var(--ytcp-black);
}
.ytcp-btn--yellow:hover { background: var(--ytcp-yellow-hover); }

.ytcp-btn--outline {
    background: transparent;
    color: var(--ytcp-text);
    border: 1px solid var(--ytcp-border);
}
.ytcp-btn--outline:hover {
    border-color: var(--ytcp-accent);
    color: var(--ytcp-accent);
    background: var(--ytcp-accent-soft);
}
.ytcp-app a.ytcp-btn--outline,
.ytcp-app a.ytcp-btn--outline:visited {
    color: var(--ytcp-text);
}
.ytcp-app a.ytcp-btn--outline:hover {
    color: var(--ytcp-accent);
}
.ytcp-app a.ytcp-btn--muted,
.ytcp-app a.ytcp-btn--muted:visited {
    color: var(--ytcp-text-dim);
}
.ytcp-app a.ytcp-btn--yellow,
.ytcp-app a.ytcp-btn--yellow:visited {
    color: var(--ytcp-black);
}

[data-theme="light"] .ytcp-btn--outline,
[data-theme="light"] .ytcp-app a.ytcp-btn--outline,
[data-theme="light"] .ytcp-app a.ytcp-btn--outline:visited {
    color: var(--ytcp-text);
    border-color: #94A3B8;
    background: #fff;
}
[data-theme="light"] .ytcp-btn--outline:hover,
[data-theme="light"] .ytcp-app a.ytcp-btn--outline:hover {
    color: var(--ytcp-accent);
    border-color: var(--ytcp-accent);
    background: var(--ytcp-accent-soft);
}

.ytcp-btn--muted {
    background: var(--ytcp-bg-card);
    color: var(--ytcp-text-dim);
    border: 1px solid var(--ytcp-border);
}

.ytcp-btn--full { width: 100%; }
.ytcp-btn.is-loading { pointer-events: none; opacity: .8; }

.ytcp-btn-icon {
    background: none;
    border: none;
    color: var(--ytcp-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.ytcp-btn-icon:hover { color: var(--ytcp-red); }

/* Auth */
.ytcp-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background: var(--ytcp-bg);
    background-image: var(--ytcp-glow-red);
}

.ytcp-auth__header {
    width: 100%;
    max-width: 440px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.ytcp-auth__card {
    width: 100%;
    max-width: 440px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 40px;
    box-shadow: var(--ytcp-shadow);
}

.ytcp-auth__title {
    font-size: 32px;
    font-weight: 800;
    margin: 8px 0 12px;
    text-transform: uppercase;
}

.ytcp-auth__subtitle {
    color: var(--ytcp-text-muted);
    margin-bottom: 28px;
}
.ytcp-auth__subtitle p {
    margin: 0 0 8px;
    line-height: 1.5;
}
.ytcp-auth__subtitle p:last-child {
    margin-bottom: 0;
}

.ytcp-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ytcp-text-dim);
}

.ytcp-page-title {
    font-size: 28px;
    font-weight: 800;
    margin: 4px 0 0;
}

/* Forms */
.ytcp-form { display: flex; flex-direction: column; gap: 16px; }

.ytcp-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ytcp-text-muted);
    margin-bottom: 8px;
}

.ytcp-field input,
.ytcp-field select,
.ytcp-search {
    width: 100%;
    padding: 12px 14px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    color: var(--ytcp-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s;
}

.ytcp-field input:focus,
.ytcp-field select:focus,
.ytcp-search:focus {
    outline: none;
    border-color: var(--ytcp-yellow);
}

.ytcp-field input:disabled,
.ytcp-field select:disabled { opacity: .6; cursor: not-allowed; }

.ytcp-field-hint {
    font-size: 12px;
    color: var(--ytcp-text-dim);
    margin-top: 6px;
}

.ytcp-select,
.ytcp-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    color: var(--ytcp-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s;
}

.ytcp-select:focus,
.ytcp-textarea:focus {
    outline: none;
    border-color: var(--ytcp-yellow);
}

.ytcp-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.45;
}

.ytcp-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ytcp-text-muted);
    cursor: pointer;
}

.ytcp-form__footer {
    text-align: center;
    font-size: 13px;
    color: var(--ytcp-text-muted);
    margin-top: 8px;
}

.ytcp-input-group {
    display: flex;
    align-items: center;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 0 14px;
    transition: border-color .2s;
}

.ytcp-input-group.is-valid { border-color: var(--ytcp-yellow); }
.ytcp-input-group input {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 10px;
    color: var(--ytcp-text);
    font-size: 14px;
    font-family: inherit;
}
.ytcp-input-group input:focus { outline: none; }
.ytcp-input-icon {
    display: flex;
    align-items: center;
    color: var(--ytcp-text-dim);
}

.ytcp-input-icon .ytcp-icon {
    width: 16px;
    height: 16px;
}
.ytcp-input-check { color: var(--ytcp-yellow); font-weight: 700; }

/* Onboarding */
.ytcp-onboarding {
    min-height: 100vh;
    padding: 32px 40px;
    max-width: 720px;
    margin: 0 auto;
}

.ytcp-onboarding__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.ytcp-onboarding__actions { display: flex; align-items: center; gap: 16px; }
.ytcp-link-muted { color: var(--ytcp-text-dim); font-size: 13px; }

.ytcp-onboarding__hero {
    text-align: center;
    margin-bottom: 40px;
    background-image: var(--ytcp-glow-red);
    padding: 40px 20px;
    border-radius: var(--ytcp-radius-lg);
}

.ytcp-onboarding__title {
    font-size: 36px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 12px 0;
    line-height: 1.2;
}

.ytcp-onboarding__subtitle {
    color: var(--ytcp-text-muted);
    max-width: 520px;
    margin: 0 auto 20px;
    font-size: 15px;
}

.ytcp-credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(229,9,20,.4);
    border-radius: 20px;
    background: rgba(229,9,20,.1);
    color: var(--ytcp-red);
    font-size: 13px;
    font-weight: 600;
}

.ytcp-onboarding__form { display: flex; flex-direction: column; gap: 20px; }

/* Video preview */
.ytcp-video-preview {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--ytcp-yellow);
    border-radius: var(--ytcp-radius);
    background: var(--ytcp-bg-card);
}

.ytcp-video-preview__thumb {
    width: 120px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.ytcp-video-preview__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.ytcp-video-preview__thumb img[hidden] {
    display: none !important;
}

.ytcp-video-preview__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    color: #ff0033;
    pointer-events: none;
}

.ytcp-video-preview__fallback[hidden] {
    display: none !important;
}

.ytcp-video-preview__fallback .ytcp-icon,
.ytcp-icon--yt-preview {
    width: 32px !important;
    height: 32px !important;
    display: block;
    margin: 0 auto;
    flex-shrink: 0;
}

.ytcp-video-preview__info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}

.ytcp-video-preview__info p {
    font-size: 12px;
    color: var(--ytcp-text-muted);
    margin: 0 0 8px;
}

.ytcp-video-preview__meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--ytcp-text-muted);
}

/* Steps */
.ytcp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.ytcp-step {
    padding: 20px 16px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    text-align: center;
    position: relative;
}

.ytcp-step__num {
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ytcp-text-dim);
}

.ytcp-step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 auto 8px;
    color: var(--ytcp-text-muted);
}

.ytcp-step__icon .ytcp-icon {
    width: 20px;
    height: 20px;
}
.ytcp-step p { font-size: 12px; color: var(--ytcp-text-muted); margin: 0; }

/* Main header */
.ytcp-main__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.ytcp-main__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme toggle — see .ytcp-theme-toggle in icon system above */

.ytcp-theme-toggle:hover {
    border-color: var(--ytcp-yellow);
    background: rgba(245,197,24,.1);
    color: var(--ytcp-yellow);
}

.ytcp-theme-switch {
    display: flex;
    gap: 8px;
}

.ytcp-theme-option {
    flex: 1;
    padding: 10px 14px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    color: var(--ytcp-text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ytcp-theme-option.is-active {
    border-color: var(--ytcp-yellow);
    color: var(--ytcp-yellow);
    background: rgba(245,197,24,.1);
}

/* Stats */
.ytcp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ytcp-stats-grid--compact { grid-template-columns: repeat(3, 1fr); }

.ytcp-stat-card {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 20px;
}

.ytcp-stat-card__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ytcp-text-dim);
    text-transform: uppercase;
}

.ytcp-stat-card__value {
    display: block;
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0 4px;
    line-height: 1;
}

.ytcp-stat-card__sub {
    font-size: 12px;
    color: var(--ytcp-text-muted);
}

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

.ytcp-card__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ytcp-text-dim);
    margin: 0 0 20px;
}

.ytcp-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Chart */
.ytcp-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: 20px;
}

.ytcp-chart__bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    min-width: 0;
}

.ytcp-chart__bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, var(--ytcp-red), var(--ytcp-yellow));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
}

.ytcp-chart__label {
    font-size: 10px;
    color: var(--ytcp-text-dim);
    margin-top: 8px;
}

/* Pro dashboard activity chart */
.ytcp-chart--pro {
    gap: 4px;
    height: 220px;
    padding: 12px 4px 0;
}

.ytcp-chart--pro .ytcp-chart__bar {
    max-width: 14px;
    width: 70%;
    min-height: 3px;
    border-radius: 999px;
    background: linear-gradient(to top, #EC4899 0%, #7C3AED 100%);
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
    transition: height .35s ease, filter .2s ease;
}

.ytcp-chart--pro .ytcp-chart__bar-wrap:hover .ytcp-chart__bar {
    filter: brightness(1.15);
}

.ytcp-chart--pro .ytcp-chart__label {
    font-size: 10px;
    margin-top: 10px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.ytcp-chart--pro .ytcp-chart__label--spacer {
    visibility: hidden;
}

.ytcp-chart--pro .ytcp-empty {
    width: 100%;
    text-align: center;
    align-self: center;
    margin: 0;
}

.ytcp-credits-panel { text-align: center; }
.ytcp-credits-panel__percent {
    font-size: 48px;
    font-weight: 800;
    color: var(--ytcp-red);
}

.ytcp-credits-panel__plan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
}

/* Period tabs */
.ytcp-period-tabs {
    display: flex;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    overflow: hidden;
}

.ytcp-period-tab {
    padding: 8px 14px;
    background: none;
    border: none;
    color: var(--ytcp-text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
}

.ytcp-period-tab.is-active {
    background: var(--ytcp-gradient);
    color: var(--ytcp-white);
}

/* Output breakdown */
.ytcp-output-breakdown {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.ytcp-output-breakdown__item {
    text-align: center;
    padding: 16px 8px;
    border-radius: var(--ytcp-radius);
    background: var(--ytcp-bg);
    border: 1px solid var(--ytcp-border);
}

.ytcp-output-breakdown__count {
    display: block;
    font-size: 24px;
    font-weight: 800;
}

.ytcp-color-yellow .ytcp-output-breakdown__count { color: var(--ytcp-yellow); }
.ytcp-color-green .ytcp-output-breakdown__count { color: var(--ytcp-green); }
.ytcp-color-blue .ytcp-output-breakdown__count { color: #3b82f6; }
.ytcp-color-purple .ytcp-output-breakdown__count { color: #a855f7; }
.ytcp-color-orange .ytcp-output-breakdown__count { color: #f97316; }
.ytcp-color-pink .ytcp-output-breakdown__count { color: #ec4899; }

.ytcp-output-breakdown__item small {
    display: block;
    font-size: 11px;
    color: var(--ytcp-text-dim);
}

/* CTA bar */
.ytcp-cta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-top: 3px solid var(--ytcp-red);
    border-radius: var(--ytcp-radius);
    gap: 20px;
}

.ytcp-cta-bar p {
    margin: 0;
    color: var(--ytcp-text-muted);
    flex: 1;
}

/* Elegant dashboard */
.ytcp-dashboard-page .ytcp-page-desc {
    margin: 6px 0 0;
    color: var(--ytcp-text-muted);
    font-size: 14px;
}
.ytcp-dash-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}
.ytcp-dash-stats .ytcp-dash-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-radius: 16px;
    padding: 18px 20px;
    transition: border-color .2s, box-shadow .2s;
}
.ytcp-dash-stats .ytcp-dash-stat:hover {
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.08);
}
.ytcp-dash-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ytcp-dash-stat__icon .ytcp-icon { width: 18px; height: 18px; }
.ytcp-dash-stat__icon--violet { background: rgba(124, 58, 237, 0.12); color: #8b5cf6; }
.ytcp-dash-stat__icon--green { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.ytcp-dash-stat__icon--amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.ytcp-dash-stat__icon--pink { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.ytcp-dash-stat .ytcp-stat-card__value { font-size: 30px; margin: 6px 0 2px; }
.ytcp-dash-activity,
.ytcp-dash-plan,
.ytcp-dash-outputs {
    border-radius: 16px;
}
.ytcp-dash-activity__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.ytcp-dash-activity__head .ytcp-card__title { margin-bottom: 0; }
.ytcp-dash-activity__hint {
    font-size: 12px;
    color: var(--ytcp-text-dim);
}
.ytcp-dash-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ytcp-dash-plan .ytcp-card__title {
    align-self: flex-start;
    width: 100%;
}
.ytcp-dash-plan__ring {
    --pct: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 8px 0 14px;
    background:
        radial-gradient(closest-side, var(--ytcp-bg-card) 78%, transparent 79%),
        conic-gradient(#7C3AED calc(var(--pct) * 1%), rgba(148, 163, 184, 0.2) 0);
    font-size: 22px;
    font-weight: 800;
}
.ytcp-dash-plan__badge {
    font-size: 11px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ytcp-dash-plan__seats {
    width: 100%;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--ytcp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
}
.ytcp-dash-plan__seats-label {
    display: block;
    font-size: 11px;
    color: var(--ytcp-text-dim);
    margin-bottom: 2px;
}
.ytcp-output-breakdown--pro {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.ytcp-output-breakdown--pro .ytcp-output-breakdown__item {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--ytcp-border);
    background: rgba(148, 163, 184, 0.04);
}
.ytcp-dash-cta {
    border-radius: 16px;
    align-items: center;
}
.ytcp-dash-cta strong {
    display: block;
    margin-bottom: 4px;
}
.ytcp-dash-cta p { margin: 0; flex: none; }

@media (max-width: 900px) {
    .ytcp-dash-grid { grid-template-columns: 1fr; }
    .ytcp-dash-toolbar { justify-content: stretch; }
    .ytcp-dash-toolbar .ytcp-period-tabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
    }
}

/* Library */
.ytcp-library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.ytcp-search { max-width: 280px; }

.ytcp-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 20px;
    overflow: visible;
}

.ytcp-video-card {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    overflow: visible;
    transition: border-color .15s, transform .15s;
    color: var(--ytcp-text);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.ytcp-video-card:hover {
    border-color: var(--ytcp-yellow);
    transform: translateY(-2px);
    z-index: 5;
}

.ytcp-video-card__thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--ytcp-radius-lg) var(--ytcp-radius-lg) 0 0;
}

.ytcp-video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytcp-video-card__duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(0,0,0,.85);
    color: #fff;
}

.ytcp-video-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0,0,0,.55);
    opacity: 0;
    transition: opacity .2s;
}

.ytcp-video-card:hover .ytcp-video-card__overlay {
    opacity: 1;
}

.ytcp-status-completed { color: var(--ytcp-green); }
.ytcp-status-failed { color: var(--ytcp-red); }
.ytcp-status-processing { color: var(--ytcp-yellow); }

.ytcp-video-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow: visible;
}

.ytcp-video-card__status {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0,0,0,.7);
}

.ytcp-video-card h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ytcp-video-card__channel {
    font-size: 12px;
    color: var(--ytcp-text-muted);
    margin: 0;
}

.ytcp-video-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    overflow: visible;
}

.ytcp-video-card__icons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    overflow: visible;
    padding-top: 6px;
}

.ytcp-video-card__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: var(--ytcp-text-dim);
    opacity: .55;
    flex-shrink: 0;
    transition: opacity .15s, color .15s, background .15s;
    z-index: 2;
}

.ytcp-video-card__icon:hover {
    opacity: 1;
    background: var(--ytcp-bg-input);
}

.ytcp-video-card__icon--yellow:hover { color: var(--ytcp-yellow); }
.ytcp-video-card__icon--green:hover { color: var(--ytcp-green); }
.ytcp-video-card__icon--blue:hover { color: #3b82f6; }
.ytcp-video-card__icon--orange:hover { color: #f97316; }
.ytcp-video-card__icon--pink:hover { color: #ec4899; }
.ytcp-video-card__icon--purple:hover { color: #a855f7; }
.ytcp-video-card__icon--red:hover { color: var(--ytcp-red); }

.ytcp-video-card__icon.has-output {
    opacity: 1;
    color: var(--ytcp-yellow);
}

.ytcp-video-card__icon-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ytcp-green);
    border: 1px solid var(--ytcp-bg-card);
}

.ytcp-video-card__icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--ytcp-bg-secondary);
    border: 1px solid var(--ytcp-border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--ytcp-text);
    z-index: 30;
    pointer-events: none;
    box-shadow: var(--ytcp-shadow);
}

.ytcp-video-card__icon:first-child[data-tooltip]:hover::after {
    left: 0;
    transform: none;
}

.ytcp-video-card__icon:last-child[data-tooltip]:hover::after,
.ytcp-video-card__icon:nth-last-child(2)[data-tooltip]:hover::after {
    left: auto;
    right: 0;
    transform: none;
}

.ytcp-video-card__time {
    font-size: 11px;
    color: var(--ytcp-text-dim);
    white-space: nowrap;
    text-align: right;
}

.ytcp-output-card.is-focused {
    border-color: var(--ytcp-green);
    box-shadow: 0 0 0 2px rgba(34,197,94,.25);
}

/* Follow-up script steps */
.ytcp-followup-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ytcp-followup-step {
    padding: 24px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
}

.ytcp-followup-step__num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    color: var(--ytcp-red);
}

.ytcp-followup-step h3 {
    margin: 8px 0 6px;
    font-size: 16px;
}

.ytcp-followup-step p {
    margin: 0;
    font-size: 13px;
    color: var(--ytcp-text-muted);
}

/* Premium outputs page */
.ytcp-premium-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ytcp-premium-card {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    overflow: hidden;
}

.ytcp-premium-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
    flex-wrap: wrap;
}

.ytcp-premium-card__info {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 240px;
}

.ytcp-premium-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
}

.ytcp-premium-card--purple .ytcp-premium-card__icon { background: rgba(168,85,247,.15); color: #a855f7; }
.ytcp-premium-card--blue .ytcp-premium-card__icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.ytcp-premium-card--green .ytcp-premium-card__icon { background: rgba(34,197,94,.15); color: var(--ytcp-green); }
.ytcp-premium-card--yellow .ytcp-premium-card__icon { background: rgba(250,204,21,.15); color: var(--ytcp-yellow); }
.ytcp-premium-card--orange .ytcp-premium-card__icon { background: rgba(249,115,22,.15); color: #f97316; }
.ytcp-premium-card--pink .ytcp-premium-card__icon { background: rgba(236,72,153,.15); color: #ec4899; }
.ytcp-premium-card--red .ytcp-premium-card__icon { background: rgba(229,9,20,.12); color: var(--ytcp-red); }

.ytcp-premium-card__info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.ytcp-premium-card__info p {
    margin: 0;
    font-size: 13px;
    color: var(--ytcp-text-muted);
    line-height: 1.5;
    max-width: 520px;
}

.ytcp-premium-card__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ytcp-premium-card__credits {
    font-size: 14px;
    font-weight: 700;
    color: var(--ytcp-yellow);
}

.ytcp-alert-banner--compact {
    margin: 0 24px 0;
    padding: 8px 12px;
    font-size: 12px;
}

.ytcp-premium-card__footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    border-top: 1px solid var(--ytcp-border);
    font-size: 12px;
    flex-wrap: wrap;
}

.ytcp-premium-card__recent {
    padding: 0 24px 20px;
    border-top: 1px solid var(--ytcp-border);
}

.ytcp-premium-card__recent-title {
    margin: 16px 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ytcp-text);
}

.ytcp-premium-recent-empty {
    padding: 16px;
    text-align: center;
    background: var(--ytcp-bg-input);
    border-radius: var(--ytcp-radius);
    font-size: 13px;
}

.ytcp-premium-recent-empty p {
    margin: 0 0 4px;
}

.ytcp-premium-recent-list {
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    overflow: hidden;
}

.ytcp-video-card__icon--premium {
    border: 1px solid rgba(168, 85, 247, .2);
}

/* Process card */
.ytcp-process-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 32px;
}

.ytcp-lang-display {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.ytcp-batch-panel {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--ytcp-border);
}

.ytcp-batch-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.ytcp-batch-panel__header h3,
.ytcp-batch-panel h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.ytcp-batch-panel--locked {
    opacity: .85;
}

.ytcp-batch-panel .ytcp-btn {
    margin-top: 12px;
}

.ytcp-batch-status {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ytcp-batch-status__row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    font-size: 12px;
    color: var(--ytcp-text-muted);
}

.ytcp-batch-status__row strong {
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px;
}

.ytcp-batch-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ytcp-text-dim);
    flex-shrink: 0;
}

.ytcp-batch-status__row.is-queued .ytcp-batch-status__dot { background: #f59e0b; }
.ytcp-batch-status__row.is-processing .ytcp-batch-status__dot { background: #3b82f6; }
.ytcp-batch-status__row.is-completed .ytcp-batch-status__dot { background: var(--ytcp-green); }
.ytcp-batch-status__row.is-failed .ytcp-batch-status__dot { background: #ef4444; }

.ytcp-batch-status__row a {
    color: var(--ytcp-yellow);
    font-weight: 600;
}

/* Workspace */
.ytcp-workspace__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ytcp-back {
    color: var(--ytcp-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.ytcp-back:hover { color: var(--ytcp-yellow); }

.ytcp-workspace__video {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
}

.ytcp-workspace__thumb {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}

.ytcp-workspace__video h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.ytcp-workspace__meta {
    font-size: 13px;
    color: var(--ytcp-text-muted);
    margin: 0;
}

.ytcp-workspace__status {
    display: flex;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ytcp-border);
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--ytcp-text-muted);
}

.ytcp-workspace__status strong { color: var(--ytcp-text); font-size: 14px; }
.ytcp-workspace__status em { font-style: normal; }

.ytcp-transcript-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    margin-bottom: 12px;
    cursor: pointer;
}

.ytcp-transcript-card h3 { margin: 0 0 4px; font-size: 15px; }
.ytcp-transcript-card p { margin: 0; font-size: 13px; color: var(--ytcp-text-muted); }
.ytcp-transcript-card__icon { font-size: 24px; }

.ytcp-transcript-panel {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 20px;
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
}

.ytcp-transcript-panel__content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ytcp-text-muted);
    white-space: pre-wrap;
}

.ytcp-workspace__toolbar {
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--ytcp-text-muted);
}

/* Output grid */
.ytcp-output-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ytcp-output-card {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ytcp-output-card.is-locked,
.ytcp-output-card.is-premium-label {
    opacity: 1;
}

.ytcp-output-card.is-premium-label .ytcp-output-card__status {
    color: var(--ytcp-yellow);
}

.ytcp-alert-banner--info {
    background: rgba(245,197,24,.1);
    border-color: rgba(245,197,24,.35);
}
.ytcp-alert-banner--info a {
    color: var(--ytcp-yellow);
}

.ytcp-output-card.is-locked { opacity: .6; }

.ytcp-output-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.ytcp-output-card__icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.ytcp-output-card--yellow .ytcp-output-card__icon { background: rgba(245,197,24,.2); color: var(--ytcp-yellow); }
.ytcp-output-card--green .ytcp-output-card__icon { background: rgba(34,197,94,.2); color: var(--ytcp-green); }
.ytcp-output-card--blue .ytcp-output-card__icon { background: rgba(59,130,246,.2); color: #3b82f6; }
.ytcp-output-card--purple .ytcp-output-card__icon { background: rgba(168,85,247,.2); color: #a855f7; }
.ytcp-output-card--orange .ytcp-output-card__icon { background: rgba(249,115,22,.2); color: #f97316; }
.ytcp-output-card--pink .ytcp-output-card__icon { background: rgba(236,72,153,.2); color: #ec4899; }
.ytcp-output-card--red .ytcp-output-card__icon { background: rgba(229,9,20,.2); color: var(--ytcp-red); }

.ytcp-output-card__icon .ytcp-icon {
    width: 14px;
    height: 14px;
}

.ytcp-transcript-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(245,197,24,.12);
    color: var(--ytcp-yellow);
    flex-shrink: 0;
}
.ytcp-transcript-card__icon .ytcp-icon { width: 18px; height: 18px; }

.ytcp-alert-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(229,9,20,.12);
    border: 1px solid rgba(229,9,20,.3);
    border-radius: var(--ytcp-radius);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--ytcp-text);
}
.ytcp-alert-banner a {
    color: var(--ytcp-red);
    font-weight: 600;
    margin-left: auto;
    white-space: nowrap;
}

.ytcp-output-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.3);
    border-radius: 20px;
    font-size: 11px;
    color: var(--ytcp-green);
    font-weight: 600;
}

.ytcp-stat-card--inline {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.ytcp-stat-card__icon {
    display: flex;
    margin-top: 4px;
    opacity: .85;
}
.ytcp-stat-card__icon .ytcp-icon { width: 18px; height: 18px; }
.ytcp-stat-card--inline .ytcp-stat-card__value {
    font-size: 24px;
    margin: 2px 0;
}

.ytcp-empty-state__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.ytcp-settings-nav__icon {
    display: flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: .7;
}
.ytcp-settings-nav__item.is-active .ytcp-settings-nav__icon { opacity: 1; color: var(--ytcp-red); }

.ytcp-output-card__status {
    font-size: 13px;
    color: var(--ytcp-text-muted);
    flex: 1;
    margin: 0;
}

.ytcp-output-card.is-generating {
    border-color: var(--ytcp-yellow);
    box-shadow: 0 0 0 1px var(--ytcp-yellow);
}

/* Settings */
.ytcp-settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
}

.ytcp-settings-content {
    max-width: 640px;
}

/* Editor */
.ytcp-editor__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 20px;
}

.ytcp-editor__title-input {
    font-size: 22px;
    font-weight: 700;
    background: none;
    border: none;
    color: var(--ytcp-text);
    width: 100%;
    font-family: inherit;
    padding: 4px 0;
    margin-top: 4px;
}

.ytcp-editor__title-input:focus { outline: none; border-bottom: 2px solid var(--ytcp-yellow); }

.ytcp-editor__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.ytcp-editor__source {
    font-size: 13px;
    color: var(--ytcp-text-muted);
    margin-bottom: 16px;
}

.ytcp-editor__toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius) var(--ytcp-radius) 0 0;
    flex-wrap: wrap;
}

.ytcp-editor__toolbar button {
    padding: 6px 12px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: 4px;
    color: var(--ytcp-text);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
}

.ytcp-editor__toolbar button:hover {
    border-color: var(--ytcp-yellow);
    color: var(--ytcp-yellow);
}

.ytcp-editor__content {
    min-height: 500px;
    padding: 24px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-top: none;
    border-radius: 0 0 var(--ytcp-radius) var(--ytcp-radius);
    line-height: 1.7;
    font-size: 15px;
}

.ytcp-editor__content:focus { outline: none; }
.ytcp-editor__content h1, .ytcp-editor__content h2, .ytcp-editor__content h3 { margin-top: 1.5em; }
.ytcp-editor__content h1:first-child, .ytcp-editor__content h2:first-child { margin-top: 0; }

.ytcp-export-dropdown { position: relative; }

.ytcp-export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    overflow: hidden;
    z-index: 50;
    min-width: 120px;
}

.ytcp-export-menu button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--ytcp-text);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
}

.ytcp-export-menu button:hover { background: var(--ytcp-bg-input); color: var(--ytcp-yellow); }

/* Alerts */
.ytcp-alert {
    padding: 12px 16px;
    border-radius: var(--ytcp-radius);
    font-size: 13px;
    margin-top: 12px;
}

.ytcp-alert--error {
    background: rgba(229,9,20,.15);
    border: 1px solid rgba(229,9,20,.3);
    color: var(--ytcp-red);
}

.ytcp-alert--success {
    background: rgba(34,197,94,.15);
    border: 1px solid rgba(34,197,94,.3);
    color: var(--ytcp-green);
}

/* Empty states */
.ytcp-empty, .ytcp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ytcp-text-muted);
}

.ytcp-empty-state p { margin-bottom: 20px; }

/* Spinner */
@keyframes ytcp-spin {
    to { transform: rotate(360deg); }
}

.ytcp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: var(--ytcp-accent);
    border-radius: 50%;
    animation: ytcp-spin .6s linear infinite;
}

/* Responsive */
@media (max-width: 1024px) {
    .ytcp-sidebar { width: 220px; }
    .ytcp-main { margin-left: 220px; padding: 24px; }
    .ytcp-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .ytcp-output-grid { grid-template-columns: repeat(2, 1fr); }
    .ytcp-dashboard-grid { grid-template-columns: 1fr; }
    .ytcp-output-breakdown { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .ytcp-library-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 768px) {
    .ytcp-followup-steps { grid-template-columns: 1fr; }
    .ytcp-premium-card__top { flex-direction: column; }
    .ytcp-library-grid {
        grid-template-columns: 1fr;
    }
    .ytcp-video-card__icons {
        flex-wrap: wrap;
        gap: 6px;
    }
    .ytcp-sidebar-toggle {
        display: inline-flex;
    }
    .ytcp-sidebar-close {
        display: inline-flex;
    }
    .ytcp-sidebar {
        width: min(280px, 86vw);
        transform: translateX(-105%);
        transition: transform .28s ease;
        z-index: 1050;
        box-shadow: none;
        padding: 12px 10px;
    }
    .ytcp-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
    }
    body.ytcp-sidebar-open {
        overflow: hidden;
    }
    .ytcp-sidebar__brand {
        margin-bottom: 16px;
        padding: 0 4px;
    }
    .ytcp-logo--sidebar {
        max-width: 150px;
    }
    .ytcp-sidebar__label {
        font-size: 9px;
        margin: 12px 6px 6px;
    }
    .ytcp-nav-item {
        padding: 7px 8px;
        gap: 8px;
        font-size: 12px;
        border-radius: 8px;
        min-height: 36px;
    }
    .ytcp-nav-icon {
        width: 26px;
        height: 26px;
    }
    .ytcp-nav-icon .ytcp-icon {
        width: 14px;
        height: 14px;
    }
    .ytcp-nav-upgrade {
        font-size: 8px;
        padding: 1px 6px;
    }
    .ytcp-credits-widget {
        padding: 10px;
        margin-top: 8px;
    }
    .ytcp-user__avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .ytcp-user__name { font-size: 11px; }
    .ytcp-user__email { font-size: 10px; }
    .ytcp-main {
        margin-left: 0;
        padding: 16px;
        padding-top: 60px;
        width: 100%;
    }
    .ytcp-main__header {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }
    .ytcp-theme-toggle {
        width: 34px;
        height: 34px;
    }
    .ytcp-theme-toggle .ytcp-icon {
        width: 14px;
        height: 14px;
    }
    .ytcp-page-title {
        font-size: 22px;
    }
    .ytcp-icon {
        width: 14px;
        height: 14px;
    }
    .ytcp-icon--lg {
        width: 28px;
        height: 28px;
    }
    .ytcp-hero__url-icon,
    .ytcp-input-icon .ytcp-icon {
        width: 18px;
        height: 18px;
    }
    .ytcp-steps { grid-template-columns: 1fr; }
    .ytcp-output-grid { grid-template-columns: 1fr; }
    .ytcp-stats-grid { grid-template-columns: 1fr 1fr; }
    .ytcp-onboarding { padding: 20px 16px; }
    .ytcp-settings-layout { grid-template-columns: 1fr; }
    .ytcp-cta-bar { flex-direction: column; text-align: center; }
    .ytcp-period-tabs { display: none; }
    .ytcp-gen-status {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        min-width: 0;
    }
}

/* Hide WP theme interference — full standalone app */
html.ytcp-app-page,
body.ytcp-app-page {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    background: var(--ytcp-bg, #0a0a0a) !important;
    min-height: 100vh;
}

body.ytcp-app-page #wpadminbar { display: none !important; }

body.ytcp-app-page .ytcp-app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.ytcp-app .ytcp-layout {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    background: var(--ytcp-bg);
}

.ytcp-sidebar__brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ytcp-text);
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.ytcp-sidebar__brand a .ytcp-logo {
    width: 100%;
    max-width: 196px;
}

/* Landing page */
.ytcp-landing {
    background: var(--ytcp-bg);
    min-height: 100vh;
    color: var(--ytcp-text);
}

.ytcp-landing .ytcp-btn {
    text-transform: none;
    letter-spacing: 0;
}

.ytcp-landing-header {
    background: var(--ytcp-bg-secondary);
    border-bottom: 1px solid var(--ytcp-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.ytcp-landing-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ytcp-landing-header .ytcp-sidebar__brand {
    margin-bottom: 0;
    padding: 0;
    text-decoration: none;
    color: var(--ytcp-text);
}

.ytcp-landing-header .ytcp-logo--header {
    height: 44px;
    max-width: 220px;
}

.ytcp-landing-header__nav {
    display: flex;
    gap: 32px;
}

.ytcp-landing-header__nav a {
    color: var(--ytcp-text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .15s;
}

.ytcp-landing-header__nav a:hover { color: var(--ytcp-text); }

.ytcp-landing-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ytcp-link-muted {
    color: var(--ytcp-text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.ytcp-link-muted:hover { color: var(--ytcp-text); }

.ytcp-btn--sm { padding: 10px 18px; font-size: 13px; border-radius: 10px; text-transform: none; font-weight: 600; }
.ytcp-btn--lg { padding: 16px 32px; font-size: 15px; border-radius: 12px; text-transform: none; font-weight: 700; }

/* Hero */
.ytcp-hero {
    text-align: center;
    padding: 72px 32px 56px;
    max-width: 920px;
    margin: 0 auto;
}

.ytcp-hero__title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
    color: var(--ytcp-text);
    text-transform: none;
}

.ytcp-hero__subtitle {
    font-size: 17px;
    color: var(--ytcp-text-muted);
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto 36px;
}

.ytcp-hero__url-form {
    max-width: 720px;
    margin: 0 auto 28px;
}

.ytcp-hero__url-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 18px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    box-shadow: var(--ytcp-shadow);
}

.ytcp-hero__url-icon {
    font-size: 18px;
    opacity: .7;
    flex-shrink: 0;
}

.ytcp-hero__url-bar input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--ytcp-text);
    font-size: 15px;
    padding: 10px 0;
    outline: none;
}

.ytcp-hero__url-bar input::placeholder { color: var(--ytcp-text-dim); }

.ytcp-hero__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.ytcp-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ytcp-text-muted);
}

.ytcp-hero__tag-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--ytcp-accent-soft);
    font-size: 12px;
}

/* Magic steps flow */
.ytcp-magic-steps {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.ytcp-magic-steps__header {
    text-align: center;
    margin-bottom: 48px;
}

.ytcp-magic-steps__header h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    margin: 12px 0 0;
    text-transform: none;
    letter-spacing: -0.02em;
}

.ytcp-magic-steps__flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.ytcp-magic-step {
    padding: 28px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    text-align: left;
}

.ytcp-magic-step__num {
    font-size: 12px;
    font-weight: 700;
    color: var(--ytcp-accent);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    display: block;
}

.ytcp-magic-step h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
}

.ytcp-magic-step p {
    color: var(--ytcp-text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.ytcp-magic-step--engine {
    text-align: center;
    padding: 32px 28px;
    position: relative;
    border-color: var(--ytcp-accent-border);
    box-shadow: var(--ytcp-glow);
}

.ytcp-magic-step__engine-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--ytcp-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--ytcp-glow);
}

.ytcp-magic-step--engine h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.ytcp-magic-step--engine p {
    font-size: 13px;
}

.ytcp-magic-steps__connector {
    display: none;
}

.ytcp-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 32px;
}

.ytcp-section__header { margin-bottom: 48px; }
.ytcp-section__header h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.12;
    margin: 12px 0;
    text-transform: none;
    letter-spacing: -0.02em;
}
.ytcp-section__header p { color: var(--ytcp-text-muted); font-size: 16px; max-width: 520px; line-height: 1.6; }
.ytcp-section__header--center { text-align: center; }
.ytcp-section__header--center p { margin: 0 auto; }
.ytcp-section__header--split {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.ytcp-products__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ytcp-product-card {
    padding: 24px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.ytcp-product-card:hover {
    border-color: var(--ytcp-accent-border);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.12);
    transform: translateY(-2px);
}

.ytcp-product-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ytcp-accent-soft);
    font-size: 18px;
    margin-bottom: 14px;
}

.ytcp-product-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.ytcp-product-card p { color: var(--ytcp-text-muted); font-size: 13px; margin: 0; line-height: 1.5; }

.ytcp-pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.ytcp-pricing-card {
    padding: 32px 28px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.ytcp-pricing-card--featured {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--ytcp-bg-card), var(--ytcp-bg-card)) padding-box,
        var(--ytcp-gradient) border-box;
    box-shadow: var(--ytcp-glow);
    transform: scale(1.02);
}

.ytcp-pricing-card__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ytcp-text-muted);
    margin-bottom: 8px;
}

.ytcp-pricing-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ytcp-pricing-card__price {
    font-size: 40px;
    font-weight: 800;
    margin: 20px 0;
    letter-spacing: -0.02em;
}

.ytcp-pricing-card__price span {
    font-size: 16px;
    font-weight: 500;
    color: var(--ytcp-text-muted);
}

.ytcp-pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex: 1;
}

.ytcp-pricing-card li {
    padding: 10px 0;
    color: var(--ytcp-text-muted);
    font-size: 14px;
    border-bottom: 1px solid var(--ytcp-border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ytcp-pricing-card li::before {
    content: '✓';
    color: #a855f7;
    font-weight: 700;
    flex-shrink: 0;
}

.ytcp-pricing-card li.is-outputs::before {
    content: '★';
    color: #facc15;
    font-size: 15px;
    line-height: 1.2;
}

.ytcp-pricing-card li.is-outputs-header {
    border-bottom: none;
    padding-bottom: 4px;
    margin-top: 6px;
}

.ytcp-pricing-card li.is-outputs-header::before {
    content: '★';
    color: #facc15;
}

.ytcp-pricing-card li.is-outputs-header .ytcp-pricing-feature__label {
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ytcp-text);
    font-size: 12px;
}

.ytcp-pricing-card li.is-output-item {
    padding: 6px 0 6px 4px;
    font-size: 13px;
    border-bottom: none;
}

.ytcp-pricing-card li.is-output-item::before {
    content: '✓';
    color: #a855f7;
}

.ytcp-pricing-card li.is-denied {
    color: var(--ytcp-text-muted);
    font-size: 14px;
    font-weight: inherit;
}

.ytcp-pricing-card li.is-denied .ytcp-pricing-feature__text {
    color: var(--ytcp-text-muted);
    font-size: 14px;
    font-weight: inherit;
}

.ytcp-pricing-card li.is-denied::before {
    content: '✕';
    color: #ef4444;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.ytcp-pricing-feature__body {
    flex: 1;
    min-width: 0;
}

.ytcp-pricing-feature__label {
    display: block;
    font-weight: 600;
    color: var(--ytcp-text);
    margin-bottom: 4px;
}

.ytcp-pricing-feature__detail {
    display: block;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ytcp-text-muted);
}

.ytcp-settings-nav__item--external .ytcp-icon--xs {
    margin-left: auto;
    opacity: .65;
}

.ytcp-pricing-card .ytcp-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ytcp-gradient);
    color: #fff;
    border: none;
    padding: 6px 14px;
    font-size: 11px;
    letter-spacing: 0.08em;
    border-radius: 999px;
    box-shadow: var(--ytcp-glow);
}

.ytcp-cta-section {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 32px;
}

.ytcp-cta-card {
    text-align: center;
    padding: 56px 40px;
    background: var(--ytcp-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ytcp-border);
    border-radius: 20px;
    box-shadow: var(--ytcp-shadow);
}

.ytcp-cta-card h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
    text-transform: none;
}

.ytcp-landing-footer {
    border-top: 1px solid var(--ytcp-border);
    padding: 32px;
    background: var(--ytcp-bg-secondary);
}

.ytcp-landing-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ytcp-landing-footer .ytcp-sidebar__brand { margin-bottom: 0; padding: 0; }

.ytcp-landing-footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.ytcp-landing-footer__nav a {
    color: var(--ytcp-text-muted);
    font-size: 13px;
    text-decoration: none;
}
.ytcp-landing-footer__nav a:hover { color: var(--ytcp-text); }
.ytcp-landing-footer__copy { color: var(--ytcp-text-dim); font-size: 12px; margin: 0; }

/* Auth page with landing header */
.ytcp-auth-page { min-height: 100vh; background: var(--ytcp-bg); }
.ytcp-auth-page .ytcp-auth {
    padding: 60px 20px 80px;
    min-height: auto;
}

/* Settings sub-nav */
.ytcp-settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 200px;
}

.ytcp-settings-nav__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--ytcp-radius);
    color: var(--ytcp-text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .15s;
}

.ytcp-app a.ytcp-settings-nav__item {
    color: var(--ytcp-text-muted);
}

.ytcp-settings-nav__item:hover,
.ytcp-app a.ytcp-settings-nav__item:hover {
    color: var(--ytcp-text);
    background: var(--ytcp-bg-input);
}

.ytcp-settings-nav__item.is-active,
.ytcp-app a.ytcp-settings-nav__item.is-active {
    color: var(--ytcp-accent);
    background: var(--ytcp-accent-soft);
    border-left-color: var(--ytcp-accent);
    font-weight: 600;
}

.ytcp-settings-panel {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.ytcp-settings-panel--danger { border-color: rgba(229,9,20,.3); }
.ytcp-settings-panel__title { font-size: 14px; margin: 0 0 16px; }
.ytcp-settings-panel__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ytcp-settings-panel__actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

.ytcp-plan-card__icon {
    display: flex;
    color: var(--ytcp-yellow);
}
.ytcp-plan-card__icon .ytcp-icon { width: 18px; height: 18px; }

.ytcp-plan-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.ytcp-progress--lg { height: 8px; margin: 12px 0; }

.ytcp-feature-list { list-style: none; padding: 0; margin: 0 0 20px; }
.ytcp-feature-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--ytcp-border);
    font-size: 14px;
}

.ytcp-badge--green { background: rgba(34,197,94,.15); color: var(--ytcp-green); border: 1px solid rgba(34,197,94,.3); }
.ytcp-badge--muted { background: var(--ytcp-bg-input); color: var(--ytcp-text-dim); border: 1px solid var(--ytcp-border); }

.ytcp-plans-list { display: flex; flex-direction: column; gap: 16px; }
.ytcp-plan-offer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    flex-wrap: wrap;
}
.ytcp-plan-offer__price { font-size: 24px; font-weight: 800; margin: 4px 0; }
.ytcp-plan-offer__price span { font-size: 14px; color: var(--ytcp-text-muted); font-weight: 400; }
.ytcp-plan-offer__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ytcp-tag {
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--ytcp-border);
    border-radius: 20px;
    color: var(--ytcp-text-muted);
}

.ytcp-extra-balance {
    text-align: center;
    padding: 40px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    margin-bottom: 24px;
}
.ytcp-extra-balance__num { font-size: 72px; font-weight: 800; color: var(--ytcp-red); display: block; }

.ytcp-token-packs { display: flex; flex-direction: column; gap: 12px; }
.ytcp-token-pack {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    flex-wrap: wrap;
    gap: 16px;
}
.ytcp-token-pack__price { font-size: 20px; font-weight: 700; color: var(--ytcp-yellow); margin: 4px 0; }

/* Toggle switches */
.ytcp-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--ytcp-border);
    gap: 20px;
}
.ytcp-toggle-row strong { display: block; font-size: 14px; }

.ytcp-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.ytcp-toggle input { opacity: 0; width: 0; height: 0; }
.ytcp-toggle__slider {
    position: absolute;
    inset: 0;
    background: var(--ytcp-border);
    border-radius: 26px;
    cursor: pointer;
    transition: .2s;
}
.ytcp-toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .2s;
}
.ytcp-toggle input:checked + .ytcp-toggle__slider { background: var(--ytcp-red); }
.ytcp-toggle input:checked + .ytcp-toggle__slider::before { transform: translateX(22px); }

.ytcp-btn--danger {
    background: transparent;
    border: 1px solid var(--ytcp-red);
    color: var(--ytcp-red);
}
.ytcp-btn--danger:hover { background: rgba(239, 68, 68, 0.1); }

.ytcp-form--inline {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.ytcp-form--inline input { flex: 1; min-width: 200px; }

.ytcp-page-desc { color: var(--ytcp-text-muted); font-size: 15px; margin-top: 8px; max-width: 600px; }

.ytcp-card__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.ytcp-card__toolbar h3 { margin: 0; font-size: 14px; }

.ytcp-output-list { display: flex; flex-direction: column; }
.ytcp-output-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ytcp-border);
    color: var(--ytcp-text);
    text-decoration: none;
    transition: background .15s;
    gap: 16px;
}
.ytcp-output-list__item:hover { background: var(--ytcp-bg-input); }
.ytcp-output-list__info strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.ytcp-output-list__meta { font-size: 12px; color: var(--ytcp-text-muted); }
.ytcp-output-list__arrow { display: flex; opacity: .4; }
.ytcp-output-list__item:hover .ytcp-output-list__arrow { opacity: 1; color: var(--ytcp-yellow); }

.ytcp-output-table-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ytcp-output-table__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 4px 8px 0;
}
.ytcp-output-table__search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 8px 12px;
}
.ytcp-output-table__search input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--ytcp-text);
    font-size: 13px;
    outline: none;
}
.ytcp-output-table-scroll {
    width: 100%;
    overflow-x: auto;
}
.ytcp-output-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}
.ytcp-output-table th,
.ytcp-output-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--ytcp-border);
    font-size: 13px;
    vertical-align: middle;
}
.ytcp-output-table th {
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ytcp-text-muted);
    font-weight: 700;
    background: rgba(255,255,255,.02);
}
.ytcp-output-row__title {
    color: var(--ytcp-text);
    font-weight: 600;
    text-decoration: none;
}
.ytcp-output-row__title:hover { color: var(--ytcp-accent); }
.ytcp-output-table__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    white-space: nowrap;
}
.ytcp-output-table__actions-col { width: 1%; }
.ytcp-btn--xs {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 0;
    line-height: 1.2;
}
.ytcp-btn--danger {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .35);
}
.ytcp-btn--danger:hover {
    background: rgba(239, 68, 68, .12);
    color: #fecaca;
}
.ytcp-output-table__empty {
    margin: 0;
    padding: 20px 8px;
    text-align: center;
}
.ytcp-output-row[hidden] { display: none !important; }

/* Generate modal */
body.ytcp-modal-open { overflow: hidden; }

.ytcp-modal[hidden] { display: none !important; }
.ytcp-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.ytcp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
}
.ytcp-modal__panel {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: min(90vh, 820px);
    background: var(--ytcp-bg-secondary);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--ytcp-shadow);
}
.ytcp-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.ytcp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ytcp-border);
    flex-shrink: 0;
}
.ytcp-modal__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.ytcp-modal__toolbar {
    display: flex;
    gap: 12px;
    padding: 16px 24px 0;
}
.ytcp-modal__search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 0 12px;
}
.ytcp-modal__search input {
    flex: 1;
    background: none;
    border: none;
    color: var(--ytcp-text);
    padding: 10px 0;
    font-family: inherit;
    font-size: 13px;
}
.ytcp-modal__search input:focus { outline: none; }
.ytcp-modal__sort {
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    color: var(--ytcp-text);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 12px;
}
.ytcp-modal__url-bar {
    display: flex;
    gap: 8px;
    padding: 12px 24px 0;
}
.ytcp-modal__url-bar input {
    flex: 1;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    color: var(--ytcp-text);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
}
.ytcp-modal__count {
    padding: 12px 24px 8px;
    margin: 0;
    font-size: 12px;
    color: var(--ytcp-text-muted);
}
.ytcp-modal__list {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
    min-height: 200px;
    max-height: 360px;
}
.ytcp-modal__loading, .ytcp-modal__empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--ytcp-text-muted);
    font-size: 13px;
}
.ytcp-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ytcp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
    background: var(--ytcp-bg-secondary);
}
.ytcp-modal__hint { margin: 0; font-size: 12px; color: var(--ytcp-text-muted); }
.ytcp-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(440px, 92vw);
    margin: auto;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 28px 24px 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.ytcp-modal__dialog h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
}

.ytcp-modal__dialog p {
    margin: 0 0 20px;
    color: var(--ytcp-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.ytcp-modal__dialog .ytcp-modal__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ytcp-modal__dialog .ytcp-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
}

#ytcp-video-limit-modal {
    display: flex;
    align-items: center;
    justify-content: center;
}

#ytcp-video-limit-modal[hidden] {
    display: none !important;
}

.ytcp-transcript-card {
    display: flex;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--ytcp-bg-card);
    border: 2px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    color: var(--ytcp-text);
}
.ytcp-transcript-card:hover { border-color: rgba(34,197,94,.4); }
.ytcp-transcript-card.is-selected {
    border-color: var(--ytcp-green);
    background: rgba(34,197,94,.08);
    box-shadow: 0 0 0 1px rgba(34,197,94,.2);
}
.ytcp-transcript-card.is-static {
    cursor: default;
    width: 100%;
    text-align: left;
}

.ytcp-modal__confirm {
    padding: 0 24px 8px;
}
.ytcp-modal__confirm-preview {
    margin-bottom: 16px;
}
.ytcp-modal__confirm-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245,197,24,.1);
    border: 1px solid rgba(245,197,24,.25);
    border-radius: var(--ytcp-radius);
    font-size: 13px;
    margin-bottom: 10px;
}
.ytcp-modal__confirm-banner[hidden],
.ytcp-modal__confirm-grid[hidden],
#ytcp-modal-step-list[hidden],
#ytcp-modal-step-confirm[hidden],
#ytcp-modal-footer-list[hidden],
#ytcp-modal-footer-confirm[hidden] {
    display: none !important;
}
.ytcp-modal__confirm-banner--byok {
    background: rgba(168, 85, 247, .12);
    border-color: rgba(168, 85, 247, .3);
}
.ytcp-modal__confirm-banner--unlimited {
    background: rgba(34, 197, 94, .1);
    border-color: rgba(34, 197, 94, .28);
}
.ytcp-modal__confirm-banner strong { color: var(--ytcp-yellow); }
.ytcp-badge--unlimited {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(34, 197, 94, .18);
    color: #4ade80;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.ytcp-modal__confirm-title {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--ytcp-text-muted);
    line-height: 1.4;
}
.ytcp-modal__confirm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.ytcp-modal__confirm-stat {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 14px 12px;
    text-align: center;
}
.ytcp-modal__confirm-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--ytcp-text-dim);
    margin-bottom: 6px;
}
.ytcp-modal__confirm-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}
.ytcp-modal__confirm-stat-sub {
    display: block;
    font-size: 11px;
    color: var(--ytcp-text-muted);
    margin-top: 4px;
}
.ytcp-modal__confirm-note {
    font-size: 12px;
    color: var(--ytcp-text-muted);
    margin: 0;
}

.ytcp-gen-status__progress {
    margin-top: 8px;
    width: 100%;
}
.ytcp-gen-status__progress .ytcp-progress { height: 3px; }

.ytcp-transcript-card__thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--ytcp-bg-input);
}
.ytcp-transcript-card__thumb--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ff0033;
}
.ytcp-transcript-card__thumb--fallback::before {
    content: '';
    width: 28px;
    height: 20px;
    border-radius: 4px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.4.6A3 3 0 0 0 .5 6.2 31.5 31.5 0 0 0 0 12a31.5 31.5 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2.1A31.5 31.5 0 0 0 24 12a31.5 31.5 0 0 0-.5-5.8z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.4.6A3 3 0 0 0 .5 6.2 31.5 31.5 0 0 0 0 12a31.5 31.5 0 0 0 .5 5.8 3 3 0 0 0 2.1 2.1c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2.1A31.5 31.5 0 0 0 24 12a31.5 31.5 0 0 0-.5-5.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ytcp-feature-denied {
    color: #ef4444;
    font-weight: 800;
    margin-right: 4px;
}
.ytcp-tag--denied {
    opacity: .85;
}
.ytcp-tag--denied::before {
    content: '✕ ';
    color: #ef4444;
    font-weight: 800;
}
.ytcp-transcript-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ytcp-transcript-card__body strong {
    font-size: 13px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ytcp-transcript-card__body > span { font-size: 12px; color: var(--ytcp-text-muted); }
.ytcp-transcript-card__meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--ytcp-text-dim);
    margin-top: 4px;
}

/* Toast notifications */
.ytcp-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}
.ytcp-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(-10px) translateX(8px);
    transition: opacity .25s ease, transform .25s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    color: var(--ytcp-text);
}
.ytcp-toast.is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}
.ytcp-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    margin-top: 1px;
}
.ytcp-toast__body {
    flex: 1;
    min-width: 0;
}
.ytcp-toast__title {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 2px;
    opacity: .85;
}
.ytcp-toast__msg {
    display: block;
    word-break: break-word;
}
.ytcp-toast__close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}
.ytcp-toast__close:hover { opacity: 1; }
.ytcp-toast--success {
    background: linear-gradient(135deg, rgba(34,197,94,.18), rgba(15,23,42,.92));
    border-color: rgba(34,197,94,.45);
    color: #86efac;
}
.ytcp-toast--success .ytcp-toast__icon {
    background: rgba(34,197,94,.25);
    color: #4ade80;
}
.ytcp-toast--error {
    background: linear-gradient(135deg, rgba(229,9,20,.2), rgba(15,23,42,.92));
    border-color: rgba(244,63,94,.5);
    color: #fda4af;
}
.ytcp-toast--error .ytcp-toast__icon {
    background: rgba(244,63,94,.25);
    color: #fb7185;
}
.ytcp-toast--info {
    background: linear-gradient(135deg, rgba(168,85,247,.16), rgba(15,23,42,.92));
    border-color: rgba(168,85,247,.4);
    color: #e9d5ff;
}
.ytcp-toast--info .ytcp-toast__icon {
    background: rgba(168,85,247,.25);
    color: #c084fc;
}
.ytcp-toast--warning {
    background: linear-gradient(135deg, rgba(250,204,21,.16), rgba(15,23,42,.92));
    border-color: rgba(250,204,21,.4);
    color: #fde68a;
}
.ytcp-toast--warning .ytcp-toast__icon {
    background: rgba(250,204,21,.22);
    color: #facc15;
}
@media (max-width: 640px) {
    .ytcp-toast-container {
        top: auto;
        bottom: 20px;
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* Generation status widget — hidden unless actively generating */
.ytcp-gen-status {
    position: fixed;
    bottom: 24px;
    left: calc(var(--ytcp-sidebar-width) + 24px);
    z-index: 1050;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 36px 14px 16px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    box-shadow: var(--ytcp-shadow);
    min-width: 280px;
    max-width: 360px;
}
.ytcp-gen-status.is-visible {
    display: flex;
}
.ytcp-gen-status[hidden] {
    display: none !important;
}
.ytcp-gen-status.is-done,
.ytcp-gen-status .ytcp-gen-status__state.is-done { color: var(--ytcp-green); }
.ytcp-gen-status__body { flex: 1; min-width: 0; }
.ytcp-gen-status__body strong { display: block; font-size: 11px; color: var(--ytcp-text-muted); text-transform: uppercase; letter-spacing: .5px; }
.ytcp-gen-status__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0;
}
.ytcp-gen-status__state { font-size: 12px; color: var(--ytcp-yellow); }
.ytcp-gen-status__state.is-done { color: var(--ytcp-green); font-weight: 600; }
.ytcp-gen-status__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(34,197,94,.15);
    color: var(--ytcp-green);
}
.ytcp-gen-status__link[hidden] {
    display: none !important;
}
.ytcp-gen-status__progress[hidden] {
    display: none !important;
}
.ytcp-gen-status__close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--ytcp-text-dim);
    cursor: pointer;
    padding: 2px;
}

/* Content view page */
.ytcp-view-page { min-height: 100vh; background: var(--ytcp-bg); }
.ytcp-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 32px 60px;
    min-height: 100vh;
}
.ytcp-view__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ytcp-border);
    flex-wrap: wrap;
}
.ytcp-view__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    color: var(--ytcp-text-muted);
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.ytcp-view__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}
.ytcp-view__words { font-size: 12px; color: var(--ytcp-text-muted); }
.ytcp-view__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.ytcp-view__actions-view,
.ytcp-view__actions-edit { display: flex; gap: 8px; align-items: center; }
.ytcp-view__actions-view[hidden],
.ytcp-view__actions-edit[hidden] {
    display: none !important;
}
.ytcp-view__close { color: var(--ytcp-text-muted); }
.ytcp-view__close:hover { color: var(--ytcp-text); }

.ytcp-view__toolbar {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ytcp-border);
    flex-wrap: wrap;
}
.ytcp-view__toolbar[hidden] {
    display: none !important;
}
.ytcp-view__toolbar button {
    padding: 6px 10px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: 4px;
    color: var(--ytcp-text);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}
.ytcp-view__toolbar button:hover { border-color: var(--ytcp-yellow); color: var(--ytcp-yellow); }

.ytcp-view__body {
    display: flex;
    gap: 0;
    margin-top: 24px;
}
.ytcp-view__accent {
    width: 3px;
    background: #14b8a6;
    border-radius: 2px;
    flex-shrink: 0;
    margin-right: 24px;
    align-self: stretch;
}
.ytcp-view__content {
    flex: 1;
    line-height: 1.8;
    font-size: 15px;
    min-height: 400px;
    color: var(--ytcp-text);
}
.ytcp-view__content h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.25;
    color: var(--ytcp-text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ytcp-border);
}
.ytcp-view__content h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 32px 0 14px;
    color: #f87171;
    line-height: 1.3;
}
.ytcp-view__content h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 22px 0 10px;
    color: var(--ytcp-text);
}
.ytcp-view__content p {
    margin: 0 0 16px;
    line-height: 1.8;
    color: var(--ytcp-text-muted);
}
.ytcp-view__content ul,
.ytcp-view__content ol {
    margin: 0 0 20px 0;
    padding-left: 24px;
}
.ytcp-view__content li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--ytcp-text-muted);
}
.ytcp-view__content strong,
.ytcp-view__content b {
    font-weight: 800;
    color: var(--ytcp-text);
}
.ytcp-view__content svg,
.ytcp-editor__content svg {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
    display: inline-block;
    vertical-align: middle;
}
.ytcp-correct-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    color: #22c55e;
    vertical-align: middle;
    flex-shrink: 0;
}
.ytcp-view__content li .ytcp-correct-tick,
.ytcp-editor__content li .ytcp-correct-tick {
    margin-left: 8px;
}
.ytcp-view__content h1:first-child,
.ytcp-view__content h2:first-child {
    margin-top: 0;
}
.ytcp-view__content blockquote {
    border-left: 3px solid var(--ytcp-red);
    padding: 12px 16px;
    margin: 16px 0;
    font-style: italic;
    color: var(--ytcp-text-muted);
    background: rgba(229,9,20,.06);
    border-radius: 0 6px 6px 0;
}
.ytcp-view__content blockquote + p em {
    display: block;
    font-size: 13px;
    color: var(--ytcp-text-dim);
    margin-top: -8px;
    margin-bottom: 16px;
}
.ytcp-view__content.is-editing {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    padding: 24px;
    outline: none;
}
.ytcp-view__source {
    margin-top: 32px;
    font-size: 12px;
    color: var(--ytcp-text-dim);
}

.ytcp-version-dropdown { position: relative; }
.ytcp-version-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius);
    min-width: 200px;
    z-index: 50;
    overflow: hidden;
}
.ytcp-version-menu button:not(.ytcp-version-set-active) {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--ytcp-text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}
.ytcp-version-menu button:not(.ytcp-version-set-active).is-active { color: var(--ytcp-green); }
.ytcp-version-menu__item {
    padding: 10px 14px;
    border-top: 1px solid var(--ytcp-border);
    font-size: 12px;
}
.ytcp-version-menu__item small { display: block; color: var(--ytcp-text-dim); margin-top: 2px; }

.ytcp-export-menu--wide { min-width: 220px; }
.ytcp-export-menu--wide button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ytcp-empty-state__icon { font-size: 48px; display: block; margin-bottom: 12px; opacity: .4; }

@media (max-width: 1024px) {
    .ytcp-magic-steps__flow { grid-template-columns: 1fr; gap: 16px; }
    .ytcp-magic-step--engine { order: -1; }
    .ytcp-pricing-card--featured { transform: none; }
    .ytcp-products__grid, .ytcp-pricing__grid { grid-template-columns: 1fr; }
    .ytcp-landing-header__nav { display: none; }
    .ytcp-section__header--split { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
    .ytcp-hero { padding: 48px 20px 40px; }
    .ytcp-hero__url-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }
    .ytcp-hero__url-bar input { padding: 8px 0; }
    .ytcp-btn--magic { width: 100%; justify-content: center; }
    .ytcp-section, .ytcp-magic-steps { padding-left: 20px; padding-right: 20px; }
    .ytcp-cta-card { padding: 40px 24px; }
}

/* Transcript page */
.ytcp-transcript-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.ytcp-transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ytcp-transcript-header__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
.ytcp-transcript-crumb { color: var(--ytcp-text-muted); }
.ytcp-transcript-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}
.ytcp-transcript-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.ytcp-transcript-stat {
    font-size: 13px;
    color: var(--ytcp-text-muted);
    font-weight: 600;
}
.ytcp-transcript-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ytcp-transcript-toolbar__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
#ytcp-transcript-edit-toggle.is-active {
    border-color: var(--ytcp-red);
    color: var(--ytcp-red);
}
.ytcp-ai-edit-panel {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}
.ytcp-ai-edit-panel__label {
    margin: 0 0 12px;
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--ytcp-text-muted);
    font-weight: 700;
}
.ytcp-ai-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.ytcp-ai-edit-action {
    background: transparent;
    border: 1px solid var(--ytcp-border);
    color: var(--ytcp-text);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ytcp-ai-edit-action.is-active,
.ytcp-ai-edit-action:hover {
    border-color: var(--ytcp-red);
    color: var(--ytcp-red);
}
.ytcp-ai-edit-desc {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ytcp-text-muted);
}
.ytcp-ai-edit-custom {
    margin-bottom: 12px;
}
.ytcp-ai-edit-custom label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ytcp-text-muted);
}
.ytcp-ai-edit-custom textarea {
    width: 100%;
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: 8px;
    color: var(--ytcp-text);
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}
.ytcp-ai-edit-cost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ytcp-bg-input);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ytcp-text-muted);
    margin-bottom: 14px;
}
.ytcp-ai-edit-cost strong {
    color: var(--ytcp-text);
}
.ytcp-ai-edit-footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.ytcp-transcript-body {
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    padding: 28px 32px;
    line-height: 1.8;
    font-size: 16px;
    color: var(--ytcp-text);
}
.ytcp-transcript-body p {
    margin: 0 0 18px;
}
.ytcp-transcript-body p:last-child {
    margin-bottom: 0;
}
.ytcp-transcript-versions-menu {
    min-width: 340px;
    max-width: 380px;
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 14px;
    background: var(--ytcp-bg-card);
    border: 1px solid var(--ytcp-border);
    box-shadow: var(--ytcp-shadow);
}
.ytcp-transcript-versions-menu[hidden] {
    display: none !important;
}
.ytcp-vh-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--ytcp-border);
    flex-shrink: 0;
}
.ytcp-vh-header__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ytcp-text-muted);
}
.ytcp-vh-header__count {
    font-size: 12px;
    color: var(--ytcp-text-dim);
}
.ytcp-vh-list {
    overflow-y: auto;
    max-height: 360px;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.ytcp-vh-list::-webkit-scrollbar {
    width: 6px;
}
.ytcp-vh-list::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}
.ytcp-vh-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .2);
    border-radius: 999px;
}
.ytcp-vh-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .35);
}
.ytcp-transcript-versions-menu .ytcp-version-row {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 12px 10px;
    margin-bottom: 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--ytcp-text);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.ytcp-transcript-versions-menu .ytcp-version-row:last-child {
    margin-bottom: 0;
}
.ytcp-transcript-versions-menu .ytcp-version-row:hover,
.ytcp-transcript-versions-menu .ytcp-version-row.is-viewing {
    background: rgba(34, 197, 94, .06);
    border-color: rgba(34, 197, 94, .18);
}
.ytcp-transcript-versions-menu .ytcp-version-row.is-active {
    background: rgba(34, 197, 94, .12);
    border-color: rgba(34, 197, 94, .28);
}
.ytcp-version-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.ytcp-version-row__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--ytcp-text);
    line-height: 1.2;
}
.ytcp-version-row__status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--ytcp-green);
    white-space: nowrap;
}
.ytcp-version-row__status .ytcp-icon {
    width: 14px;
    height: 14px;
    color: var(--ytcp-green);
}
.ytcp-version-set-active {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    color: var(--ytcp-text);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.ytcp-version-set-active:hover {
    border-color: rgba(34, 197, 94, .55);
    color: #86efac;
    background: rgba(34, 197, 94, .08);
}
.ytcp-version-row__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--ytcp-text-muted);
    margin-bottom: 4px;
}
.ytcp-version-row__lang {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: var(--ytcp-text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.ytcp-version-row__time {
    font-size: 12px;
    color: var(--ytcp-text-dim);
}
[data-theme="light"] .ytcp-transcript-versions-menu .ytcp-version-row:hover,
[data-theme="light"] .ytcp-transcript-versions-menu .ytcp-version-row.is-viewing {
    background: rgba(22, 163, 74, .06);
    border-color: rgba(22, 163, 74, .16);
}
[data-theme="light"] .ytcp-transcript-versions-menu .ytcp-version-row.is-active {
    background: rgba(22, 163, 74, .1);
    border-color: rgba(22, 163, 74, .22);
}
[data-theme="light"] .ytcp-version-set-active {
    border-color: rgba(15, 23, 42, .18);
}
[data-theme="light"] .ytcp-version-set-active:hover {
    border-color: rgba(22, 163, 74, .45);
    color: #15803d;
    background: rgba(22, 163, 74, .08);
}
[data-theme="light"] .ytcp-version-row__lang {
    background: rgba(15, 23, 42, .04);
    border-color: rgba(15, 23, 42, .08);
}
[data-theme="light"] .ytcp-vh-list {
    scrollbar-color: rgba(15, 23, 42, .25) transparent;
}
[data-theme="light"] .ytcp-vh-list::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .2);
}
[data-theme="light"] .ytcp-vh-list::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, .35);
}
@media (max-width: 768px) {
    .ytcp-transcript-body { padding: 20px; font-size: 15px; }
    .ytcp-transcript-title { font-size: 15px; }
    .ytcp-transcript-versions-menu { min-width: 280px; max-width: calc(100vw - 32px); }
}

/* Light theme polish */
[data-theme="light"] .ytcp-sidebar {
    background: var(--ytcp-bg-secondary);
    border-color: var(--ytcp-border);
    box-shadow: 1px 0 0 var(--ytcp-border), 8px 0 24px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .ytcp-sidebar__brand,
[data-theme="light"] .ytcp-sidebar__footer {
    background: var(--ytcp-bg-secondary);
}
[data-theme="light"] .ytcp-nav-icon {
    background: rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .ytcp-app a.ytcp-nav-item,
[data-theme="light"] .ytcp-app a.ytcp-nav-item:visited {
    color: var(--ytcp-text-muted);
}
[data-theme="light"] .ytcp-settings-panel {
    background: #fff;
    border-color: var(--ytcp-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .ytcp-settings-panel__title,
[data-theme="light"] .ytcp-eyebrow {
    color: var(--ytcp-text-muted);
}
[data-theme="light"] .ytcp-text-muted {
    color: var(--ytcp-text-muted) !important;
}
[data-theme="light"] .ytcp-gen-status {
    background: #fff;
    border-color: var(--ytcp-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .ytcp-toast {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .ytcp-main {
    color: var(--ytcp-text);
}
[data-theme="light"] .ytcp-stat-card,
[data-theme="light"] .ytcp-card,
[data-theme="light"] .ytcp-recent-card {
    background: #fff;
    border-color: var(--ytcp-border);
}
[data-theme="light"] .ytcp-nav-item.is-active,
[data-theme="light"] .ytcp-app a.ytcp-nav-item.is-active {
    background: var(--ytcp-accent-soft);
    color: var(--ytcp-accent);
}
[data-theme="light"] .ytcp-nav-item.is-active .ytcp-nav-icon,
[data-theme="light"] .ytcp-app a.ytcp-nav-item.is-active .ytcp-nav-icon {
    color: var(--ytcp-accent);
}
[data-theme="light"] .ytcp-btn.is-loading .ytcp-spinner {
    border-color: rgba(124, 58, 237, 0.25);
    border-top-color: var(--ytcp-accent);
}

/* Dark theme sidebar readability */
.ytcp-app[data-theme="dark"] .ytcp-sidebar,
[data-theme="dark"] .ytcp-sidebar {
    background: var(--ytcp-bg-secondary);
}
.ytcp-app[data-theme="dark"] .ytcp-sidebar__label,
[data-theme="dark"] .ytcp-sidebar__label {
    color: #A1A8B5;
}
.ytcp-app[data-theme="dark"] a.ytcp-nav-item,
.ytcp-app[data-theme="dark"] a.ytcp-nav-item:visited,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item:visited {
    color: #D1D5DB;
}
.ytcp-app[data-theme="dark"] a.ytcp-nav-item .ytcp-nav-icon,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item .ytcp-nav-icon {
    color: #C4C9D4;
    background: rgba(255, 255, 255, 0.06);
}
.ytcp-app[data-theme="dark"] a.ytcp-nav-item:hover,
.ytcp-app[data-theme="dark"] a.ytcp-nav-item.is-active,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item:hover,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item.is-active {
    color: #F9FAFB;
}
.ytcp-app[data-theme="dark"] a.ytcp-nav-item:hover .ytcp-nav-icon,
.ytcp-app[data-theme="dark"] a.ytcp-nav-item.is-active .ytcp-nav-icon,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item:hover .ytcp-nav-icon,
[data-theme="dark"] .ytcp-app a.ytcp-nav-item.is-active .ytcp-nav-icon {
    color: var(--ytcp-accent);
}
.ytcp-app[data-theme="dark"] .ytcp-user__name,
[data-theme="dark"] .ytcp-user__name {
    color: #F3F4F6;
}
.ytcp-app[data-theme="dark"] .ytcp-user__email,
[data-theme="dark"] .ytcp-user__email {
    color: #9CA3AF;
}
.ytcp-app[data-theme="dark"] .ytcp-credits-widget__header,
[data-theme="dark"] .ytcp-credits-widget__header {
    color: #9CA3AF;
}
.ytcp-app[data-theme="dark"] .ytcp-credits-widget__header span:last-child,
.ytcp-app[data-theme="dark"] .ytcp-credits-widget__usage,
[data-theme="dark"] .ytcp-credits-widget__header span:last-child,
[data-theme="dark"] .ytcp-credits-widget__usage {
    color: #F3F4F6;
}


/* Agency Tier dashboard */
.ytcp-agency-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    margin-bottom: 18px;
    border: 1px solid var(--ytcp-border);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.06)),
        var(--ytcp-bg-card);
}
.ytcp-agency-hero__label {
    display: block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ytcp-text-muted);
    margin-bottom: 6px;
}
.ytcp-agency-hero__name {
    display: block;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.ytcp-agency-hero__hint {
    margin: 8px 0 0;
    color: var(--ytcp-text-muted);
    font-size: 13px;
}
.ytcp-agency-hero__badge {
    flex-shrink: 0;
    margin-top: 4px;
}
.ytcp-agency-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.ytcp-agency-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--ytcp-border);
    border-radius: 14px;
    background: var(--ytcp-bg-card);
}
.ytcp-agency-stat__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ytcp-agency-stat__icon--violet { background: rgba(124, 58, 237, 0.12); color: #8b5cf6; }
.ytcp-agency-stat__icon--green { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.ytcp-agency-stat__icon--blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.ytcp-agency-stat__label {
    display: block;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ytcp-text-muted);
    margin-bottom: 4px;
}
.ytcp-agency-stat__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.ytcp-agency-stat__sub {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ytcp-text-muted);
}
.ytcp-agency-seats-meter {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
    margin-bottom: 22px;
}
.ytcp-agency-seats-meter__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #ec4899);
    transition: width .35s ease;
}
.ytcp-agency-card {
    margin-bottom: 20px;
    border-radius: 16px;
}
.ytcp-agency-card h3 {
    margin: 0 0 8px;
}
.ytcp-agency-form {
    margin-top: 16px;
    align-items: stretch;
}
.ytcp-agency-form > .ytcp-btn,
.ytcp-agency-form .ytcp-agency-submit,
.ytcp-agency-form__actions .ytcp-btn {
    width: auto !important;
    max-width: max-content;
    align-self: flex-start !important;
    flex: 0 0 auto;
}
.ytcp-agency-form__actions {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    width: 100%;
    margin-top: 4px;
}
.ytcp-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.ytcp-agency-invites-title {
    margin: 28px 0 12px;
    font-size: 15px;
}
.ytcp-agency-user-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.ytcp-agency-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: rgba(124, 58, 237, 0.14);
    color: #8b5cf6;
}
.ytcp-agency-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--ytcp-text);
}
.ytcp-agency-link-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ytcp-agency-invite-url {
    width: min(280px, 100%);
    background: var(--ytcp-bg-input);
    border: 1px solid var(--ytcp-border);
    border-radius: 8px;
    color: var(--ytcp-text);
    padding: 7px 10px;
    font-size: 12px;
}
.ytcp-agency-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.ytcp-agency-action {
    appearance: none;
    border: 1px solid var(--ytcp-border);
    background: transparent;
    color: var(--ytcp-text);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ytcp-agency-action:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.35);
}
.ytcp-agency-action--danger {
    color: #ef4444;
}
.ytcp-agency-action--danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
}
.ytcp-agency-empty-row td {
    color: var(--ytcp-text-muted);
    text-align: center;
    padding: 28px 16px !important;
}
.ytcp-agency-table .ytcp-output-table__actions-col,
.ytcp-agency-table .ytcp-output-table__actions {
    white-space: nowrap;
}
.ytcp-badge--green {
    background: rgba(34, 197, 94, .15);
    color: #4ade80;
}
.ytcp-badge--muted {
    background: rgba(148, 163, 184, .15);
    color: var(--ytcp-text-muted);
}
@media (max-width: 900px) {
    .ytcp-agency-stats {
        grid-template-columns: 1fr;
    }
    .ytcp-agency-hero {
        flex-direction: column;
    }
    .ytcp-agency-actions {
        flex-wrap: wrap;
    }
}

/* Video processing progress panel (vendor-style stepper) */
.ytcp-progress-panel {
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid var(--ytcp-border);
    border-radius: var(--ytcp-radius-lg);
    background: var(--ytcp-bg-card);
}
.ytcp-progress-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
}
#ytcp-progress-label {
    color: var(--ytcp-text-muted);
    font-weight: 600;
}
#ytcp-progress-pct {
    color: var(--ytcp-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ytcp-progress-panel__bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
    margin-bottom: 18px;
}
.ytcp-progress-panel__fill {
    height: 100%;
    border-radius: inherit;
    background: var(--ytcp-gradient);
    transition: width .6s ease;
}
.ytcp-progress-panel.is-failed .ytcp-progress-panel__fill {
    background: var(--ytcp-danger);
}
.ytcp-progress-panel.is-failed #ytcp-progress-label {
    color: var(--ytcp-danger);
}
.ytcp-progress-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ytcp-progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--ytcp-text-dim);
    transition: color .2s ease;
}
.ytcp-progress-step__icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--ytcp-text-dim);
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
}
.ytcp-progress-step.is-active {
    color: var(--ytcp-text);
}
.ytcp-progress-step.is-active .ytcp-progress-step__icon {
    border-color: var(--ytcp-accent);
    border-top-color: transparent;
    animation: ytcp-spin .8s linear infinite;
}
.ytcp-progress-step.is-done {
    color: var(--ytcp-green);
}
.ytcp-progress-step.is-done .ytcp-progress-step__icon {
    border-color: var(--ytcp-green);
    background: rgba(34, 197, 94, 0.12);
}
.ytcp-progress-step.is-done .ytcp-progress-step__icon::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--ytcp-green);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.ytcp-progress-step.is-failed {
    color: var(--ytcp-danger);
}
.ytcp-progress-step.is-failed .ytcp-progress-step__icon {
    border-color: var(--ytcp-danger);
    background: rgba(239, 68, 68, 0.12);
}
.ytcp-progress-step.is-failed .ytcp-progress-step__icon::before,
.ytcp-progress-step.is-failed .ytcp-progress-step__icon::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 2px;
    height: 10px;
    background: var(--ytcp-danger);
}
.ytcp-progress-step.is-failed .ytcp-progress-step__icon::before {
    transform: rotate(45deg);
}
.ytcp-progress-step.is-failed .ytcp-progress-step__icon::after {
    transform: rotate(-45deg);
}
.ytcp-progress-panel__note {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--ytcp-text-dim);
}
