:root {
  --bg: #f5faff;
  --accent: #4f8cfb;
  --accent-light: #9bc4ff;
  --text: #0b2447;
  --muted: #6780a1;
  --radius: 18px;
  --shadow: 0 10px 24px rgba(0,0,0,.08);
  --card: #ffffff;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.header {
  background: linear-gradient(135deg, #4f8cfb, #6eb5ff);
  color: #fff;
  text-align: center;
  padding: 16px;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  box-shadow: var(--shadow);
}

.logo { font-size: 36px; margin-bottom: 6px; }
.title { font-weight: 700; font-size: 24px; margin: 0; }
.accent { color: #fffaa5; }
.timer { margin-top: 6px; font-size: 14px; }

.main { padding: 20px; }

.player-wrap {
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  position: relative;
  box-shadow: var(--shadow);
}

#player, .player-wrap iframe {
  width: 100%;
  height: 320px;
  border: none;
  display: block;
}

.blackout {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.95);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 22px;
  z-index: 9999;
}
.blackout[hidden] { display: none !important; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.btn {
  padding: 12px 18px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.3s;
}
.btn:hover { transform: translateY(-2px); background: #3d78f3; }
.secondary { background: #e7f0ff; color: var(--text); }
.ghost { background: #fff; color: var(--accent); border: 2px dashed var(--accent-light); }
.primary { background: #3b82f6; }

.gallery h2 {
  text-align: center;
  color: var(--text);
  margin-top: 28px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s;
}
.card:hover { transform: scale(1.04); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.card img { width: 100%; height: 110px; object-fit: cover; }
.card.active { border: 3px solid var(--accent); }
.card-title { text-align: center; padding: 6px; font-weight: 600; color: var(--text); }

.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: grid; place-items: center;
  z-index: 10000;
}
.modal[hidden] { display: none !important; }
.modal-card {
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  max-width: 340px;
  box-shadow: var(--shadow);
  text-align: center;
}
.modal-card h3 { margin-top: 0; color: var(--accent); }

.pin-buttons { display: flex; gap: 8px; justify-content: center; }
.note { font-size: 12px; color: var(--muted); margin-top: 8px; }

.footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--muted);
}
