/* ============================================
   WORLD CLOCK — Stylesheet v3
   Nyaman di mata · Estetik · Kalem
   ============================================ */

/* ===== MIDNIGHT (default) — deep navy + soft amber ===== */
:root,
[data-theme="midnight"] {
  --bg: #0d1017;
  --bg-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, #1a2130 0%, #0d1017 70%);
  --bg-elev: #131822;
  --bg-card: #161b26;
  --bg-card-hover: #1c2230;
  --border: #232a38;
  --border-strong: #333c4d;
  --text: #dde2eb;
  --text-dim: #7b8496;
  --accent: #e0a86a;
  --accent-soft: rgba(224, 168, 106, 0.12);
  --accent-glow: rgba(224, 168, 106, 0.2);
  --accent-2: #8fb3d9;
  --danger: #e88b8b;
  --success: #8fc78a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
}

/* ===== LIGHT — warm off-white + terracotta ===== */
[data-theme="light"] {
  --bg: #f7f4ee;
  --bg-gradient: linear-gradient(180deg, #f0ece2 0%, #f7f4ee 30%, #f7f4ee 100%);
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #faf7f1;
  --border: #e8e2d4;
  --border-strong: #d4cdba;
  --text: #2a2620;
  --text-dim: #7a7365;
  --accent: #b8612d;
  --accent-soft: rgba(184, 97, 45, 0.09);
  --accent-glow: rgba(184, 97, 45, 0.15);
  --accent-2: #5c7a99;
  --danger: #b8443a;
  --success: #5e7d4a;
  --shadow-sm: 0 1px 2px rgba(58, 50, 38, 0.05);
  --shadow: 0 4px 16px rgba(58, 50, 38, 0.07);
  --shadow-lg: 0 12px 32px rgba(58, 50, 38, 0.1);
}

/* ===== OCEAN — deep teal kalem ===== */
[data-theme="ocean"] {
  --bg: #0c1a1e;
  --bg-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, #14282e 0%, #0c1a1e 70%);
  --bg-elev: #102127;
  --bg-card: #13252c;
  --bg-card-hover: #182e36;
  --border: #1e353e;
  --border-strong: #2b4a55;
  --text: #d5e3e6;
  --text-dim: #7c9198;
  --accent: #7ec8b8;
  --accent-soft: rgba(126, 200, 184, 0.12);
  --accent-glow: rgba(126, 200, 184, 0.2);
  --accent-2: #a8c8d8;
  --danger: #e08a8a;
  --success: #a3d49a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* ===== FOREST — sage green gelap ===== */
[data-theme="forest"] {
  --bg: #101510;
  --bg-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, #1a2419 0%, #101510 70%);
  --bg-elev: #161d15;
  --bg-card: #1a221a;
  --bg-card-hover: #202a20;
  --border: #2a3528;
  --border-strong: #3d4a3a;
  --text: #dde4da;
  --text-dim: #828b7e;
  --accent: #c8b878;
  --accent-soft: rgba(200, 184, 120, 0.12);
  --accent-glow: rgba(200, 184, 120, 0.2);
  --accent-2: #9db89a;
  --danger: #d98880;
  --success: #a3c988;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* ===== NORD ===== */
[data-theme="nord"] {
  --bg: #2e3440;
  --bg-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, #3b4252 0%, #2e3440 70%);
  --bg-elev: #353c4a;
  --bg-card: #3b4252;
  --bg-card-hover: #434c5e;
  --border: #4c566a;
  --border-strong: #5e6a82;
  --text: #eceff4;
  --text-dim: #a3adc2;
  --accent: #d8b678;
  --accent-soft: rgba(216, 182, 120, 0.12);
  --accent-glow: rgba(216, 182, 120, 0.2);
  --accent-2: #88c0d0;
  --danger: #bf616a;
  --success: #a3be8c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.4);
}

/* ===== SEPIA — cream + cokelat hangat ===== */
[data-theme="sepia"] {
  --bg: #f0e8d5;
  --bg-gradient: linear-gradient(180deg, #e8dfc8 0%, #f0e8d5 40%);
  --bg-elev: #f7f0de;
  --bg-card: #faf4e4;
  --bg-card-hover: #f2ebd8;
  --border: #ded3b7;
  --border-strong: #c4b894;
  --text: #3a3226;
  --text-dim: #776c56;
  --accent: #9c5a2c;
  --accent-soft: rgba(156, 90, 44, 0.1);
  --accent-glow: rgba(156, 90, 44, 0.15);
  --accent-2: #6d7d52;
  --danger: #a84438;
  --success: #6d8a44;
  --shadow-sm: 0 1px 2px rgba(58, 50, 38, 0.06);
  --shadow: 0 4px 16px rgba(58, 50, 38, 0.08);
  --shadow-lg: 0 12px 32px rgba(58, 50, 38, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  padding-top: 0;
}

/* ============================================
   WIDGET BAR (sticky di atas)
   ============================================ */
.widget-bar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  box-shadow: var(--shadow);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.widget-content {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
}

.widget-content::-webkit-scrollbar { height: 4px; }
.widget-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.widget-clock-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}

.widget-clock-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.widget-clock-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--accent-glow);
}

.widget-clock-item .w-icon {
  font-size: 0.95rem;
  opacity: 0.75;
}

.widget-clock-item .w-time {
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.widget-clock-item .w-time .w-sec {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 1px;
}

.widget-clock-item .w-tz {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-left: 4px;
  border-left: 1px solid var(--border);
  margin-left: 2px;
}

.widget-clock-item .w-remove {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 4px;
  opacity: 0;
  transition: all 0.15s;
}

.widget-clock-item:hover .w-remove {
  opacity: 1;
}

.widget-clock-item .w-remove:hover {
  color: var(--danger);
  background: rgba(255, 255, 255, 0.05);
}

.widget-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.widget-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
}

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

/* Tombol kecil buat munculin balik widget */
.widget-show-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 499;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.widget-show-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   APP
   ============================================ */
.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

.header-right { display: flex; align-items: center; gap: 10px; position: relative; }

/* ===== THEME SWITCHER ===== */
.theme-switcher { position: relative; }

.theme-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 180px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeSlide 0.15s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text);
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.theme-option:hover { background: var(--bg-card-hover); }
.theme-option.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
}

