/* Screen Recorder — Indigo Dark */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6366F1;
  --primary-dim: rgba(99,102,241,0.12);
  --primary-glow: rgba(99,102,241,0.3);
  --danger: #EF4444;
  --danger-dim: rgba(239,68,68,0.12);
  --bg: #0F1219;
  --bg-card: #171C28;
  --border: rgba(99,102,241,0.12);
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --text-muted: #475569;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(23,28,40,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 600px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.main { max-width: 600px; margin: 0 auto; padding: 20px; }

.recorder-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; text-align: center; }

.controls { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.toggle-row { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-dim); cursor: pointer; }
.toggle-row input { accent-color: var(--primary); }

.status-area { margin-bottom: 20px; }
.timer { font-size: 2.5rem; font-weight: 800; letter-spacing: 0.02em; color: var(--text); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.timer.recording { color: var(--danger); animation: pulse 1s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.timer.paused { color: var(--primary); }
.status-label { font-size: 0.75rem; color: var(--text-muted); }

.action-buttons { display: flex; justify-content: center; gap: 8px; }
.btn { padding: 10px 20px; font-family: var(--font); font-size: 0.82rem; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: all var(--transition); }
.btn:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-lg { padding: 12px 28px; font-size: 0.9rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4F46E5); color: #fff; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 4px 16px var(--primary-glow); }
.btn-secondary { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(99,102,241,0.2); }
.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

.preview-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-header { padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.preview-video { width: 100%; display: block; background: #000; }
.preview-actions { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.file-info { font-size: 0.72rem; color: var(--text-dim); }

.countdown-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 100; align-items: center; justify-content: center; }
.countdown-overlay.active { display: flex; }
.countdown-num { font-size: 8rem; font-weight: 800; color: var(--primary); animation: countPop 1s ease; }
@keyframes countPop { 0% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }
