/* ===== CSS VARIABLES ===== */
:root {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --bg-sidebar: #12121f;
    --bg-input: #16162a;
    --text: #e8e8f0;
    --text-muted: #8888a8;
    --text-dim: #5a5a78;
    --border: #2a2a40;
    --accent-pink: #f43f5e;
    --accent-blue: #6366f1;
    --accent-purple: #a855f7;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-cyan: #06b6d4;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width var(--transition);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.logo { display: flex; align-items: center; gap: 12px; overflow: hidden; }
.logo-icon {
    min-width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: #fff;
}
.logo-text { display: flex; flex-direction: column; white-space: nowrap; }
.sidebar.collapsed .logo-text { display: none; }
.brand { font-weight: 700; font-size: 15px; }
.tagline { font-size: 11px; color: var(--text-muted); }
.sidebar-toggle {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--border); color: var(--text); }
.sidebar.collapsed .sidebar-toggle i { transform: rotate(180deg); }

.nav-menu { list-style: none; padding: 12px 8px; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px; margin: 2px 0;
    border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
    color: var(--text-muted); white-space: nowrap;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(244,63,94,0.15), rgba(99,102,241,0.15));
    color: #fff;
    font-weight: 600;
}
.nav-item.active i { color: var(--accent-pink); }
.nav-item i { min-width: 20px; text-align: center; font-size: 16px; }
.sidebar.collapsed .nav-item span { display: none; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.api-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.api-status i { font-size: 8px; color: var(--accent-red); }
.api-status.connected i { color: var(--accent-green); }
.sidebar.collapsed .api-status span { display: none; }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: margin-left var(--transition);
}
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-height);
    background: rgba(15,15,26,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 24px; gap: 16px;
    position: sticky; top: 0; z-index: 50;
}
.menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; }
.topbar-left h1 { font-size: 18px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.refresh-btn {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
    color: var(--text-muted); border: 1px solid var(--border);
}
.refresh-btn:hover { background: var(--border); color: var(--text); }
.refresh-btn.spinning i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 13px;
    cursor: pointer; border: none; transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(244,63,94,0.3); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--text-dim); }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent-pink); color: var(--accent-pink); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; pointer-events: none;
    transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); width: 520px; max-width: 95vw;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px); transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; }
.modal-body { padding: 24px; }
.modal-desc { color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-error { color: var(--accent-red); font-size: 13px; margin-top: 12px; display: none; }
.modal-error.show { display: block; }
.steps-guide { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; }
.steps-guide h4 { margin-bottom: 8px; font-size: 13px; color: var(--accent-gold); }
.steps-guide ol { padding-left: 20px; color: var(--text-muted); font-size: 12px; line-height: 1.8; }
.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input-group .hint { color: var(--text-dim); font-weight: 400; }
.input-group input, .input-group select, .input-group textarea {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-family: inherit; font-size: 14px; transition: var(--transition);
}
.input-group input:focus, .input-group select:focus {
    outline: none; border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(244,63,94,0.1);
}

/* ===== CONTENT AREA ===== */
.content-area { padding: 24px; }
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== STATS GRID ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    display: flex; align-items: flex-start; gap: 16px;
    position: relative; overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card.accent-pink::before { background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple)); }
.stat-card.accent-blue::before { background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)); }
.stat-card.accent-purple::before { background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink)); }
.stat-card.accent-gold::before { background: linear-gradient(90deg, var(--accent-gold), var(--accent-red)); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.accent-pink .stat-icon { background: rgba(244,63,94,0.15); color: var(--accent-pink); }
.accent-blue .stat-icon { background: rgba(99,102,241,0.15); color: var(--accent-blue); }
.accent-purple .stat-icon { background: rgba(168,85,247,0.15); color: var(--accent-purple); }
.accent-gold .stat-icon { background: rgba(245,158,11,0.15); color: var(--accent-gold); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-change { font-size: 12px; margin-left: auto; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 20px; }
.stat-change.positive { color: var(--accent-green); background: rgba(16,185,129,0.1); }
.stat-change.negative { color: var(--accent-red); background: rgba(239,68,68,0.1); }
.stat-change.neutral { color: var(--text-muted); background: rgba(255,255,255,0.05); }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.card-header h3 i { color: var(--accent-pink); }
.card-body { padding: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }

/* ===== HEALTH SCORE ===== */
.health-score { display: flex; gap: 30px; align-items: center; }
.score-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.score-num { font-size: 32px; font-weight: 800; color: var(--accent-gold); }
.score-label { font-size: 12px; color: var(--text-muted); }
.health-details { flex: 1; }
.health-item { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13px; }
.health-item span:first-child { width: 160px; color: var(--text-muted); }
.health-val { min-width: 50px; text-align: right; font-weight: 600; }
.progress-bar { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)); transition: width 1s ease; }
.progress-fill.medium { background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold)); }
.progress-fill.bad { background: linear-gradient(90deg, var(--accent-red), var(--accent-red)); }

