/* ============================================================
   ALAHDOREI COZY HUB — style.css
   Fonts: Cherry Bomb One (headers) | Varela Round (body)
   ============================================================ */

/* ===== CSS Variables ===== */
:root {
  --pink:     #f4a7c3;
  --lavender: #c9b8e8;
  --purple:   #9147ff;
  --bg:       #0d0515;
  --text:     #f0e6f6;
  --muted:    #c9b8e8;
  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(244, 167, 195, 0.22);
  --radius:   20px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Varela Round', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
}

/* ===== Custom Cursor ===== */
a, button, .polaroid { cursor: none; }   /* prevent browser pointer overriding on links/cards */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  font-size: 18px;
  transform: translate(-50%, -50%);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  will-change: left, top;
}

.cursor--active {
  animation: cursorTwinkle 0.9s ease-in-out infinite;
}

@keyframes cursorTwinkle {
  0%, 100% { transform: translate(-50%, -50%) scale(1)    rotate(-8deg); }
  50%       { transform: translate(-50%, -50%) scale(1.35) rotate(8deg);  }
}

/* ===== Canvas Background ===== */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Floating Stickers ===== */
.stickers-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.sticker {
  position: absolute;
  font-size: clamp(22px, 3vw, 36px);
  opacity: 0.18;
  animation: floatDrift 9s ease-in-out infinite;
  user-select: none;
  will-change: transform;
}

.sticker:nth-child(2)  { animation-delay: -2.1s; animation-duration: 7.5s; }
.sticker:nth-child(3)  { animation-delay: -4.3s; animation-duration: 11s;  }
.sticker:nth-child(4)  { animation-delay: -1.0s; animation-duration: 8.2s; }
.sticker:nth-child(5)  { animation-delay: -5.5s; animation-duration: 10s;  }
.sticker:nth-child(6)  { animation-delay: -3.2s; animation-duration: 9.5s; }
.sticker:nth-child(7)  { animation-delay: -6.8s; animation-duration: 7.0s; }
.sticker:nth-child(8)  { animation-delay: -0.5s; animation-duration: 12s;  }
.sticker:nth-child(9)  { animation-delay: -3.7s; animation-duration: 8.8s; }
.sticker:nth-child(10) { animation-delay: -1.4s; animation-duration: 10.5s;}
.sticker:nth-child(11) { animation-delay: -7.2s; animation-duration: 9.0s; }
.sticker:nth-child(12) { animation-delay: -2.9s; animation-duration: 7.8s; }
.sticker:nth-child(13) { animation-delay: -5.1s; animation-duration: 11.5s;}
.sticker:nth-child(14) { animation-delay: -0.8s; animation-duration: 8.5s; }
.sticker:nth-child(15) { animation-delay: -4.6s; animation-duration: 9.8s; }
.sticker:nth-child(16) { animation-delay: -6.3s; animation-duration: 7.2s; }
.sticker:nth-child(17) { animation-delay: -1.9s; animation-duration: 12.5s;}
.sticker:nth-child(18) { animation-delay: -3.4s; animation-duration: 8.0s; }
.sticker:nth-child(19) { animation-delay: -8.0s; animation-duration: 10.2s;}
.sticker:nth-child(20) { animation-delay: -2.5s; animation-duration: 9.3s; }
.sticker:nth-child(21) { animation-delay: -4.1s; animation-duration: 8.6s; }
.sticker:nth-child(22) { animation-delay: -6.7s; animation-duration: 10.8s;}

@keyframes floatDrift {
  0%, 100% { transform: translateY(0)     rotate(0deg);  }
  33%       { transform: translateY(-18px) rotate(5deg);  }
  66%       { transform: translateY(10px)  rotate(-3deg); }
}

/* ===== Section Base ===== */
.section {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

/* Hero keeps full-screen height */
#hero { min-height: 100vh; }

/* Scroll-reveal: sections (except hero) start hidden */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: 'Cherry Bomb One', cursive;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--pink);
  text-shadow: 0 0 24px rgba(244, 167, 195, 0.5);
  margin-bottom: 28px;
  text-align: center;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
}

/* ============================================================
   HERO
   ============================================================ */
#hero { text-align: center; }

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

/* Profile picture */
.profile-wrapper {
  position: relative;
  display: inline-block;
}

.profile-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2.5px solid var(--pink);
  animation: pulseRing 3s ease-in-out infinite;
}

