/* ── Thuộc tính tùy chỉnh CSS (được thiết lập động bởi main.js) ──────── */
:root {
  --primary: #f472b6;
  --accent: #60a5fa;
  --bg: #0f172a;
  --text: #f1f5f9;
}

/* ── Đặt lại & Căn cứ ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.5s ease, color 0.5s ease;
}

/* ── Âm nhạc ──────────────────────────────────────────────────────── */
.song {
  display: none;
}

/* ── Chuyển đổi chủ đề ──────────────────────────────────────────────── */
#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  background: rgba(128, 128, 128, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

#theme-toggle:hover {
  transform: scale(1.1);
  background: rgba(128, 128, 128, 0.2);
}

/* ── Container ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  text-align: center;
  visibility: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Section Base ──────────────────────────────────────────────── */
.section {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  pointer-events: none;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
    CÁC PHẦN RIÊNG BIỆT
   ═══════════════════════════════════════════════════════════════ */

/* ── Greeting ──────────────────────────────────────────────────── */
.greeting-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 90%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.greeting-name {
  display: block;
  color: var(--primary);
}

.greeting-subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 300;
  margin-top: 0.8rem;
  opacity: 0.65;
  max-width: 80%;
}

/* ── Announcement ──────────────────────────────────────────────── */
.section-announcement p {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 600;
  padding: 0 1rem;
}