/* ===== ISSUES ===== */
.issue-list { display: flex; flex-direction: column; gap: 12px; }
.issue { display: flex; gap: 14px; padding: 14px; border-radius: var(--radius-sm); background: var(--bg); }
.issue-badge {
    font-size: 10px; font-weight: 700; padding: 3px 8px;
    border-radius: 4px; white-space: nowrap; height: fit-content; margin-top: 2px;
}
.issue.critical .issue-badge { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.issue.warning .issue-badge { background: rgba(245,158,11,0.15); color: var(--accent-gold); }
.issue.info .issue-badge { background: rgba(99,102,241,0.15); color: var(--accent-blue); }
.issue-text strong { font-size: 13px; }
.issue-text p { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px; line-height: 1.5; }
.issue-action { font-size: 12px; color: var(--accent-green); font-weight: 600; display: flex; align-items: center; gap: 6px; }

/* ===== FORMAT ANALYSIS ===== */
.format-analysis { display: flex; gap: 30px; align-items: center; }
.format-chart { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut-chart { position: relative; width: 160px; height: 160px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-perc { font-size: 28px; font-weight: 800; }
.donut-label { font-size: 12px; color: var(--text-muted); }
.format-legend { font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-dot.shorts { background: var(--accent-pink); }
.legend-dot.longform { background: var(--accent-blue); }
.format-comparison { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare-card { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; }
.compare-card h4 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.compare-stat { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.compare-stat .label { color: var(--text-muted); }
.compare-stat .value.good { color: var(--accent-green); font-weight: 600; }
.compare-stat .value.bad { color: var(--accent-red); font-weight: 600; }
.compare-verdict { margin-top: 12px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 6px; }
.compare-verdict.good { background: rgba(16,185,129,0.1); color: var(--accent-green); }
.compare-verdict.bad { background: rgba(239,68,68,0.1); color: var(--accent-red); }

/* ===== PLATFORMS ===== */
.platform-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.platform-card {
    background: var(--bg); border-radius: var(--radius-sm); padding: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-align: center; transition: var(--transition);
}
.platform-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.platform-card i { font-size: 28px; }
.platform-card.youtube i { color: #ff0000; }
.platform-card.instagram i { color: #e1306c; }
.platform-card.facebook i { color: #1877f2; }
.platform-card.whatsapp i { color: #25d366; }
.platform-card.website i { color: var(--accent-cyan); }
.platform-name { font-size: 12px; color: var(--text-muted); }
.platform-followers { font-size: 22px; font-weight: 800; }
.platform-handle { font-size: 11px; color: var(--text-dim); }

/* ===== SECTION TOOLBAR ===== */
.section-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
    padding: 8px 16px; border-radius: 20px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: var(--transition); font-family: inherit;
}
.filter-btn:hover { border-color: var(--accent-pink); color: var(--text); }
.filter-btn.active { background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple)); border-color: transparent; color: #fff; }
.sort-group select {
    padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); border-radius: var(--radius-sm); font-family: inherit;
}

/* ===== VIDEO GRID ===== */
.videos-stats-bar { display: flex; gap: 24px; margin-bottom: 16px; padding: 12px 16px; background: var(--bg-card); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.vstat { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.vstat i { color: var(--accent-pink); }
.vstat span { font-weight: 700; color: var(--text); }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.video-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: var(--transition); cursor: pointer;
}
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent-pink); }
.video-thumb {
    position: relative; aspect-ratio: 16/9;
    background: var(--bg); overflow: hidden;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .duration-badge {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.85); padding: 2px 8px;
    border-radius: 4px; font-size: 11px; font-weight: 600;
}
.video-thumb .type-badge {
    position: absolute; top: 8px; left: 8px;
    padding: 3px 10px; border-radius: 4px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.type-badge.short { background: var(--accent-pink); }
.type-badge.long { background: var(--accent-blue); }
.video-info { padding: 14px; }
.video-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.video-meta span { display: flex; align-items: center; gap: 4px; }

.empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 48px; color: var(--text-dim); margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }
.load-more-container { text-align: center; margin-top: 20px; }

/* ===== VIRAL IDEAS ===== */
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.idea-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    transition: var(--transition); position: relative;
}
.idea-card:hover { border-color: var(--accent-pink); transform: translateY(-2px); box-shadow: var(--shadow); }
.idea-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.idea-category {
    font-size: 10px; font-weight: 700; padding: 3px 10px;
    border-radius: 20px; text-transform: uppercase;
}
.idea-category.bridal { background: rgba(244,63,94,0.15); color: var(--accent-pink); }
.idea-category.budget { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.idea-category.transform { background: rgba(168,85,247,0.15); color: var(--accent-purple); }
.idea-category.showcase { background: rgba(6,182,212,0.15); color: var(--accent-cyan); }
.idea-category.emotional { background: rgba(245,158,11,0.15); color: var(--accent-gold); }
.idea-score {
    display: flex; align-items: center; gap: 4px;
    font-size: 18px; font-weight: 800;
}
.idea-score.high { color: var(--accent-green); }
.idea-score.medium { color: var(--accent-gold); }
.idea-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.idea-detail { margin-bottom: 8px; font-size: 12px; line-height: 1.6; }
.idea-detail strong { color: var(--accent-pink); }
.idea-detail.hook { background: var(--bg); padding: 10px 12px; border-radius: var(--radius-sm); border-left: 3px solid var(--accent-gold); }
.idea-detail.why { background: rgba(16,185,129,0.05); padding: 10px 12px; border-radius: var(--radius-sm); border-left: 3px solid var(--accent-green); }
.idea-card .view-script-btn {
    width: 100%; margin-top: 10px; padding: 8px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    border: none; border-radius: 6px; color: #fff;
    font-weight: 700; font-size: 12px; cursor: pointer;
    font-family: inherit; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.idea-card .view-script-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== IDEA DETAIL PANEL ===== */
.idea-detail-panel {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.idea-detail-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
    cursor: pointer;
}
.idea-detail-content {
    position: relative; z-index: 1;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); width: 900px; max-width: 95vw;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg); padding: 0;
}
.idp-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: flex-start;
    position: sticky; top: 0; background: var(--bg-card); z-index: 2;
}
.idp-header h2 { font-size: 18px; flex: 1; line-height: 1.4; padding-right: 16px; }
.idp-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 20px; cursor: pointer; padding: 4px 8px;
}
.idp-badges { display: flex; gap: 8px; margin-top: 8px; }
.idp-badge {
    font-size: 11px; font-weight: 700; padding: 4px 12px;
    border-radius: 20px;
}
.idp-body { padding: 24px; }

/* Script Timeline */
.script-section { margin-bottom: 24px; }
.script-section h3 {
    font-size: 15px; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
    padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.script-section h3 i { color: var(--accent-gold); }
.script-timeline { position: relative; padding-left: 24px; }
.script-timeline::before {
    content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(to bottom, var(--accent-pink), var(--accent-purple), var(--accent-gold));
    border-radius: 1px;
}
.script-step {
    position: relative; margin-bottom: 16px;
    padding: 14px 16px; background: var(--bg);
    border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.script-step::before {
    content: ''; position: absolute; left: -20px; top: 18px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent-pink); border: 2px solid var(--bg-card);
}
.script-time {
    display: inline-block; font-size: 11px; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff; padding: 2px 10px; border-radius: 12px;
    margin-bottom: 8px;
}
.script-action { font-size: 13px; line-height: 1.7; }
.script-action strong { color: var(--accent-pink); }
.script-action em { color: var(--accent-gold); font-style: normal; font-weight: 600; }
.script-visual {
    margin-top: 8px; font-size: 12px; color: var(--accent-cyan);
    display: flex; align-items: flex-start; gap: 6px;
}
.script-visual i { margin-top: 2px; }
.script-audio {
    margin-top: 6px; font-size: 12px; color: var(--accent-purple);
    display: flex; align-items: flex-start; gap: 6px;
}
.script-text-overlay {
    margin-top: 6px; padding: 6px 10px;
    background: rgba(244,63,94,0.1); border-radius: 4px;
    font-size: 13px; font-weight: 700; color: var(--accent-pink);
    display: inline-block;
}

/* Caption & CTA in panel */
.idp-caption {
    background: var(--bg); border-radius: var(--radius-sm);
    padding: 16px; margin-bottom: 16px;
    border: 1px solid var(--border); position: relative;
}
.idp-caption h4 { font-size: 13px; color: var(--accent-cyan); margin-bottom: 8px; }
.idp-caption p { font-size: 13px; line-height: 1.7; }
.idp-caption .copy-btn { position: absolute; top: 10px; right: 10px; }

/* Reference Videos */
.ref-videos-section { margin-top: 24px; }
.ref-videos-section h3 { margin-bottom: 14px; }
.ref-video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ref-video-card {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden;
    cursor: pointer; transition: var(--transition);
}
.ref-video-card:hover { border-color: var(--accent-pink); transform: translateY(-2px); }
.ref-video-card .ref-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.ref-video-card .ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ref-video-card .ref-views {
    position: absolute; bottom: 4px; right: 4px;
    background: rgba(0,0,0,0.85); padding: 2px 6px;
    border-radius: 3px; font-size: 10px; font-weight: 700;
}
.ref-video-card .ref-info { padding: 8px 10px; }
.ref-video-card .ref-title { font-size: 11px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ref-video-card .ref-channel { font-size: 10px; color: var(--text-dim); margin-top: 4px; }
.ref-loading { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

/* ===== CALENDAR ===== */
.calendar-header-bar { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 20px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day-header { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 8px; text-transform: uppercase; }
.cal-day {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
    min-height: 140px; transition: var(--transition);
}
.cal-day:hover { border-color: var(--accent-pink); }
.cal-day-num { font-size: 20px; font-weight: 800; margin-bottom: 8px; color: var(--text-dim); }
.cal-event {
    font-size: 11px; padding: 6px 8px; border-radius: 4px;
    margin-bottom: 4px; line-height: 1.4; font-weight: 500;
}
.cal-event.short { background: rgba(244,63,94,0.12); color: var(--accent-pink); border-left: 3px solid var(--accent-pink); }
.cal-event.long { background: rgba(99,102,241,0.12); color: var(--accent-blue); border-left: 3px solid var(--accent-blue); }
.cal-event.community { background: rgba(168,85,247,0.12); color: var(--accent-purple); border-left: 3px solid var(--accent-purple); }

.time-grid { display: flex; flex-direction: column; gap: 14px; }
.time-slot { display: grid; grid-template-columns: 80px 1fr 1fr; align-items: center; gap: 16px; }
.time-label { font-size: 18px; font-weight: 800; }
.time-desc { font-size: 13px; color: var(--text-muted); }
.time-bar { height: 8px; border-radius: 4px; background: var(--accent-green); }
.time-slot.best .time-label { color: var(--accent-green); }
.time-slot.good .time-label { color: var(--accent-blue); }
.time-slot.medium .time-label { color: var(--accent-gold); }

/* ===== COMPETITORS ===== */
.competitors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.competitor-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; transition: var(--transition);
}
.competitor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.competitor-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.competitor-subs { font-size: 13px; color: var(--accent-pink); font-weight: 600; margin-bottom: 10px; }
.competitor-strength { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.competitor-advantage { font-size: 12px; color: var(--accent-green); font-weight: 600; padding: 8px; background: rgba(16,185,129,0.05); border-radius: 6px; }

.gaps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gap-card { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; border-left: 3px solid var(--accent-gold); }
.gap-card h4 { font-size: 14px; margin-bottom: 6px; color: var(--accent-gold); }
.gap-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ===== SEO ===== */
.keyword-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.keyword-rank { width: 28px; height: 28px; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.keyword-text { flex: 1; font-weight: 600; font-size: 13px; }
.keyword-bar { width: 120px; }
.keyword-season { font-size: 11px; color: var(--text-dim); }

.hashtag-set { background: var(--bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
.hashtag-set h4 { font-size: 12px; color: var(--accent-pink); margin-bottom: 8px; font-weight: 700; }
.hashtag-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtag-tag {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; color: var(--accent-cyan); cursor: pointer;
    transition: var(--transition);
}
.hashtag-tag:hover { background: var(--accent-cyan); color: #000; }

.template-box {
    background: var(--bg); border-radius: var(--radius-sm); padding: 20px;
    font-family: 'Courier New', monospace; font-size: 13px; line-height: 1.8;
    white-space: pre-wrap; color: var(--text-muted);
    border: 1px solid var(--border); position: relative;
}
.template-box .highlight { color: var(--accent-pink); font-weight: 600; }
.template-box .variable { color: var(--accent-gold); }
.copy-btn {
    position: absolute; top: 10px; right: 10px;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); padding: 6px 12px; border-radius: 6px;
    cursor: pointer; font-size: 11px; font-family: inherit;
    transition: var(--transition);
}
.copy-btn:hover { background: var(--accent-pink); color: #fff; border-color: transparent; }

.title-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.title-card { background: var(--bg); border-radius: var(--radius-sm); padding: 14px; }
.title-card .template { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--accent-pink); }
.title-card .example { font-size: 12px; color: var(--text-muted); }

/* ===== HOOKS ===== */
.hook-stat-bar { display: flex; gap: 24px; justify-content: center; margin-bottom: 24px; padding: 20px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }
.hook-stat { text-align: center; }
.hook-stat .big { display: block; font-size: 32px; font-weight: 800; background: linear-gradient(135deg, var(--accent-pink), var(--accent-gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hook-stat span:last-child { font-size: 12px; color: var(--text-muted); }
.hooks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.hook-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; transition: var(--transition);
}
.hook-card:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.hook-card h4 { font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hook-card h4 i { color: var(--accent-gold); }
.hook-card p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.hook-examples { display: flex; flex-direction: column; gap: 6px; }
.hook-example { background: var(--bg); padding: 8px 12px; border-radius: 6px; font-size: 12px; border-left: 3px solid var(--accent-gold); color: var(--text); font-style: italic; }

/* ===== PREDICTOR ===== */
.predictor-card { max-width: 800px; }
.predictor-desc { color: var(--text-muted); margin-bottom: 20px; }
.predictor-form { display: flex; flex-direction: column; gap: 4px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; color: var(--text-muted); }
.checkbox-label input[type="checkbox"] { accent-color: var(--accent-pink); }

.predictor-result { margin-top: 30px; display: flex; gap: 30px; align-items: flex-start; flex-wrap: wrap; }
.result-score-ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.result-score-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.result-num { font-size: 42px; font-weight: 900; }
.result-label { font-size: 14px; color: var(--text-muted); }
.result-breakdown { flex: 1; min-width: 250px; }
.result-breakdown h4 { margin-bottom: 12px; font-size: 14px; }
.breakdown-item { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.breakdown-item span:first-child { width: 130px; color: var(--text-muted); }
.breakdown-item .b-score { font-weight: 700; min-width: 40px; }
.result-tips { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; margin-top: 16px; width: 100%; }
.result-tips h4 { font-size: 13px; color: var(--accent-green); margin-bottom: 8px; }
.result-tips ul { padding-left: 18px; font-size: 12px; line-height: 1.8; color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
/* ===== TABLET (1200px) ===== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .platform-grid { grid-template-columns: repeat(3, 1fr); }
    .calendar-grid { grid-template-columns: repeat(4, 1fr); }
    .format-analysis { flex-direction: column; }
    .ideas-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    .comp-video-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ===== MOBILE (768px) ===== */
@media (max-width: 768px) {
    html { font-size: 13px; }
    .sidebar {
        transform: translateX(-100%);
        width: 280px; z-index: 200;
        box-shadow: 4px 0 30px rgba(0,0,0,0.5);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.open { transform: translateX(0); }
    .menu-btn { display: flex !important; }
    .main-content { margin-left: 0 !important; }
    .menu-btn { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; }
    .menu-btn:hover { background: var(--border); }
    .content-area { padding: 16px 12px; }
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-left h1 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
    .stat-icon { width: 36px; height: 36px; font-size: 16px; }
    .stat-value { font-size: 22px; }
    .stat-change { margin-left: 0; margin-top: 4px; }

    /* Cards */
    .grid-2 { grid-template-columns: 1fr; gap: 16px; }
    .card-header { padding: 12px 14px; }
    .card-header h3 { font-size: 13px; }
    .card-body { padding: 14px; }

    /* Health Score */
    .health-score { flex-direction: column; gap: 16px; align-items: center; }
    .score-ring { width: 100px; height: 100px; }
    .score-num { font-size: 26px; }
    .health-item { flex-direction: column; gap: 4px; align-items: flex-start; }
    .health-item span:first-child { width: auto; }

    /* Issues */
    .issue { flex-direction: column; gap: 8px; padding: 12px; }

    /* Platforms */
    .platform-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .platform-card { padding: 14px; }
    .platform-followers { font-size: 18px; }

    /* Format Analysis */
    .format-analysis { flex-direction: column; gap: 16px; }
    .format-comparison { grid-template-columns: 1fr; gap: 12px; }
    .donut-chart { width: 130px; height: 130px; }

    /* Toolbars & Filters */
    .section-toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .filter-group { flex-wrap: wrap; gap: 6px; }
    .filter-btn { padding: 6px 12px; font-size: 11px; }

    /* Video Grid */
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
    .videos-stats-bar { flex-wrap: wrap; gap: 12px; padding: 10px 12px; }

    /* Ideas */
    .ideas-grid { grid-template-columns: 1fr; gap: 12px; }
    .idea-card { padding: 16px; }
    .idea-title { font-size: 14px; }

    /* Idea Detail Panel */
    .idea-detail-content { width: 100%; max-width: 100vw; max-height: 100vh; border-radius: 0; }
    .idp-header { padding: 14px 16px; }
    .idp-header h2 { font-size: 15px; }
    .idp-badges { flex-wrap: wrap; gap: 6px; }
    .idp-badge { font-size: 10px; padding: 3px 8px; }
    .idp-body { padding: 16px; }
    .script-step { padding: 12px; }
    .script-timeline { padding-left: 20px; }
    .ref-video-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    /* Calendar */
    .calendar-grid { grid-template-columns: 1fr; gap: 6px; }
    .cal-day { min-height: auto; padding: 10px; }
    .cal-day-header { display: none; }
    .cal-day-num { font-size: 16px; }
    .cal-event { font-size: 10px; padding: 4px 6px; }

    /* Time Grid */
    .time-slot { grid-template-columns: 60px 1fr; gap: 8px; }
    .time-bar { display: none; }
    .time-label { font-size: 14px; }
    .time-desc { font-size: 11px; }

    /* Competitors */
    .competitors-grid { grid-template-columns: 1fr; }
    .gaps-grid { grid-template-columns: 1fr; }
    .comp-video-list { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .comp-section-header { flex-wrap: wrap; gap: 8px; }

    /* SEO */
    .keyword-item { flex-wrap: wrap; gap: 6px; }
    .keyword-bar { width: 80px; }
    .title-templates { grid-template-columns: 1fr; }
    .template-box { font-size: 11px; padding: 14px; }

    /* Hooks */
    .hooks-grid { grid-template-columns: 1fr; }
    .hook-stat-bar { flex-direction: column; gap: 12px; padding: 16px; }

    /* Predictor */
    .predictor-card { max-width: 100%; }
    .predictor-result { flex-direction: column; align-items: center; }
    .input-row { grid-template-columns: 1fr; }
    .checkbox-row { gap: 8px; }
    .checkbox-label { font-size: 12px; }
    .result-score-ring { width: 120px; height: 120px; }

    /* Optimizer */
    .optimizer-layout { flex-direction: column; }
    .upload-preview video { max-height: 240px; }
    .extracted-frames img { width: 70px; height: 40px; }
    .progress-steps { flex-direction: column; gap: 6px; }
    .p-step { padding: 8px 10px; }
    .detected-tags { gap: 6px; }
    .detected-tag { font-size: 11px; padding: 4px 10px; }
    .gen-title-item { flex-wrap: wrap; gap: 8px; padding: 12px; }
    .gen-title-text { font-size: 13px; flex-basis: 100%; order: -1; }
    .gen-title-score { font-size: 10px; }
    .gen-title-copy { padding: 4px 8px; }
    .generated-hashtags { gap: 6px; }
    .gen-hashtag { padding: 6px 12px; font-size: 12px; }
    .generated-keywords { gap: 6px; }
    .opt-score-section { flex-direction: column; align-items: center; text-align: center; }
    .opt-score-big { width: 100px; height: 100px; }
    .opt-score-big .score-val { font-size: 30px; }

    /* Modal */
    .modal { width: 100%; max-width: 100vw; max-height: 100vh; border-radius: 0; }
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 16px; }
    .steps-guide { padding: 12px; }
    .steps-guide ol { font-size: 11px; line-height: 1.7; }
}

/* ===== SMALL MOBILE (480px) ===== */
@media (max-width: 480px) {
    html { font-size: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 10px; }
    .stat-value { font-size: 18px; }
    .stat-icon { width: 30px; height: 30px; font-size: 13px; border-radius: 8px; }
    .platform-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .platform-card { padding: 10px; gap: 4px; }
    .platform-card i { font-size: 22px; }
    .platform-followers { font-size: 16px; }
    .video-grid { grid-template-columns: 1fr; }
    .comp-video-list { grid-template-columns: 1fr; }
    .ref-video-grid { grid-template-columns: 1fr; }
    .topbar-left h1 { max-width: 140px; font-size: 13px; }
    .btn-sm { padding: 5px 10px; font-size: 11px; }
    .hashtag-tags { gap: 4px; }
    .hashtag-tag { padding: 3px 8px; font-size: 10px; }
}

/* ===== VIDEO OPTIMIZER ===== */
.optimizer-layout { display: flex; flex-direction: column; gap: 20px; }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    background: var(--bg);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-zone.dragover {
    border-color: var(--accent-pink);
    background: rgba(244,63,94,0.05);
}
.upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.upload-placeholder i { font-size: 48px; color: var(--text-dim); }
.upload-placeholder h3 { font-size: 16px; }
.upload-placeholder p { font-size: 13px; color: var(--text-muted); }

.upload-preview { width: 100%; }
.upload-preview video {
    width: 100%;
    max-height: 360px;
    border-radius: var(--radius-sm);
    background: #000;
    margin-bottom: 12px;
}
.video-file-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.video-file-info span { display: flex; align-items: center; gap: 6px; }
.video-file-info i { color: var(--accent-pink); }

.optimizer-form { margin-top: 24px; }
.form-section-title {
    font-size: 15px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-section-title i { color: var(--accent-blue); }
.required { color: var(--accent-red); }

.optimizer-form textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: var(--transition);
    line-height: 1.6;
}
.optimizer-form textarea:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(244,63,94,0.1);
}

/* Results */
.result-card { margin-bottom: 16px; position: relative; }
.result-card .card-header { display: flex; align-items: center; justify-content: space-between; }
.pick-label { font-size: 11px; color: var(--text-dim); font-style: italic; }

.generated-titles { display: flex; flex-direction: column; gap: 8px; }
.gen-title-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.gen-title-item:hover { border-color: var(--accent-pink); }
.gen-title-item.selected {
    border-color: var(--accent-green);
    background: rgba(16,185,129,0.05);
}
.gen-title-item .title-num {
    min-width: 32px; height: 32px;
    background: var(--bg-card);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: var(--accent-pink);
}
.gen-title-item.selected .title-num {
    background: var(--accent-green);
    color: #fff;
}
.gen-title-text { flex: 1; font-weight: 600; font-size: 14px; line-height: 1.4; }
.gen-title-score {
    font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 20px;
    white-space: nowrap;
}
.gen-title-score.high { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.gen-title-score.medium { background: rgba(245,158,11,0.15); color: var(--accent-gold); }
.gen-title-copy {
    background: none; border: 1px solid var(--border);
    color: var(--text-muted); padding: 6px 10px; border-radius: 6px;
    cursor: pointer; font-size: 11px; transition: var(--transition);
}
.gen-title-copy:hover { background: var(--accent-pink); color: #fff; border-color: transparent; }

.generated-desc {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    border: 1px solid var(--border);
    position: relative;
}
.desc-line { margin-bottom: 6px; }
.desc-line.highlight { color: var(--accent-pink); font-weight: 600; }
.desc-line.cta { color: var(--accent-green); font-weight: 600; }
.desc-line.dim { color: var(--text-muted); }

.generated-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gen-hashtag {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.gen-hashtag:hover { background: var(--accent-cyan); color: #000; border-color: transparent; }
.gen-hashtag.primary { color: var(--accent-pink); border-color: rgba(244,63,94,0.3); }
.gen-hashtag.secondary { color: var(--accent-cyan); }
.gen-hashtag.brand { color: var(--accent-gold); border-color: rgba(245,158,11,0.3); }

.generated-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gen-keyword {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gen-keyword .kw-volume {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}
.kw-volume.high { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.kw-volume.medium { background: rgba(245,158,11,0.15); color: var(--accent-gold); }
.kw-volume.low { background: rgba(255,255,255,0.05); color: var(--text-dim); }

.generated-hook {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    border-left: 4px solid var(--accent-gold);
}
.hook-timeline { display: flex; flex-direction: column; gap: 12px; }
.hook-second {
    display: flex; gap: 14px; align-items: flex-start;
}
.hook-time {
    min-width: 60px;
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-gold);
    padding: 4px 8px;
    background: rgba(245,158,11,0.1);
    border-radius: 6px;
    text-align: center;
}
.hook-action {
    font-size: 14px;
    line-height: 1.6;
}
.hook-action strong { color: var(--accent-pink); }

.opt-score-section {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.opt-score-big {
    width: 120px; height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 6px solid;
    flex-shrink: 0;
}
.opt-score-big .score-val { font-size: 36px; font-weight: 900; }
.opt-score-big .score-lbl { font-size: 11px; color: var(--text-muted); }
.opt-score-big.high { border-color: var(--accent-green); }
.opt-score-big.high .score-val { color: var(--accent-green); }
.opt-score-big.medium { border-color: var(--accent-gold); }
.opt-score-big.medium .score-val { color: var(--accent-gold); }
.opt-score-big.low { border-color: var(--accent-red); }
.opt-score-big.low .score-val { color: var(--accent-red); }

.opt-score-details { flex: 1; }
.opt-score-details h4 { margin-bottom: 8px; font-size: 16px; }
.opt-score-details p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 8px; }
.opt-tips { margin-top: 12px; }
.opt-tip {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 13px; margin-bottom: 8px; line-height: 1.5;
}
.opt-tip i.good { color: var(--accent-green); }
.opt-tip i.warn { color: var(--accent-gold); }

/* ===== GEMINI SETUP ===== */
.gemini-status { }
.gemini-connected {
    display: flex; align-items: center; gap: 12px;
    padding: 16px; background: rgba(16,185,129,0.08);
    border-radius: var(--radius-sm); border: 1px solid rgba(16,185,129,0.2);
}
.gemini-connected span { flex: 1; font-weight: 600; color: var(--accent-green); }
.gemini-setup p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }

/* ===== AI PROGRESS ===== */
.ai-progress {
    margin-top: 20px; padding: 20px;
    background: var(--bg); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.progress-steps {
    display: flex; gap: 8px; margin-bottom: 16px;
}
.p-step {
    flex: 1; display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    font-size: 12px; color: var(--text-dim); transition: var(--transition);
}
.p-step i { font-size: 16px; }
.p-step.active { border-color: var(--accent-pink); color: var(--accent-pink); background: rgba(244,63,94,0.05); }
.p-step.done { border-color: var(--accent-green); color: var(--accent-green); background: rgba(16,185,129,0.05); }
.ai-status-text { font-size: 14px; color: var(--text-muted); text-align: center; }

/* ===== AI DETECTED ===== */
.ai-detected {
    margin-top: 20px; padding: 20px;
    background: rgba(99,102,241,0.05); border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-sm);
}
.ai-detected h4 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; color: var(--accent-blue); }
.detected-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detected-tag {
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: var(--bg-card); border: 1px solid var(--border);
}
.detected-tag.product { color: var(--accent-pink); border-color: rgba(244,63,94,0.3); }
.detected-tag.color { color: var(--accent-cyan); border-color: rgba(6,182,212,0.3); }
.detected-tag.occasion { color: var(--accent-gold); border-color: rgba(245,158,11,0.3); }
.detected-tag.style { color: var(--accent-purple); border-color: rgba(168,85,247,0.3); }
.detected-tag.fabric { color: var(--accent-green); border-color: rgba(16,185,129,0.3); }

/* ===== EXTRACTED FRAMES ===== */
.extracted-frames {
    display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px;
}
.extracted-frames img {
    width: 100px; height: 56px; object-fit: cover;
    border-radius: 6px; border: 2px solid var(--border);
}
.extracted-frames img.analyzing { border-color: var(--accent-pink); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== COMPETITOR VIDEOS ===== */
.comp-filter-bar { margin-bottom: 16px; }
.comp-videos-grid { display: flex; flex-direction: column; gap: 16px; }
.comp-section { }
.comp-section-header {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; margin-bottom: 12px;
    background: var(--bg); border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-pink);
}
.comp-section-header .comp-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--accent-pink);
}
.comp-section-info { flex: 1; }
.comp-section-info h4 { font-size: 15px; margin-bottom: 2px; }
.comp-section-info span { font-size: 12px; color: var(--text-muted); }
.comp-section-link {
    font-size: 12px; color: var(--accent-pink); font-weight: 600;
    text-decoration: none; display: flex; align-items: center; gap: 4px;
}
.comp-section-link:hover { text-decoration: underline; }

.comp-video-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 24px; }
.comp-video-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden;
    transition: var(--transition); cursor: pointer;
}
.comp-video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent-pink); }
.comp-video-thumb {
    position: relative; aspect-ratio: 16/9; overflow: hidden; background: #000;
}
.comp-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.comp-video-views {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(0,0,0,0.85); padding: 3px 8px;
    border-radius: 4px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; gap: 4px;
}
.comp-video-views i { color: var(--accent-pink); font-size: 10px; }
.comp-video-rank {
    position: absolute; top: 6px; left: 6px;
    background: var(--accent-gold); color: #000;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
}
.comp-video-info { padding: 10px 12px; }
.comp-video-title {
    font-size: 12px; font-weight: 600; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 6px;
}
.comp-video-meta {
    display: flex; gap: 12px; font-size: 11px; color: var(--text-muted);
}
.comp-video-meta span { display: flex; align-items: center; gap: 3px; }
.comp-loading {
    text-align: center; padding: 40px;
    color: var(--text-muted); font-size: 14px;
}
.comp-loading i { font-size: 24px; margin-bottom: 12px; display: block; }
