/* ==========================================================================
   main.css — Custom overrides, glassmorphic cards & Bootstrap 5 extensions
   for charul.space
   ========================================================================== */

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  position: relative;
}

canvas#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
}

/* ---------- Glass card ---------- */
.glass-card {
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 1.25rem;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 8px 32px rgba(31, 20, 30, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.6s ease, border-color 0.6s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(31, 20, 30, 0.18);
}

.glass-panel-sm {
  padding: 1.25rem;
}

.glass-panel {
  padding: 2rem;
}

/* ---------- Hero ---------- */
.hero-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: var(--theme-primary-strong);
  text-shadow: 0 2px 18px var(--theme-glow);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--theme-text-soft);
  max-width: 42rem;
}

.brand-title {
  font-weight: 700;
  color: var(--theme-primary-strong);
}

/* ---------- Section heading ---------- */
.section-heading {
  font-weight: 600;
  color: var(--theme-primary-strong);
  margin-bottom: 1rem;
}

.section-heading .bi, .section-heading svg {
  margin-right: 0.5rem;
}

/* ---------- Themed buttons ---------- */
.btn-theme {
  background: var(--theme-primary);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.55rem 1.5rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-theme:hover, .btn-theme:focus {
  background: var(--theme-primary-strong);
  color: #fff;
  transform: translateY(-2px);
}

.btn-theme-outline {
  background: transparent;
  border: 2px solid var(--theme-primary);
  color: var(--theme-primary-strong);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  transition: all 0.3s ease;
}

.btn-theme-outline:hover {
  background: var(--theme-primary);
  color: #fff;
}

/* ---------- IST Clocks ---------- */
.clock-card {
  text-align: center;
}

.clock-time {
  font-size: 2rem;
  font-weight: 700;
  color: var(--theme-primary-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

.clock-city {
  font-weight: 600;
  color: var(--theme-text);
}

.clock-date {
  font-size: 0.85rem;
  color: var(--theme-text-soft);
}

/* ---------- Countdown ---------- */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 32rem;
  margin: 0 auto;
}

.countdown-unit {
  padding: 0.9rem 0.25rem;
  text-align: center;
}

.countdown-value {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--theme-primary-strong);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--theme-text-soft);
}

/* ---------- Mood simulator ---------- */
.mood-btn {
  border: none;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: 1rem;
  padding: 0.9rem 0.5rem;
  width: 100%;
  transition: transform 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

.mood-btn:hover, .mood-btn.active {
  transform: translateY(-3px) scale(1.03);
  background: var(--theme-primary);
  color: #fff;
}

.mood-btn .mood-emoji {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.25rem;
}

.mood-response-box {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Scratch card ---------- */
.scratch-card-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.scratch-card-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--theme-primary-strong);
  background: linear-gradient(135deg, #fff, var(--theme-accent));
}

.scratch-card-reveal img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.75rem;
}

.scratch-card-canvas {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: none;
}

.scratch-hint {
  font-size: 0.8rem;
  color: var(--theme-text-soft);
  text-align: center;
  margin-top: 0.5rem;
}

/* ---------- Vouchers ---------- */
.voucher-card {
  border-left: 6px dashed var(--theme-primary);
  position: relative;
}

.voucher-card.redeemed {
  opacity: 0.55;
}

.voucher-code {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  background: var(--theme-accent);
  color: var(--theme-text);
  padding: 0.15rem 0.6rem;
  border-radius: 0.4rem;
  display: inline-block;
}

/* ---------- Secret notes ---------- */
.note-card.locked {
  opacity: 0.6;
  filter: grayscale(0.4);
}

.note-lock-icon {
  font-size: 1.5rem;
}

/* ---------- Music player (floating widget) ---------- */
.music-player-widget {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  left: 1rem;
  max-width: 380px;
  margin-left: auto;
  z-index: 1000;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.music-player-widget .disc {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--theme-primary) 30%, var(--theme-text) 31%, var(--theme-text) 34%, var(--theme-primary) 35%);
  flex-shrink: 0;
  animation: spin-disc 4s linear infinite;
  animation-play-state: paused;
}

.music-player-widget.playing .disc {
  animation-play-state: running;
}

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

.music-meta {
  min-width: 0;
  flex: 1;
}

.music-title {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  font-size: 0.75rem;
  color: var(--theme-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--theme-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 6rem;
  color: var(--theme-text-soft);
  font-size: 0.85rem;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 575.98px) {
  .countdown-grid {
    gap: 0.4rem;
  }
  .glass-panel {
    padding: 1.25rem;
  }
  .music-player-widget {
    max-width: none;
  }
}

/* ---------- Utility: loading skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 25%, rgba(255,255,255,0.6) 37%, rgba(255,255,255,0.3) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: 0.5rem;
  color: transparent !important;
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.fade-in {
  animation: fade-in-anim 0.6s ease both;
}

@keyframes fade-in-anim {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
