:root {
  --primary: #74B9FF;
  --primary-dim: rgba(116,185,255,0.12);
  --secondary: #A29BFE;
  --accent: #00B894;
  --accent-dim: rgba(0,184,148,0.12);
  --bg: #0A1219;
  --bg-input: rgba(6,12,18,0.9);
  --border: rgba(116,185,255,0.1);
  --border-hover: rgba(116,185,255,0.2);
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --text-muted: #64748B;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 250ms ease;
  --glass: rgba(10,18,25,0.65);
  --glass-border: rgba(116,185,255,0.08);
  --success: #10B981;
  --warning: #F59E0B;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
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;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(116,185,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(0,184,148,0.03) 0%, transparent 50%);
}
.app { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; min-height: 100vh; }

.header { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.header-left { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.header h1 { font-size: 1.2rem; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.session-timer { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--accent); padding: 4px 12px; background: var(--accent-dim); border-radius: 20px; border: 1px solid rgba(0,184,148,0.2); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm); border: none; font-family: var(--font); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn-primary { background: var(--primary); color: #0A1219; }
.btn-primary:hover { background: #5EAAFF; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--primary-dim); }
.btn-ghost.active { background: var(--primary-dim); color: var(--text); border-color: var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }

.main { flex: 1; display: grid; grid-template-columns: 300px 1fr; gap: 16px; padding: 16px 0; align-items: start; }

.panel { background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; animation: fadeIn 0.3s ease; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 6px; }
.panel-header h2 { font-size: 0.88rem; font-weight: 600; }
.panel-body { padding: 16px; flex: 1; }

.divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.section-title { font-size: 0.78rem; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }

/* Big Timer */
.big-timer { font-family: var(--mono); font-size: 2.8rem; font-weight: 700; text-align: center; color: var(--text); line-height: 1; margin-bottom: 4px; }
.timer-status { text-align: center; font-size: 0.78rem; color: var(--accent); margin-bottom: 12px; }
.timer-controls { display: flex; gap: 8px; justify-content: center; }

/* Interval Buttons */
.interval-options { display: flex; gap: 6px; }
.interval-btn { flex: 1; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text-dim); font-family: var(--font); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all var(--transition); text-align: center; }
.interval-btn:hover { background: var(--primary-dim); color: var(--text); }
.interval-btn.active { background: var(--primary-dim); color: var(--text); border-color: var(--primary); }

.tip-text { font-size: 0.78rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 6px; }
.rule-timer { font-family: var(--mono); font-size: 0.88rem; color: var(--primary); font-weight: 600; }

/* Focus Bar */
.focus-bar { height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.focus-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 4px; transition: width 0.5s ease; }
.focus-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-dim); }

/* Stats */
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { padding: 12px; background: var(--bg-input); border-radius: var(--radius-sm); text-align: center; border: 1px solid var(--border); }
.stat-value { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }

.usage-chart { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-input); }
.view-toggle { display: flex; gap: 4px; }

/* Suggestions */
.suggestions { display: flex; flex-direction: column; gap: 6px; }
.suggestion-item { padding: 10px; background: var(--bg-input); border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 0.82rem; display: flex; align-items: center; gap: 8px; }
.suggestion-item .emoji { font-size: 1.2rem; }

/* Break Overlay */
.break-overlay { position: fixed; inset: 0; background: rgba(10,18,25,0.92); display: flex; align-items: center; justify-content: center; z-index: 100; }
.break-overlay.hidden { display: none; }
.break-modal { background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 40px; text-align: center; max-width: 400px; animation: fadeIn 0.4s ease; }
.break-modal h2 { font-size: 1.4rem; margin-bottom: 10px; }
.break-suggestion { color: var(--text-dim); margin-bottom: 20px; }
.break-actions { display: flex; gap: 10px; justify-content: center; }

.footer { padding: 16px 0; text-align: center; font-size: 0.72rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: auto; }

.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
@media (max-width: 800px) { .main { grid-template-columns: 1fr; } }
