
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #102a70, #168fca, #a4e9ff);
}

.login-card {
  width: min(420px, 100%);
  padding: 35px 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 25px;
  box-shadow: 0 15px 50px #00285a55;
}

.lock {
  font-size: 55px;
}

.login-card h1 {
  color: #1766b2;
}

.login-card input,
.login-card button {
  width: 100%;
  padding: 13px;
  margin-top: 12px;
  border-radius: 12px;
  font-size: 16px;
}

.login-card input {
  border: 1px solid #a9c9ed;
}

.login-card button {
  border: 0;
  color: white;
  background: #1879d1;
  cursor: pointer;
}

.login-card button:hover {
  background: #0957a7;
}

.login-message {
  color: #d12c55;
}

.birthday-screen {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  text-align: center;
  color: white;
  background:
    radial-gradient(circle at 20% 20%, #5ecfff, transparent 35%),
    linear-gradient(180deg, #0755bd, #087fc5, #22b9dc);
}

.main-title {
  position: relative;
  z-index: 3;
  margin: 28px 10px 8px;
  font-size: clamp(28px, 5vw, 54px);
  text-shadow: 0 0 18px #fff7a6;
  animation: titleGlow 2s infinite alternate;
}

.subtitle {
  position: relative;
  z-index: 3;
  margin: 0 15px;
}

@keyframes titleGlow {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.bubble-area {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: -100px;
  border: 2px solid #ffffffaa;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 25%,
    #ffffffdd,
    #9cecff66 35%,
    #ffffff22 75%
  );
  box-shadow: inset -5px -7px 15px #ffffff22,
              0 0 15px #baf4ff44;
  cursor: pointer;
  pointer-events: auto;
  animation: floatUp linear forwards;
}

.bubble::after {
  content: "";
  position: absolute;
  top: 20%;
  left: 23%;
  width: 22%;
  height: 13%;
  border-radius: 50%;
  background: #ffffffd9;
  transform: rotate(-35deg);
}

@keyframes floatUp {
  from {
    transform: translateY(0) translateX(0);
  }
  to {
    transform: translateY(-125vh) translateX(35px);
  }
}

.surprise-area {
  position: absolute;
  z-index: 5;
  top: 48%;
  left: 50%;
  width: min(90%, 540px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.surprise-card {
  padding: 22px;
  border: 1px solid #ffffffaa;
  border-radius: 25px;
  background: #ffffffed;
  color: #154c88;
  box-shadow: 0 10px 40px #002f6655;
  animation: appear 0.5s ease-out;
}

.surprise-card h2 {
  margin: 8px 0;
  color: #087fc5;
}

.surprise-card p {
  line-height: 1.6;
  white-space: pre-wrap;
}

.surprise-emoji {
  font-size: clamp(42px, 8vw, 78px);
}

.surprise-photo {
  display: block;
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 15px;
  margin-top: 12px;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.particle {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  animation: particleFly 900ms ease-out forwards;
}

@keyframes particleFly {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.2);
  }
}

@media (max-width: 500px) {
  .main-title {
    margin-top: 35px;
  }

  .surprise-area {
    top: 52%;
  }

  .surprise-card {
    padding: 16px;
  }
}

/* ===== BONG BÓNG SINH NHẬT KHỔNG LỒ ===== */
.giant-bubble {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: 125px;
  height: 125px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid rgba(255,255,255,.85);
  background:
    radial-gradient(circle at 30% 25%,
      rgba(255,255,255,.95) 0 4%,
      rgba(255,255,255,.35) 10%,
      transparent 28%),
    radial-gradient(circle at 35% 30%,
      #c7f2ff 0%, #68c9ff 35%,
      #668bff 70%, #d9a9ff 100%);
  box-shadow:
    0 0 25px #8de4ff,
    inset -12px -15px 25px rgba(50,70,190,.25),
    inset 8px 8px 20px rgba(255,255,255,.7);
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  text-shadow: 0 2px 8px #4165c5;
  animation: giantFloat 3s ease-in-out infinite;
}

.giant-bubble::after {
  content: "🎂";
  position: absolute;
  font-size: 35px;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
}

@keyframes giantFloat {
  0%, 100% { margin-bottom: 0; }
  50% { margin-bottom: 22px; }
}

/* ===== LỚP HẠT HỘI TỤ ===== */
.cake-particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  pointer-events: none;
}

/* ===== BÁNH SINH NHẬT 3 TẦNG ===== */

.cake-tier::before {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: -8px;
  height: 20px;
  border-radius: 50%;
  background: #fff4fb;
  border: 2px solid #fff;
}

.cake-tier::after {
  content: "🍓　🍒　🍓";
  position: absolute;
  top: -4px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 16px;
}

.cake-message {
  color: white;
  text-align: center;
  margin-top: 18px;
  text-shadow: 0 0 12px #6a5bff, 0 2px 4px #334;
}

.cake-message h2 {
  margin: 5px 0;
  font-size: clamp(22px, 6vw, 32px);
}

.cake-message p {
  line-height: 1.6;
}

@keyframes cakeAppear {
  from { opacity: 0; transform: translateY(45px) scale(.45); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes candleGlow {
  from { filter: brightness(1); }
  to { filter: brightness(1.5) drop-shadow(0 0 9px #ffe97d); }
}

/* ===== BÁNH KEM SINH NHẬT KHỔNG LỒ ===== */

.birthday-cake-show {
  position: fixed;
  inset: 0;
  z-index: 1500;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;
  box-shadow: none;

  pointer-events: none;
  animation: birthdayCakeAppear 1.2s ease-out;
}

.birthday-cake-show .three-tier-cake {
  position: relative;
  width: min(85vw, 520px);
  height: 280px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;

  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.birthday-cake-show .cake-tier {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px 18px 22px 22px;
  border: 3px solid rgba(255, 255, 255, 0.95);

  box-shadow:
    inset 0 -12px 0 rgba(255, 255, 255, 0.35),
    0 0 15px rgba(255, 220, 255, 0.5);
}

.birthday-cake-show .cake-top {
  width: 35%;
  height: 65px;

  background: linear-gradient(
    to bottom,
    #fff0fa,
    #ff9edb 75%,
    #f779c7
  );

  z-index: 3;
}

.birthday-cake-show .cake-middle {
  width: 60%;
  height: 75px;

  background: linear-gradient(
    to bottom,
    #f2dfff,
    #bd8bff 75%,
    #a96bfa
  );

  z-index: 2;
}

.birthday-cake-show .cake-bottom {
  width: 85%;
  height: 90px;

  background: linear-gradient(
    to bottom,
    #fff3c4,
    #ffd66b 75%,
    #ffb84d
  );

  z-index: 1;
}


.birthday-cake-show .cake-candles {
  position: absolute;
  top: -45px;

  font-size: 35px;
  z-index: 5;

  animation: candleGlow 1s infinite alternate;
}

.birthday-cake-text {
  text-align: center;
  width: min(90vw, 650px);
  margin-top: 25px;

  color: white;
  text-shadow:
    0 0 8px #65caff,
    0 0 18px #168bff,
    0 0 30px #0066ff;

  animation: birthdayTextAppear 1.5s ease-out;
}

.birthday-cake-text h1 {
  font-size: clamp(24px, 5vw, 45px);
  font-weight: 900;
  margin-bottom: 18px;
}

.birthday-cake-text p {
  font-size: clamp(16px, 2.5vw, 23px);
  line-height: 1.6;
}

@keyframes birthdayCakeAppear {
  from {
    opacity: 0;
    transform: scale(0.3);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* ===== HẠT PHÉP THUẬT BAY THEO CON TRỎ ===== */

.mouse-magic-particle {
  position: fixed;

  pointer-events: none;
  z-index: 9999;

  font-size: 16px;

  animation: mouseMagicFloat 1s ease-out forwards;

  filter: drop-shadow(0 0 6px #ffffff);
}

@keyframes mouseMagicFloat {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: translate(
      calc(-50% + var(--mouse-dx) * 0.5),
      calc(-50% + var(--mouse-dy) * 0.5)
    ) scale(1.3) rotate(90deg);
  }

  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--mouse-dx)),
      calc(-50% + var(--mouse-dy))
    ) scale(0.2) rotate(180deg);
  }
}