@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 10px 2px rgba(244,167,195,0.35); }
  50%       { box-shadow: 0 0 28px 8px rgba(244,167,195,0.7);  }
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Live badge */
.live-badge {
  position: absolute;
  bottom: 2px;
  right: -4px;
  background: #9147ff;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  display: none; /* shown via JS when CONFIG.isLive = true */
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #ff3d3d;
  border-radius: 50%;
  animation: blink 1s step-start infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* Hero text */
.hero-title {
  font-family: 'Cherry Bomb One', cursive;
  font-size: clamp(3.5rem, 12vw, 7rem);
  color: var(--pink);
  text-shadow:
    0 0 40px rgba(244,167,195,0.55),
    0 4px 0 rgba(160, 80, 120, 0.45);
  line-height: 1;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem);
  color: var(--lavender);
  font-style: italic;
  opacity: 0.9;
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 4px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: 'Varela Round', sans-serif;
  font-size: 0.95rem;
  font-weight: bold;
  text-decoration: none;
  border: 1.5px solid rgba(255,255,255,0.18);
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease;
}

.btn:hover { transform: scale(1.1) translateY(-4px); }

.btn-pink {
  background: rgba(244, 167, 195, 0.22);
  color: #ffd6e7;
  box-shadow: 0 4px 18px rgba(244,167,195,0.18);
}
.btn-pink:hover { box-shadow: 0 8px 32px rgba(244,167,195,0.5); }

.btn-lavender {
  background: rgba(201, 184, 232, 0.22);
  color: #e0d6f6;
  box-shadow: 0 4px 18px rgba(201,184,232,0.18);
}
.btn-lavender:hover { box-shadow: 0 8px 32px rgba(201,184,232,0.5); }

.btn-purple {
  background: rgba(145, 71, 255, 0.22);
  color: #c9a8ff;
  box-shadow: 0 4px 18px rgba(145,71,255,0.18);
}
.btn-purple:hover { box-shadow: 0 8px 32px rgba(145,71,255,0.5); }

.btn-kofi {
  background: rgba(255, 213, 79, 0.18);
  color: #ffe9a0;
  box-shadow: 0 4px 18px rgba(255,213,79,0.15);
}
.btn-kofi:hover { box-shadow: 0 8px 32px rgba(255,213,79,0.45); }

/* ============================================================
   STATUS BOARD
   ============================================================ */
.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  max-width: 900px;
}

/* Stats card */
.stats-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title {
  font-family: 'Cherry Bomb One', cursive;
  font-size: 1.5rem;
  color: var(--pink);
}

.stats-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stats-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(244,167,195,0.12);
  font-size: 0.88rem;
}

.stat-label {
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  min-width: 90px;
  padding-top: 2px;
  opacity: 0.85;
}

.stat-value { color: var(--text); }


/* Bio / speech bubble */
.bio-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mascot {
  font-size: 3rem;
  animation: bobble 2.2s ease-in-out infinite;
  z-index: 1;
  position: relative;
  margin-bottom: -14px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-10px) rotate(3deg); }
}

.speech-bubble {
  display: flex;
  flex-direction: column;
  gap: 14px;
  line-height: 1.75;
  font-size: 0.93rem;
  color: var(--text);
  position: relative;
}


/* ============================================================
   POLAROID GALLERY
   ============================================================ */
#gallery { padding: 48px 24px; }

.corkboard {
  width: 100%;
  max-width: 980px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(140,90,55,0.12) 0%, transparent 65%),
    rgba(90, 55, 25, 0.1);
  border: 1.5px solid rgba(160, 110, 70, 0.18);
  border-radius: 20px;
  padding: 44px 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

.polaroid {
  background: #fff;
  padding: 10px 10px 38px;
  border-radius: 2px;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.45),
    0 1px 4px rgba(0,0,0,0.3);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

/* Push-pin */
.polaroid::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 38% 33%, #ffaac8 0%, #cc3366 55%, #aa1144 100%);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  z-index: 2;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.07) translateY(-10px);
  box-shadow:
    0 22px 55px rgba(0,0,0,0.55),
    0 4px 12px rgba(244,167,195,0.2);
  z-index: 10;
}

.polaroid img {
  width: 100%;
  display: block;
  border-radius: 1px;
}

.polaroid p {
  text-align: center;
  color: #666;
  font-size: 0.78rem;
  font-family: 'Varela Round', sans-serif;
  margin-top: 10px;
  line-height: 1.3;
}

/* ============================================================
   QUEST LOG
   ============================================================ */
#quests { padding: 48px 24px 72px; }

.quest-log {
  width: 100%;
  max-width: 680px;
  padding: 0;
  overflow: hidden;
}

.quest-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(244,167,195,0.12);
  transition: background 0.2s ease, transform 0.25s ease;
}

.quest-item:last-child { border-bottom: none; }

.quest-item:hover {
  background: rgba(244,167,195,0.07);
  transform: translateX(8px);
}

.quest-tag {
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
  opacity: 0.8;
}


.quest-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quest-icon { font-size: 1.9rem; }

.quest-text h3 {
  font-family: 'Cherry Bomb One', cursive;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 2px;
}

.quest-text p {
  font-size: 0.83rem;
  color: var(--muted);
  opacity: 0.85;
}

.quest-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--pink);
  transition: transform 0.2s ease;
}

