/* Demo Video Generator Dashboard Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --border: #334155;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

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

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version {
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

.panel-content {
    padding: 24px;
}

.btn-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: transform 0.2s;
}

.btn-toggle:hover {
    color: var(--text);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }
}

.form-section {
    background: rgba(15, 23, 42, 0.5);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.hint {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.hint a {
    color: var(--primary-light);
    text-decoration: none;
}

.hint a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.form-actions.main {
    justify-content: center;
}

/* Status */
.status {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
}

.status.success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--secondary);
}

.status.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Progress */
.progress-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-steps {
    display: grid;
    gap: 12px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.step::before {
    content: "○";
    font-size: 16px;
}

.step.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text);
    border: 1px solid var(--primary);
}

.step.active::before {
    content: "◉";
    color: var(--primary);
}

.step.completed {
    color: var(--secondary);
}

.step.completed::before {
    content: "✓";
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

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

.card-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 20px;
    font-weight: 600;
}

.card-value.accent {
    color: var(--primary-light);
}

/* Tabs */
.tabs {
    margin-top: 24px;
}

.tab-buttons {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Script Display */
.script-segment {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.script-phase {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.phase-hook { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.phase-problem { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.phase-solution { background: rgba(34, 197, 94, 0.2); color: var(--secondary); }
.phase-feature { background: rgba(99, 102, 241, 0.2); color: var(--primary-light); }
.phase-proof { background: rgba(14, 165, 233, 0.2); color: #0ea5e9; }
.phase-cta { background: rgba(168, 85, 247, 0.2); color: #a855f7; }

.script-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.script-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

/* Code/JSON Display */
pre {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid var(--border);
}

code {
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--primary-light);
}

/* Collapsible Sections */
.collapsible h3 {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.2s;
}

.collapsible.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    margin-top: 16px;
}

.collapsible.collapsed .collapsible-content {
    display: none;
}

/* Help Text */
.help-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.help-text code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.footer .small {
    font-size: 12px;
    margin-top: 8px;
    color: var(--text-dim);
}

/* Loading Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Voice Info */
.voice-info {
    display: grid;
    gap: 16px;
}

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

.voice-card h4 {
    margin-bottom: 12px;
    color: var(--primary-light);
}

.voice-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.setting {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 6px;
}

.setting-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.setting-value {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

/* Cursor Movements Table */
.cursor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cursor-table th,
.cursor-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.cursor-table th {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Alert/Notification */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid var(--warning);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .panel-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
}