/* ── Chatbox ───────────────────────────────────────────────────── */
.text-box {
  border: 1.5px solid rgba(128, 128, 128, 0.12);
  border-radius: 18px;
  padding: 1.8rem;
  max-width: 540px;
  width: 88%;
  position: relative;
  text-align: left;
  background: rgba(128, 128, 128, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hbd-chatbox {
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  line-height: 1.8;
  font-weight: 300;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hbd-chatbox span {
  visibility: hidden;
}

.fake-btn {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.5rem 1.4rem;
  position: absolute;
  right: 14px;
  bottom: -42px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── Ideas ──────────────────────────────────────────────────────── */
.section-ideas .idea-line {
  font-size: clamp(1.2rem, 4vw, 2rem);
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 1.5rem;
  font-weight: 300;
  opacity: 0;
}

.idea-line strong {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.idea-special {
  font-size: clamp(2rem, 6vw, 3.5rem) !important;
  font-weight: 600 !important;
}

.idea-special span {
  display: inline-block;
}

.idea-big-letters {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
}

.idea-big-letters span {
  display: inline-block;
  font-size: clamp(7rem, 22vw, 14rem);
  font-weight: 800;
  color: var(--primary);
}

/* ── Countdown ─────────────────────────────────────────────────── */
.countdown-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.countdown-num {
  position: absolute;
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 800;
  color: var(--accent);
  opacity: 0;
}

.countdown-go {
  position: absolute;
  font-size: clamp(4rem, 15vw, 8rem);
  opacity: 0;
}

/* ── Quote ──────────────────────────────────────────────────────── */
.quote-card {
  max-width: 520px;
  width: 88%;
  padding: 2.5rem;
  border-radius: 20px;
  background: rgba(128, 128, 128, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(128, 128, 128, 0.1);
}

.quote-mark {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
  opacity: 0.6;
  display: block;
  margin-bottom: -0.3rem;
}

.quote-text {
  font-size: clamp(1rem, 3vw, 1.4rem);
  font-weight: 300;
  line-height: 1.7;
  font-style: italic;
  overflow-wrap: break-word;
}

.quote-author {
  font-size: clamp(0.85rem, 2vw, 1rem);
  margin-top: 1rem;
  opacity: 0.5;
}

/* ── Stars ──────────────────────────────────────────────────────── */
.section-stars {
  position: fixed !important;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: twinkle 2.5s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0%   { opacity: 0.1; transform: scale(0.8); }
  100% { opacity: 0.8; transform: scale(1.2); }
}

/* ── Fireworks ─────────────────────────────────────────────────── */
.section-fireworks {
  position: fixed !important;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.firework-spark {
  position: absolute;
  border-radius: 50%;
}

/* ── Balloons ──────────────────────────────────────────────────── */
.section-balloons {
  position: fixed !important;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.section-balloons img {
  position: absolute;
  width: clamp(90px, 18vw, 160px);
  height: auto;
}

.section-balloons img:nth-child(even)  { left: 5%; }
.section-balloons img:nth-child(odd)   { right: 5%; }
.section-balloons img:nth-child(3n)    { left: 22%; }
.section-balloons img:nth-child(5n)    { left: 48%; }
.section-balloons img:nth-child(7n)    { left: 68%; }
.section-balloons img:nth-child(11n)   { left: 82%; }

/* ── Profile ───────────────────────────────────────────────────── */
.section-profile {
  z-index: 1;
}

.profile-wrapper {
  position: relative;
  display: inline-block;
}

.profile-picture {
  width: clamp(150px, 35vw, 280px);
  height: clamp(150px, 35vw, 280px);
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid rgba(128, 128, 128, 0.15);
}

.wish {
  margin-top: 1.2rem;
  max-width: 90%;
}

.wish-hbd {
  font-size: clamp(1.4rem, 4.5vw, 2.5rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.wish-hbd span {
  display: inline-block;
}

.wish-text {
  font-size: clamp(0.9rem, 2.8vw, 1.4rem);
  font-weight: 300;
  margin-top: 0.5rem;
  opacity: 0.7;
  overflow-wrap: break-word;
}

/* ── Confetti ──────────────────────────────────────────────────── */
.section-confetti {
  position: fixed !important;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.confetti-dot {
  position: absolute;
  width: 20px;
  visibility: hidden;
}

/* ── Closing ───────────────────────────────────────────────────── */
.section-closing p {
  font-size: clamp(1rem, 3.5vw, 1.8rem);
  font-weight: 300;
  line-height: 1.9;
  padding: 0 1rem;
}

.replay-btn {
  cursor: pointer;
  z-index: 3;
  pointer-events: none;
  color: var(--accent) !important;
  font-weight: 500 !important;
  transition: opacity 0.3s ease;
}

.replay-btn:hover {
  opacity: 0.7;
}

.last-smile {
  font-size: clamp(2rem, 5vw, 3rem) !important;
  display: inline-block;
  margin-top: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* ── Small mobile ──────────────────────────────────────────────── */
@media screen and (max-width: 600px) {
  .section {
    padding: 1.2rem 1rem;
  }

  .text-box {
    width: 94%;
    padding: 1.2rem;
  }

  .fake-btn {
    bottom: -36px;
    right: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }

  .quote-card {
    width: 92%;
    padding: 1.5rem;
  }

  #theme-toggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
    top: 0.75rem;
    right: 0.75rem;
  }

  .wish-hbd {
    letter-spacing: 1px;
  }
}

/* ── Landscape mobile ─────────────────────────────────────────── */
@media screen and (max-height: 500px) {
  .section {
    padding: 0.5rem 1rem;
  }

  .greeting-title {
    font-size: clamp(1.8rem, 6vw, 3rem);
  }

  .profile-picture {
    width: clamp(100px, 25vw, 180px);
    height: clamp(100px, 25vw, 180px);
  }

  .wish-hbd {
    font-size: clamp(1.2rem, 3.5vw, 2rem);
  }

  .wish-text {
    font-size: clamp(0.8rem, 2vw, 1.1rem);
  }

  .countdown-num {
    font-size: clamp(4rem, 14vw, 7rem);
  }

  .quote-card {
    padding: 1.2rem;
  }

  .section-announcement p {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
  }
}

/* ── SweetAlert2 ───────────────────────────────────────────────── */
.swal2-popup {
  border-radius: 16px !important;
}


#countdown-screen{
height:100vh;
width:100%;
display:flex;
justify-content:center;
align-items:center;

background: linear-gradient(135deg,#020617,#0f172a,#1e293b);

font-family:'Poppins',sans-serif;
color:white;
text-align:center;
}

.countdown-wrapper{
display:flex;
flex-direction:column;
align-items:center;
gap:20px;
}

.title{
font-size:48px;
font-weight:700;
background:linear-gradient(90deg,#f472b6,#60a5fa);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}

.subtitle{
font-size:18px;
opacity:0.8;
}

.countdown{
font-size:48px;
font-weight:700;

padding:25px 40px;
border-radius:20px;

background:rgba(255,255,255,0.08);
backdrop-filter:blur(10px);

box-shadow:
0 0 20px rgba(236,72,153,0.3),
0 0 40px rgba(96,165,250,0.2);

animation: glow 3s infinite alternate;
}

@keyframes glow{

from{
box-shadow:
0 0 15px rgba(236,72,153,0.3),
0 0 30px rgba(96,165,250,0.2);
}

to{
box-shadow:
0 0 30px rgba(236,72,153,0.6),
0 0 60px rgba(96,165,250,0.5);
}

}