.quest-item:hover .quest-arrow { transform: translateX(6px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  font-size: 0.82rem;
  color: rgba(240, 230, 246, 0.35);
  border-top: 1px solid rgba(244,167,195,0.1);
}

/* ============================================================
   DESKTOP — ONE-SCREEN LAYOUT  (≥ 769px)
   ============================================================ */
@media (min-width: 769px) {

  /* Body fills exactly the viewport */
  body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  /* ----- Hero: compact horizontal strip ----- */
  #hero {
    min-height: unset;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    padding: 10px 36px;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
    text-align: left;
  }

  .hero-content {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 18px;
  }

  .profile-img  { width: 58px; height: 58px; }
  .profile-ring { inset: -4px; }
  .live-badge   { font-size: 8px; padding: 2px 6px; bottom: 0; right: -6px; }

  .hero-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .hero-title   { font-size: 2rem; line-height: 1.1; }
  .hero-tagline { font-size: 0.78rem; margin: 0; }

  .hero-buttons { display: none; }

  .btn { padding: 7px 16px; font-size: 0.8rem; }

  /* ----- Dashboard: two-column grid ----- */
  .dashboard {
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 3fr 2fr;   /* status gets more height than quest log */
  }

  #status {
    grid-column: 1; grid-row: 1;
    border-right: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
  }

  #gallery {
    grid-column: 2; grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #quests {
    grid-column: 1; grid-row: 2;
    border-right: 1px solid var(--glass-border);
  }

  /* ----- All panels ----- */
  .panel {
    padding: 12px 16px;
    overflow: hidden;          /* no internal scroll — everything must fit */
    justify-content: flex-start;
  }

  .panel .section-title { font-size: 0.9rem; margin-bottom: 8px; }
  .panel .glass-card    { padding: 12px 14px; }

  /* ----- Status panel ----- */
  .status-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 10px;
    width: 100%;
  }

  .card-title { font-size: 1.1rem; margin-bottom: 8px; }

  .stats-list li {
    padding: 4px 0;
    font-size: 0.8rem;
  }

  .stat-label { font-size: 0.68rem; min-width: 72px; }

  .speech-bubble { font-size: 0.78rem; gap: 5px; line-height: 1.5; }

  /* ----- Gallery panel — fills the entire right column ----- */
  #gallery {
    padding: 0;
    align-items: unset;
    justify-content: unset;
  }

  #gallery .section-title { display: none; }

  .corkboard {
    max-width: unset;
    width: 100%;
    height: 100%;
    border-radius: 0;
    grid-template-columns: repeat(3, minmax(0, 360px));
    grid-template-rows: auto;
    padding: 18px;
    gap: 14px;
    align-content: center;
    justify-content: center;
  }

  /* Polaroids: square, equal sized, ~33% smaller */
  .polaroid {
    aspect-ratio: 1;
    height: auto;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    padding: 6px 6px 4px;
  }

  .polaroid img {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 0;
    object-fit: cover;
  }

  .polaroid p { flex-shrink: 0; font-size: 0.7rem; margin-top: 6px; }

  /* ----- Quest log panel ----- */
  #quests { padding: 12px 16px; }

  .quest-log  { max-width: 100%; }

  .quest-item { padding: 6px 14px; }

  .quest-tag { font-size: 0.58rem; margin-bottom: 4px; }

  .quest-icon { font-size: 1.3rem; }

  .quest-text h3 { font-size: 0.9rem; }
  .quest-text p  { font-size: 0.72rem; }

  .quest-arrow { font-size: 1.1rem; }

  /* ----- Footer ----- */
  .footer { flex-shrink: 0; padding: 8px 24px; font-size: 0.72rem; }
}

/* ============================================================
   MOBILE  (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  /* Restore default cursor on mobile */
  body    { cursor: auto; }
  .cursor { display: none; }

  /* Undo desktop grid on dashboard */
  .dashboard { display: block; }

  /* Undo panel overrides — restore section look */
  .panel {
    border-right: none !important;
    border-bottom: none !important;
  }

  /* Re-centre the hero — kill the full-screen height */
  #hero {
    min-height: unset;
    text-align: center;
    padding: 36px 24px 28px;
  }
  .hero-identity { align-items: center; }

  /* Tighten all sections */
  .section { padding: 28px 20px; }

  /* 2×2 button grid on mobile */
  .hero-buttons {
    margin-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 340px;
  }

  .status-grid { grid-template-columns: 1fr; }

  .corkboard {
    max-width: 100%;
    grid-template-columns: 1fr 1fr;
    padding: 20px 12px;
    gap: 16px;
  }

  .polaroid { margin-top: 0 !important; padding: 10px 10px 38px; }

  .polaroid img { height: auto; object-fit: unset; }
}

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

  .polaroid {
    max-width: 220px;
    margin-inline: auto;
    transform: rotate(0deg) !important;
  }

  .hero-buttons { flex-direction: column; align-items: center; }
}
