@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Amiri:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ═══ VARIABLES ═══ */
:root {
  --bg: #060c18;
  --bg2: #0d1628;
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.07);
  --border: rgba(201,168,76,0.18);
  --border-light: rgba(255,255,255,0.06);
  --gold: #c9a84c;
  --gold-light: #e8cb7a;
  --gold-dim: rgba(201,168,76,0.6);
  --gold-grad: linear-gradient(135deg, #a07830 0%, #e8cb7a 40%, #c9a84c 60%, #f0e0a0 100%);
  --green: #15693a;
  --green-bright: #1a8a4c;
  --green-glow: rgba(21,105,58,0.4);
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.65);
  --text-muted: rgba(255,255,255,0.35);
  --shadow-gold: 0 0 40px rgba(201,168,76,0.2);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.5);
  --radius: 16px;
  --radius-sm: 10px;
}

/* ═══ RESET ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Cairo', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ═══ GEOMETRIC BACKGROUND ═══ */
.geometric-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(30deg,  rgba(201,168,76,0.025) 12%, transparent 12.5%, transparent 87%, rgba(201,168,76,0.025) 87.5%),
    linear-gradient(150deg, rgba(201,168,76,0.025) 12%, transparent 12.5%, transparent 87%, rgba(201,168,76,0.025) 87.5%),
    linear-gradient(30deg,  rgba(201,168,76,0.025) 12%, transparent 12.5%, transparent 87%, rgba(201,168,76,0.025) 87.5%),
    linear-gradient(150deg, rgba(201,168,76,0.025) 12%, transparent 12.5%, transparent 87%, rgba(201,168,76,0.025) 87.5%),
    linear-gradient(60deg,  rgba(201,168,76,0.04) 25%, transparent 25.5%, transparent 75%, rgba(201,168,76,0.04) 75%),
    linear-gradient(60deg,  rgba(201,168,76,0.04) 25%, transparent 25.5%, transparent 75%, rgba(201,168,76,0.04) 75%);
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

.radial-glow {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
}
.glow-1 {
  width: 600px; height: 600px; top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(21,105,58,0.12) 0%, transparent 70%);
}
.glow-2 {
  width: 500px; height: 500px; bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
}

/* ═══ LAYOUT WRAPPER ═══ */
.signage-wrapper {
  position: relative; z-index: 1;
  display: grid;
  grid-template-rows: 78px 1fr 58px;
  height: 100vh;
  width: 100vw;
}

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 36px;
  background: rgba(0,0,0,0.45);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.masjid-logo {
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(201,168,76,0.4));
}

.masjid-name {
  font-family: 'Cairo', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.masjid-tagline {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.header-center {
  text-align: center;
}

.hijri-date {
  font-family: 'Cairo', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

.hijri-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.header-right {
  text-align: right;
}

.clock {
  font-family: 'Poppins', monospace;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.3));
}

.gregorian-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════ */
.main-content {
  display: grid;
  grid-template-columns: 400px 1fr;
  overflow: hidden;
}

/* ═══════════════════════════════════════
   PRAYER PANEL (LEFT)
═══════════════════════════════════════ */
.prayer-panel {
  background: rgba(0,0,0,0.3);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.panel-title-icon { font-size: 1.1rem; }

.panel-title {
  font-family: 'Cairo', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Prayer Rows */
.prayer-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--card);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.prayer-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 3px 0 0 3px;
  transition: background 0.4s ease;
}

.prayer-row.current {
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.35);
  box-shadow: 0 0 20px rgba(201,168,76,0.1), inset 0 0 20px rgba(201,168,76,0.05);
}

.prayer-row.current::before { background: var(--gold); }

.prayer-row.past {
  opacity: 0.45;
}

.prayer-row.upcoming { border-color: var(--border-light); }

.prayer-row.sunrise-row { opacity: 0.5; }

.prayer-indicator {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 6px;
  flex-shrink: 0;
  transition: all 0.4s;
}

.prayer-row.current .prayer-indicator {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2s infinite;
}

.prayer-name-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prayer-icon { font-size: 0.9rem; }

.prayer-name {
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.prayer-row.current .prayer-name {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.friday-badge {
  font-size: 0.55rem;
  font-weight: 700;
  background: var(--green);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prayer-times-col { text-align: right; }

.adhan-time {
  font-family: 'Poppins', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}

.prayer-row.current .adhan-time { color: var(--gold-light); }

.iqamah-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Jumu'ah row special */
.jumuah-row {
  background: rgba(21,105,58,0.08);
  border-color: rgba(21,105,58,0.2) !important;
}

/* Jumu'ah info box */
.jumuah-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(21,105,58,0.12);
  border: 1px solid rgba(21,105,58,0.3);
  border-radius: var(--radius-sm);
}

.jumuah-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.jumuah-detail {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════
   RIGHT PANEL
═══════════════════════════════════════ */
.right-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 20px 28px;
  gap: 20px;
  overflow: hidden;
}

/* ─── NEXT PRAYER CARD ─── */
.next-prayer-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.next-prayer-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.next-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.next-prayer-name {
  font-family: 'Cairo', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.5));
  margin-bottom: 4px;
}

.next-prayer-time-display {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-weight: 500;
}

.countdown-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Poppins', monospace;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.count-seg {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 14px;
  min-width: 76px;
  text-align: center;
  letter-spacing: 0.04em;
}

.count-sep {
  color: var(--gold);
  margin: 0 -2px;
  font-size: 2rem;
  padding-bottom: 6px;
}

.prayer-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  margin-top: 18px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 50%;
  background: var(--gold-grad);
  border-radius: 3px;
  transition: width 60s linear;
}

/* ─── CONTENT ROTATOR ─── */
.content-rotator {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: opacity 0.5s ease;
  box-shadow: var(--shadow-card);
}

.content-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Content type badge */
.content-type-badge {
  padding: 10px 20px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-verse { color: #86efac; background: rgba(134,239,172,0.08); }
.badge-announcement { color: #93c5fd; background: rgba(147,197,253,0.08); }
.badge-event { color: #fcd34d; background: rgba(252,211,77,0.08); }

.content-body {
  flex: 1;
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Verse display */
.arabic-text {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  font-weight: 700;
  direction: rtl;
  text-align: right;
  line-height: 2;
  color: var(--gold-light);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 15px rgba(201,168,76,0.2));
}

.translation-text {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 10px;
  border-left: 3px solid var(--gold-dim);
  padding-left: 14px;
}

.verse-ref {
  font-size: 0.72rem;
  color: var(--gold-dim);
  text-align: right;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* Announcement display */
.announcement-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 12px;
  line-height: 1.3;
}

.announcement-body {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.75;
}

/* Event display */
.event-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fcd34d;
  margin-bottom: 10px;
  line-height: 1.3;
}

.event-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.event-meta span { display: flex; align-items: center; gap: 4px; }

.event-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   TICKER BAR
═══════════════════════════════════════ */
.ticker-bar {
  background: linear-gradient(135deg, #0d4d28 0%, #15693a 50%, #0d4d28 100%);
  border-top: 1px solid rgba(21,105,58,0.6);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  position: relative;
}

.ticker-icon {
  flex-shrink: 0;
  padding: 0 18px;
  font-size: 1.1rem;
  background: rgba(0,0,0,0.25);
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  z-index: 1;
}

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-text {
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.03em;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
/* ─── LIVE SOURCE BADGE ─── */
.source-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
}
.live-badge {
  background: rgba(74,222,128,0.15);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.3);
}
.ml-auto { margin-left: auto; }

@keyframes ticker-scroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--gold); opacity: 1; }
  50%       { box-shadow: 0 0 20px var(--gold), 0 0 40px rgba(201,168,76,0.3); opacity: 0.8; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

.fade-in  { animation: fadeIn  0.5s ease forwards; }
.fade-out { animation: fadeOut 0.4s ease forwards; }

/* ═══════════════════════════════════════
   RESPONSIVE SCALING
═══════════════════════════════════════ */
@media (max-width: 1280px) {
  .main-content { grid-template-columns: 340px 1fr; }
  .prayer-name { font-size: 0.9rem; }
  .adhan-time  { font-size: 0.95rem; }
  .next-prayer-name { font-size: 1.8rem; }
  .countdown { font-size: 2.2rem; }
  .count-seg { min-width: 62px; }
}

@media (max-width: 1024px) {
  .main-content { grid-template-columns: 300px 1fr; }
  .right-panel  { padding: 16px 20px; }
  .prayer-panel { padding: 16px 18px; }
}
