/* Timezone Converter — Clean dark theme */
*, *::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);
  --accent: #818CF8;
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-input: #0D1322;
  --border: rgba(99,102,241,0.15);
  --border-focus: rgba(99,102,241,0.5);
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --text-muted: #475569;
  --green: #34D399;
  --green-dim: rgba(52,211,153,0.12);
  --red: #F87171;
  --red-dim: rgba(248,113,113,0.12);
  --yellow: #FACC15;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --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; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at top, rgba(99,102,241,0.05), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(30,41,59,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 700px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.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); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #4F46E5); color: white; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-xs { padding: 3px 8px; font-size: 0.72rem; }

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

.add-row { display: flex; gap: 8px; margin-bottom: 16px; }
.tz-field { flex: 1; padding: 8px 10px; font-family: var(--font); font-size: 0.82rem; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; }
.tz-field:focus { border-color: var(--border-focus); }

.slider-section { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.slider-label { font-size: 0.72rem; color: var(--text-muted); min-width: 80px; }
.slider { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; background: rgba(99,102,241,0.2); border-radius: 2px; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); cursor: pointer; border: 2px solid var(--bg); }
.slider-value { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); min-width: 30px; text-align: center; }

.zones-list { display: flex; flex-direction: column; gap: 8px; }

.zone-card { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; transition: all var(--transition); }
.zone-card:hover { border-color: rgba(99,102,241,0.3); }
.zone-card.working { border-left: 3px solid var(--green); }
.zone-card.sleeping { border-left: 3px solid var(--text-muted); }

.zone-info { flex: 1; }
.zone-name { font-size: 0.88rem; font-weight: 600; color: var(--accent); }
.zone-tz { font-size: 0.68rem; color: var(--text-muted); }
.zone-time { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; color: var(--text); min-width: 100px; text-align: right; }
.zone-date { font-size: 0.68rem; color: var(--text-muted); text-align: right; }
.zone-status { font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.zone-status.work { background: var(--green-dim); color: var(--green); }
.zone-status.off { background: rgba(71,85,105,0.2); color: var(--text-muted); }
.zone-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 0.72rem; padding: 4px; border-radius: 4px; }
.zone-remove:hover { background: var(--red-dim); }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) { .zone-time { font-size: 1.1rem; } }