.swatch[data-swatch="midnight"] { background: linear-gradient(135deg, #0d1017, #e0a86a); }
.swatch[data-swatch="light"] { background: linear-gradient(135deg, #f7f4ee, #b8612d); }
.swatch[data-swatch="ocean"] { background: linear-gradient(135deg, #0c1a1e, #7ec8b8); }
.swatch[data-swatch="forest"] { background: linear-gradient(135deg, #101510, #c8b878); }
.swatch[data-swatch="nord"] { background: linear-gradient(135deg, #2e3440, #d8b678); }
.swatch[data-swatch="sepia"] { background: linear-gradient(135deg, #f0e8d5, #9c5a2c); }

/* ===== OVERRIDE BADGE ===== */
.override-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.override-badge button {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: inherit;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.override-badge button:hover { background: rgba(0, 0, 0, 0.35); }

/* ===== OVERRIDE PANEL ===== */
.override-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.override-input-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 10px;
  color: var(--text);
}

.input-row { display: flex; gap: 10px; flex-wrap: wrap; }

.input-row input {
  flex: 1;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
  transition: border 0.2s, box-shadow 0.2s;
}

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

.input-row input::placeholder { color: var(--text-dim); opacity: 0.6; font-family: 'Inter', sans-serif; }

.btn-primary, .btn-ghost {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s;
  border: none;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }

.hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.6;
}

.hint code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  font-size: 0.85em;
  border: 1px solid var(--border);
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== PINNED CLOCKS ===== */
.pinned-section { margin-bottom: 40px; }

.pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.pinned-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.pinned-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.pinned-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px var(--accent-glow);
}

.pinned-card.active::after {
  content: '●';
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--accent);
  font-size: 0.7rem;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pinned-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 10px;
}

.pinned-city {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pinned-flag { font-size: 1.7rem; line-height: 1; }

.pinned-name {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.pinned-country {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.change-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

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

.digital-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin: 14px 0 10px;
  font-variant-numeric: tabular-nums;
}

.digital-clock .hm { color: var(--accent); }

.digital-clock .seconds {
  font-size: 1.5rem;
  color: var(--text-dim);
  margin-left: 3px;
  font-weight: 500;
}

.date-line {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tz-badge {
  font-size: 0.7rem;
  background: var(--bg-elev);
  padding: 4px 9px;
  border-radius: 6px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  border: 1px solid var(--border);
}

/* ===== ALL CLOCKS ===== */
.all-section { margin-bottom: 20px; }

.all-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.city-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}

.city-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.city-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.city-flag { font-size: 1.2rem; line-height: 1; }

.city-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-country {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.city-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.city-clock .seconds {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-left: 2px;
  font-weight: 500;
}

.city-date {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 5px;
}

/* ===== SEARCH & FILTER ===== */
.search-box input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  width: 240px;
  font-family: 'Inter', sans-serif;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

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

.search-box input::placeholder { color: var(--text-dim); opacity: 0.6; }

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
  font-family: inherit;
}

.tab:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-card); }

.tab.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 2px 10px var(--accent-glow);
  font-weight: 600;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.modal[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 460px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 0.95rem; font-weight: 700; }

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  transition: all 0.15s;
  font-family: inherit;
}

.modal-close:hover { background: var(--bg-card-hover); color: var(--text); }

#pickerSearch,
#widgetPickerSearch {
  margin: 14px 20px 0;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: border 0.2s, box-shadow 0.2s;
}

#pickerSearch:focus,
#widgetPickerSearch:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.picker-list {
  overflow-y: auto;
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.picker-list::-webkit-scrollbar { width: 8px; }
.picker-list::-webkit-scrollbar-track { background: transparent; }
.picker-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.picker-list::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}

.picker-item:hover { background: var(--bg-card-hover); border-color: var(--border); }

.picker-item .flag { font-size: 1.2rem; line-height: 1; }
.picker-item .name { font-size: 0.875rem; font-weight: 600; }
.picker-item .country { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }

/* ===== FOOTER ===== */
.footer {
  margin-top: 50px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.75rem;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* ===== ANTI-COPY ===== */
body.no-select,
body.no-select * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.no-select input,
body.no-select textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app { padding: 18px 14px 40px; }
  .digital-clock { font-size: 2.15rem; }
  .digital-clock .seconds { font-size: 1.2rem; }
  .city-clock { font-size: 1.15rem; }
  .search-box input { width: 100%; }
  .input-row input { min-width: 100%; }
  .logo { font-size: 1.3rem; }
  .pinned-card { padding: 20px; }
  .btn-primary, .btn-ghost { flex: 1; min-width: 100px; }
  .widget-bar { padding: 8px 12px; gap: 8px; }
  .widget-content { gap: 12px; }
  .widget-clock-item { font-size: 0.85rem; padding: 5px 10px; }
  .widget-clock-item .w-tz { font-size: 0.65rem; }
}

@media (max-width: 480px) {
  .digital-clock { font-size: 1.85rem; }
  .digital-clock .seconds { font-size: 1.05rem; }
  .pinned-grid { grid-template-columns: 1fr; }
  .all-grid { grid-template-columns: 1fr 1fr; }
  .city-clock { font-size: 1rem; }
  .widget-clock-item { font-size: 0.78rem; padding: 4px 9px; }
  .widget-clock-item .w-sec { font-size: 0.65rem; }
  .widget-clock-item .w-tz { display: none; }
}

@media (max-width: 380px) {
  .all-grid { grid-template-columns: 1fr; }
}

/* ===== UTILITIES ===== */
[hidden] { display: none !important; }

::selection {
  background: var(--accent);
  color: var(--bg);
}
