:root {
  --bg: #0a0a14;
  --bg2: #111120;
  --bg3: #18182a;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text: #f0f0f5;
  --text2: #8a8aa0;
  --text3: #555570;
  --primary: #10b981;
  --primary-dim: rgba(16,185,129,0.12);
  --primary-glow: rgba(16,185,129,0.25);
  --gold: #fbbf24;
  --gold-dim: rgba(251,191,36,0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

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

.app { max-width: 520px; margin: 0 auto; padding: 20px 16px; }

/* Header */
.header { margin-bottom: 20px; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 1.5rem; }
.logo h1 {
  font-size: 1.3rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tagline { font-size: 0.75rem; color: var(--text2); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
  color: var(--text2);
}
.icon-btn:hover { border-color: var(--border-hover); }

/* Location */
.location-bar {
  text-align: center;
  padding: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.location-text { font-size: 0.78rem; color: var(--text2); }

/* Next Prayer Card */
.next-prayer-card {
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(251,191,36,0.08));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}
.next-label { font-size: 0.68rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.06em; }
.next-name { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 6px 0; }
.next-time { font-family: var(--mono); font-size: 2.2rem; font-weight: 700; color: var(--text); }
.next-countdown { font-family: var(--mono); font-size: 0.85rem; color: var(--gold); margin-top: 6px; }

/* Prayer List */
.prayer-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; }

.prayer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.prayer-item.active {
  border-color: var(--primary);
  background: var(--primary-dim);
}
.prayer-item.passed { opacity: 0.5; }
.prayer-icon { font-size: 1.1rem; }
.prayer-name { flex: 1; font-size: 0.9rem; font-weight: 500; }
.prayer-time { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; color: var(--text); }

/* Qibla */
.qibla-section { margin-bottom: 28px; }
.section-title {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 14px;
  text-align: center;
}
.qibla-compass { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qibla-compass canvas {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
}
.qibla-degrees { font-family: var(--mono); font-size: 1rem; color: var(--gold); }

/* Settings */
.settings-panel {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px;
  z-index: 50;
  transition: transform 0.3s;
}
.settings-panel.hidden { transform: translateX(-50%) translateY(100%); }
.settings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.settings-header h3 { font-size: 1rem; font-weight: 600; }

.setting-group { margin-bottom: 12px; }
.setting-group label { display: block; font-size: 0.72rem; color: var(--text2); margin-bottom: 4px; }

.field-select, .field-input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  appearance: none;
}
.field-select:focus, .field-input:focus { border-color: var(--primary); }

.btn { font-family: var(--font); font-size: 0.85rem; font-weight: 600; padding: 12px 20px; border: none; border-radius: var(--radius-sm); cursor: pointer; width: 100%; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 20px var(--primary-glow); }

/* Footer */
.footer { text-align: center; padding: 24px 0; border-top: 1px solid var(--border); }
.footer p { font-size: 0.72rem; color: var(--text3); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 100px; }
