/* ═══════════════════════════════════════════════════════════
   AYODHYA DIVYA MOSAIC — styles.css
   Dark-gold spiritual theme with animations
═══════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --bg:          #0a0502;
  --bg-card:     #140a04;
  --bg-card2:    #1c0f06;
  --gold:        #f59e0b;
  --gold-bright: #fbbf24;
  --gold-dim:    #92400e;
  --gold-glow:   rgba(245, 158, 11, 0.4);
  --saffron:     #ea580c;
  --saffron-lt:  #f97316;
  --text:        #fef3c7;
  --text-dim:    #d97706;
  --text-muted:  #78350f;
  --border:      #3a1a08;
  --border-gold: #78350f;
  --shadow-gold: 0 0 30px rgba(245, 158, 11, 0.2);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────────────── */
.cinzel { font-family: 'Cinzel', serif; }

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10, 5, 2, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.25rem;
}

.brand {
  font-family: 'Cinzel', serif;
  font-size: 1rem; font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.brand-text { display: none; }
@media (min-width: 580px) { .brand-text { display: inline; } }

.live-pill {
  background: #ef4444; color: #fff;
  font-size: 0.6rem; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  letter-spacing: 1px;
  animation: live-blink 2s infinite;
  flex-shrink: 0;
}

.nav-book-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, var(--saffron), var(--gold));
  color: #0a0502;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-left: auto;
  margin-right: 0.5rem;
}
.nav-book-pill:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
}
@keyframes live-blink {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

.header-counter { margin-left: auto; text-align: right; }
.counter-num {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--gold); line-height: 1;
  text-shadow: 0 0 25px var(--gold);
}
.counter-label { font-size: 0.6rem; color: var(--text-dim); margin-top: 1px; }

/* Progress Bar */
.progress-track {
  height: 3px;
  background: rgba(245, 158, 11, 0.1);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  transition: width 1s ease;
  box-shadow: 0 0 10px var(--gold);
}

/* Ticker */
.ticker-bar {
  display: flex; align-items: center;
  padding: 4px 1rem;
  background: rgba(245, 158, 11, 0.04);
  border-top: 1px solid var(--border);
  overflow: hidden;
  font-size: 0.72rem;
}
.ticker-label {
  color: var(--gold); font-weight: 700;
  flex-shrink: 0; margin-right: 1rem;
  white-space: nowrap;
}
.ticker-scroll {
  display: flex; gap: 2.5rem;
  animation: ticker-move 40s linear infinite;
  white-space: nowrap;
}
@keyframes ticker-move {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item { color: var(--text-dim); }
.ticker-item span { color: var(--gold-bright); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════ */
.hero-section {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; pointer-events: none;
}
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,5,2,0.1) 0%, rgba(10,5,2,0.95) 80%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem 1.5rem;
  max-width: 760px;
}
.hero-eyebrow {
  color: var(--saffron);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 700; line-height: 1.15;
  color: var(--text); margin-bottom: 1.25rem;
}
.hero-title em {
  font-style: normal; color: var(--gold);
  text-shadow: 0 0 60px rgba(245,158,11,0.5), 0 0 120px rgba(245,158,11,0.2);
}
.hero-sub {
  color: rgba(254, 243, 199, 0.72);
  font-size: 1rem; line-height: 1.65;
  margin-bottom: 2rem;
}
.hero-sub strong { color: var(--gold-bright); }

/* Hero Stats Row */
.hero-stats-row {
  display: flex; align-items: center; justify-content: center;
  gap: 1.5rem; flex-wrap: wrap;
  background: rgba(245,158,11,0.07);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 1rem 2rem;
  margin-bottom: 2rem;
}
.h-stat { text-align: center; }
.h-stat-val {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--gold); line-height: 1;
}
.h-stat-val.live-blink { animation: live-blink 3s infinite; }
.h-stat-lbl { font-size: 0.68rem; color: var(--text-dim); margin-top: 2px; }
.h-stat-sep { color: var(--border); font-size: 1.5rem; }

/* Hero CTA */
.hero-cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: linear-gradient(135deg, var(--saffron) 0%, var(--gold) 100%);
  color: #0a0502;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 700; padding: 1rem 2.5rem;
  border: none; border-radius: 50px; cursor: pointer;
  box-shadow: 0 0 40px rgba(245,158,11,0.45), 0 4px 20px rgba(0,0,0,0.5);
  animation: cta-pulse 2.5s ease-in-out infinite;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}
