:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-light: #818cf8;
  --accent-soft: #eef2ff;
  --accent-glow: rgba(79, 70, 229, 0.15);
  --success: #22c55e;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 40%, #f8fafc 100%);
  color: var(--text);
  min-height: 100vh;
}

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-bg .circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}

.page-bg .c1 {
  width: 320px;
  height: 320px;
  background: #818cf8;
  top: -100px;
  right: -60px;
}

.page-bg .c2 {
  width: 280px;
  height: 280px;
  background: #4f46e5;
  bottom: -80px;
  left: -40px;
}

.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
}

.top-nav {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.web-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 10px;
  border-radius: 999px;
}

.lang-switch {
  display: flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.lang-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.04em;
}

.lang-btn:hover {
  color: var(--accent);
}

.lang-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.app-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.header {
  background: linear-gradient(145deg, var(--accent) 0%, #3730a3 100%);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-text h1 {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-text p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.4;
}

.status-card {
  margin: 14px 14px 0;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.status-row {
  display: flex;
  justify-content: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.status-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.25s ease;
}

.status-pill.active .status-dot {
  background: var(--success);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.countdown-container {
  margin-top: 16px;
}

.countdown-container[hidden] {
  display: none !important;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 12px 8px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.countdown-value {
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
}

.countdown-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.countdown-sep {
  font-size: 26px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.alarm-info {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

.idle-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.5;
}

.idle-hint[hidden] {
  display: none;
}

.section {
  padding: 16px 14px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.datetime-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.input-group input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.quick-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.quick-btn {
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.quick-btn:hover {
  border-color: var(--accent-light);
  background: var(--accent-soft);
  color: var(--accent);
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn {
  padding: 11px 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #4338ca;
}

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

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

.footer {
  padding: 0 14px 16px;
}

.footer-btn {
  width: 100%;
  padding: 9px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.footer-btn:hover {
  border-color: var(--accent-light);
  color: var(--accent);
  background: var(--accent-soft);
}

.disclaimer {
  margin-top: 10px;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
}

.page-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.page-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.page-footer a:hover {
  text-decoration: underline;
}

.notif-banner {
  display: none;
  margin: 14px 14px 0;
  padding: 10px 12px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.4;
}

.notif-banner.visible {
  display: block;
}

.notif-banner button {
  margin-top: 6px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

/* Privacy page */
.legal-wrap {
  width: 100%;
  max-width: 680px;
}

.legal-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.1);
  border: 1px solid var(--border);
}

.legal-card h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.legal-card .updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.legal-card h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

.legal-card p,
.legal-card li {
  font-size: 15px;
  color: #475569;
  line-height: 1.65;
}

.legal-card ul {
  padding-left: 20px;
  margin: 8px 0;
}

.legal-card a {
  color: var(--accent);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .legal-card {
    padding: 24px 20px;
  }

  .legal-card h1 {
    font-size: 24px;
  }
}