.hero-cta:hover {
  transform: scale(1.05);
  box-shadow: 0 0 70px rgba(245,158,11,0.75), 0 4px 20px rgba(0,0,0,0.5);
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(245,158,11,0.45), 0 4px 20px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 80px rgba(245,158,11,0.9),  0 4px 20px rgba(0,0,0,0.5); }
}

.hero-scroll-hint {
  color: var(--text-muted); font-size: 0.8rem;
  animation: bounce-hint 2s ease-in-out infinite;
}
@keyframes bounce-hint {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%       { transform: translateY(6px); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   MAIN APP LAYOUT
═══════════════════════════════════════════════════════════ */
.app-layout {
  max-width: 1340px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem; padding: 1.5rem 1rem;
}
@media (min-width: 1060px) {
  .app-layout {
    grid-template-columns: minmax(0, 2.2fr) 400px;
    gap: 2rem; padding: 2rem 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOSAIC PANEL
═══════════════════════════════════════════════════════════ */
.panel-title { margin-bottom: 1rem; }
.panel-title h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold); font-size: 1.25rem;
  margin-bottom: 0.3rem;
}
.panel-title p { color: var(--text-dim); font-size: 0.82rem; }
.panel-title strong { color: var(--gold-bright); }

.mosaic-canvas-wrap {
  position: relative;
  display: block; width: 100%;
  background: #040100;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(245,158,11,0.08), inset 0 0 40px rgba(245,158,11,0.03);
}
#mosaicCanvas {
  display: block; width: 100%; height: auto;
  cursor: crosshair;
}

.tile-tooltip {
  position: absolute; z-index: 50;
  background: rgba(10,5,2,0.96);
  border: 1px solid var(--gold-dim);
  color: var(--text); font-size: 0.78rem;
  padding: 0.4rem 0.75rem; border-radius: 6px;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.tile-tooltip.hidden { display: none; }

/* Legend */
.mosaic-legend {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 0.75rem; font-size: 0.78rem; color: var(--text-dim);
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.lgnd {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 2px; flex-shrink: 0;
}
.lgnd-dark    { background: #1a0a03; border: 1px solid #3a1a08; }
.lgnd-partial { background: rgba(245,158,11,0.45); }
.lgnd-full    { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.lgnd-yours   { background: #fff; box-shadow: 0 0 8px #fff; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
.app-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Diya Card ───────────────────────────────────────────── */
.diya-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.diya-card-header {
  background: linear-gradient(135deg, #1c0a03, #2d1206);
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.diya-card-header h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold); font-size: 1.05rem; margin-bottom: 2px;
}
.subtitle { color: var(--text-dim); font-size: 0.75rem; }

/* ── Ritual Stage ────────────────────────────────────────── */
.ritual-stage {
  display: flex; flex-direction: column; align-items: center;
  padding: 1.5rem 1rem 1rem;
  background: radial-gradient(ellipse at 50% 60%, rgba(245,158,11,0.07) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
  min-height: 170px;
}

.diya-visual-wrap { position: relative; display: inline-block; }

.diya-glow-ring {
  position: absolute; inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0) 0%, rgba(245,158,11,0) 100%);
  transition: all 0.6s ease;
  pointer-events: none;
}
.diya-glow-ring.active {
  background: radial-gradient(circle, rgba(245,158,11,0.25) 0%, transparent 70%);
}

/* Diya Pot Visual */
.diya-pot {
  position: relative;
  width: 80px; height: 36px;
  display: flex; justify-content: center;
}
.diya-pot-body {
  width: 80px; height: 32px;
  background: linear-gradient(180deg, #c2410c 0%, #7c2d12 60%, #9a3412 100%);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,180,100,0.3);
}
.diya-oil-shine {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 10px;
  background: rgba(255,220,100,0.2);
  border-radius: 50%;
}
.diya-wick-base {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
}
.diya-wick {
  width: 2px; height: 16px;
  background: #666; border-radius: 2px;
  transition: background 0.5s;
}

/* Flame */
.diya-flame-wrap {
  position: relative;
  width: 24px; height: 36px;
  margin-bottom: 2px;
}
.diya-flame-wrap.hidden { display: none; }

.flame-outer {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 34px;
  background: radial-gradient(ellipse at 50% 90%, #f59e0b 0%, #ea580c 50%, transparent 90%);
  border-radius: 50% 50% 20% 20%;
  animation: flame-sway 1.8s ease-in-out infinite alternate;
  filter: blur(1px);
}
.flame-mid {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 26px;
  background: radial-gradient(ellipse at 50% 90%, #fbbf24 0%, #f59e0b 60%, transparent 90%);
  border-radius: 50% 50% 20% 20%;
  animation: flame-sway 1.3s ease-in-out infinite alternate-reverse;
}
.flame-inner {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 18px;
  background: radial-gradient(ellipse at 50% 90%, #fef3c7, #fbbf24 70%, transparent);
  border-radius: 50% 50% 20% 20%;
  animation: flame-sway 1s ease-in-out infinite alternate;
}
.flame-core {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
}
.flame-glow-halo {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(251,191,36,0.4) 0%, transparent 70%);
  animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes flame-sway {
  0%   { transform: translateX(-50%) rotate(-4deg) scaleX(0.9); }
  100% { transform: translateX(-50%) rotate(4deg)  scaleX(1.1); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.9); }
  50%       { opacity: 1;   transform: translateX(-50%) scale(1.2); }
}

.ritual-hint {
  color: var(--text-muted); font-size: 0.75rem;
  text-align: center; margin-top: 0.75rem; max-width: 220px;
  line-height: 1.4;
  transition: color 0.3s;
}
.ritual-hint.ready { color: var(--gold); }

/* ── Diya Form ────────────────────────────────────────────── */
.diya-form-wrap { padding: 1.1rem 1.4rem; }

.form-row { margin-bottom: 0.9rem; }
.form-row label {
  display: block; font-size: 0.75rem;
  color: var(--text-dim); margin-bottom: 0.4rem;
}
.form-row input {
  width: 100%;
  background: rgba(245,158,11,0.05);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  padding: 0.72rem 1rem;
  font-size: 0.95rem; font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

/* Light Diya Button */
.light-diya-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: linear-gradient(135deg, #92400e, #7c2d12);
  color: rgba(254,243,199,0.6);
  border: 1px solid var(--border);
  border-radius: 11px; padding: 1rem;
  font-size: 1rem; font-weight: 600;
  font-family: 'Cinzel', serif;
  cursor: not-allowed;
  transition: all 0.4s;
  position: relative; overflow: hidden;
}
.light-diya-btn.active {
  background: linear-gradient(135deg, var(--saffron), #b45309);
  color: #fff;
  border-color: var(--gold-dim);
  cursor: pointer;
  animation: btn-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 25px rgba(234,88,12,0.4);
}
.light-diya-btn.active:hover {
  transform: scale(1.02);
  box-shadow: 0 0 50px rgba(245,158,11,0.7);
}
.light-diya-btn.loading { pointer-events: none; }
.light-diya-btn.loading::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  animation: shimmer-slide 1s infinite;
}
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 25px rgba(234,88,12,0.4); }
  50%       { box-shadow: 0 0 50px rgba(245,158,11,0.8); }
}
@keyframes shimmer-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.btn-flame-icon { font-size: 1.3rem; }

.light-status {
  text-align: center; min-height: 1.2rem;
  margin-top: 0.65rem;
  font-size: 0.82rem; color: var(--gold);
  transition: all 0.3s;
}

/* ── Sidebar Cards ────────────────────────────────────────── */
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
}
.card-header {
  background: linear-gradient(135deg, #1c0a03, #2d1206);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold); font-size: 0.95rem; margin-bottom: 2px;
}

/* ── Leaderboard ───────────────────────────────────────────── */
.leaderboard-list { padding: 0.5rem 0.75rem; }
.lb-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.5rem; border-radius: 8px;
  transition: background 0.2s; cursor: default;
}
.lb-item:hover { background: rgba(245,158,11,0.07); }
.lb-rank {
  font-weight: 800; font-size: 0.8rem;
  color: var(--text-muted); min-width: 22px;
  text-align: center; flex-shrink: 0;
}
.lb-rank.g { color: #fbbf24; }
.lb-rank.s { color: #94a3b8; }
.lb-rank.b { color: #c2410c; }
.lb-city { font-size: 0.88rem; color: var(--text); flex: 1; }
.lb-bar-wrap { width: 60px; height: 4px; background: rgba(245,158,11,0.1); border-radius: 2px; flex-shrink: 0; }
.lb-bar { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.8s ease; }
.lb-count { font-size: 0.78rem; font-weight: 700; color: var(--gold); min-width: 46px; text-align: right; flex-shrink: 0; }

/* ── Search ─────────────────────────────────────────────────── */
.search-row {
  display: flex; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.search-row input {
  flex: 1; background: rgba(245,158,11,0.05);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 0.5rem 0.75rem;
  font-size: 0.85rem; font-family: inherit; outline: none;
  transition: border-color 0.2s;
}
.search-row input:focus { border-color: var(--gold-dim); }
.search-row button {
  background: rgba(245,158,11,0.12);
  border: 1px solid var(--gold-dim);
  color: var(--gold); padding: 0.5rem 1rem;
  border-radius: 8px; cursor: pointer;
  font-size: 0.82rem; font-weight: 600;
  transition: background 0.2s;
}
.search-row button:hover { background: rgba(245,158,11,0.22); }

.search-results { padding: 0.5rem 0.75rem; }
.search-result-item {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border); border-radius: 9px;
  margin-bottom: 0.5rem; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.search-result-item:hover {
  border-color: var(--gold-dim);
  background: rgba(245,158,11,0.07);
}
.result-name { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.result-detail { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }
.result-diya-num { color: var(--gold); font-weight: 700; }
.search-no-result { color: var(--text-muted); font-size: 0.82rem; padding: 0.5rem; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
  padding: 1.75rem;
  color: var(--text-muted); font-size: 0.82rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   DEV SIMULATOR
═══════════════════════════════════════════════════════════ */
.dev-sim-bar {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  z-index: 1000; display: flex; flex-direction: column;
  align-items: flex-end; gap: 0.5rem;
}
.dev-toggle {
  background: rgba(26,26,26,0.95);
  border: 1px solid #333; border-radius: 20px;
  color: #666; font-size: 0.72rem;
  padding: 4px 12px; cursor: pointer;
  transition: color 0.2s;
}
.dev-toggle:hover { color: #aaa; }
.dev-controls {
  background: rgba(10,5,2,0.97);
  border: 1px solid #333; border-radius: 10px;
  padding: 0.5rem 0.6rem;
  display: flex; gap: 0.4rem; align-items: center;
  flex-wrap: wrap;
}
.dev-controls.hidden { display: none; }
.dev-label { color: #666; font-size: 0.72rem; }
.dev-controls button {
  background: #1a1a1a; border: 1px solid #333;
  color: #aaa; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; font-size: 0.72rem;
  transition: background 0.2s;
}
.dev-controls button:hover { background: #2a2a2a; }
.danger-btn { color: #ef4444 !important; border-color: #7f1d1d !important; }

/* ═══════════════════════════════════════════════════════════
   MODALS — Base
═══════════════════════════════════════════════════════════ */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 600px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8), var(--shadow-gold);
}
.modal-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  background: rgba(255,255,255,0.08);
  border: none; color: var(--text);
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.15); }

.modal-header { padding: 1.5rem 1.5rem 0.75rem; }
.modal-header h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold); font-size: 1.15rem; margin-bottom: 4px;
}
.modal-header p { color: var(--text-dim); font-size: 0.82rem; }

/* ── Tile Inspector Modal ────────────────────────────────── */
.tile-modal { max-width: 660px; }
.tile-pixel-wrap {
  padding: 1rem 1.5rem;
  display: flex; justify-content: center;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
}
#tilePixelCanvas {
  max-width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: 6px;
}
.tile-names-section { padding: 1rem 1.25rem; }
.tile-search-input {
  width: 100%;
  background: rgba(245,158,11,0.05);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 0.5rem 0.75rem;
  font-size: 0.85rem; font-family: inherit; outline: none;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.tile-search-input:focus { border-color: var(--gold-dim); }
.tile-names-list { max-height: 220px; overflow-y: auto; }
.tile-name-entry {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(58,26,8,0.5);
  font-size: 0.82rem;
}
.tile-name-entry:last-child { border-bottom: none; }
.tn-pixel { color: var(--text-muted); font-size: 0.7rem; min-width: 52px; flex-shrink: 0; }
.tn-name  { color: var(--text); font-weight: 500; flex: 1; }
.tn-city  { color: var(--text-dim); font-size: 0.72rem; flex-shrink: 0; }
.tn-time  { color: var(--text-muted); font-size: 0.68rem; flex-shrink: 0; margin-left: auto; }
.tile-empty-msg { color: var(--text-muted); font-size: 0.82rem; padding: 0.5rem; }

/* ── Celebration Modal ───────────────────────────────────── */
.celebration-backdrop { z-index: 600; }
.celebration-modal {
  max-width: 440px;
  background: linear-gradient(160deg, #200d04 0%, #2d1206 50%, #1c0a03 100%);
  border-color: var(--gold-dim);
  text-align: center;
  overflow: visible;
}
.confetti-layer {
  position: absolute; inset: 0;
  overflow: hidden; border-radius: 18px;
  pointer-events: none;
}
.confetti-bit {
  position: absolute;
  animation: cf-fall 3s ease-in forwards;
}
@keyframes cf-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(380px) rotate(540deg); opacity: 0; }
}

.celeb-body { padding: 2rem 1.75rem; position: relative; }
.celeb-diya-big {
  font-size: 4.5rem; display: block;
  margin-bottom: 0.75rem;
  animation: celeb-pop 0.5s cubic-bezier(0.34,1.56,0.64,1);
  filter: drop-shadow(0 0 20px var(--gold));
}
@keyframes celeb-pop {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.celeb-title {
  font-family: 'Cinzel', serif; font-size: 1.5rem;
  color: var(--gold); margin-bottom: 0.75rem;
  text-shadow: 0 0 25px var(--gold);
}
.celeb-name {
  font-size: 1.1rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.5rem;
}
.celeb-diya-num {
  font-family: 'Cinzel', serif; font-size: 2.2rem; font-weight: 700;
  color: var(--gold); line-height: 1; margin-bottom: 0.5rem;
  text-shadow: 0 0 40px var(--gold);
}
.celeb-coords { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.celeb-forever { color: var(--saffron-lt); font-size: 0.88rem; margin-bottom: 1.5rem; }

.celeb-actions { display: flex; flex-direction: column; gap: 0.65rem; }
.cert-btn, .wa-btn, .mosaic-btn {
  width: 100%; padding: 0.85rem;
  border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.cert-btn {
  background: rgba(245,158,11,0.12);
  border: 1px solid var(--gold-dim); color: var(--gold);
}
.cert-btn:hover { background: rgba(245,158,11,0.22); }
.wa-btn { background: #25D366; color: #fff; }
.wa-btn:hover { background: #1fa855; transform: scale(1.02); }
.mosaic-btn {
  background: transparent;
  border: 1px solid var(--border); color: var(--text-dim);
}
.mosaic-btn:hover { background: rgba(255,255,255,0.05); }

/* ── Certificate Modal ───────────────────────────────────── */
.cert-modal { max-width: 580px; padding: 1.5rem; text-align: center; }
.cert-modal-title {
  font-family: 'Cinzel', serif; color: var(--gold);
  font-size: 1.1rem; margin-bottom: 1rem;
}
.cert-canvas-wrap { display: flex; justify-content: center; }
#certCanvas { max-width: 270px; height: auto; border-radius: 10px; display: block; }
.cert-modal-actions {
  display: flex; gap: 1rem; justify-content: center;
  margin-top: 1rem; flex-wrap: wrap;
}
.cert-modal-actions button {
  padding: 0.72rem 1.5rem; border-radius: 10px;
  cursor: pointer; font-size: 0.88rem; font-weight: 600;
  border: none; transition: all 0.2s;
}
.cert-modal-actions button:first-child {
  background: rgba(245,158,11,0.12);
  border: 1px solid var(--gold-dim); color: var(--gold);
}
.cert-modal-actions button:first-child:hover { background: rgba(245,158,11,0.22); }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Responsive Hero Stats ───────────────────────────────── */
@media (max-width: 540px) {
  .hero-stats-row { gap: 0.75rem; padding: 0.75rem 1rem; }
  .h-stat-val { font-size: 1.3rem; }
  .h-stat-sep { font-size: 1rem; }
  .hero-cta { font-size: 0.85rem; padding: 0.85rem 1.5rem; }
}
