/* ============================================================
   GLOBAL & DESIGN SYSTEM (Folder 1 Dark Glassmorphism Aesthetic)
   ============================================================ */
:root {
  --bg-color: #06070d;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-glow: rgba(0, 240, 255, 0.25);
  --text-main: #f0f4f8;
  --accent-pink: #ff65a3;
  --accent-cyan: #00f0ff;
  --accent-purple: #9d4edf;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at 50% 30%, #161b33 0%, #0b0d1b 60%, #05060d 100%);
  color: var(--text-main);
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  position: relative;
}

/* ============================================================
   STARFIELD BACKGROUND (From Folder 1)
   ============================================================ */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
  pointer-events: none;
}

.star.twinkle-slow { animation: twinkleSlow var(--dur, 4s) ease-in-out infinite alternate var(--delay, 0s); }
.star.twinkle-fast { animation: twinkleFast var(--dur, 2s) ease-in-out infinite alternate var(--delay, 0s); }
.star.drift        { animation: twinkleSlow var(--dur, 6s) ease-in-out infinite alternate var(--delay, 0s), drift var(--drift-dur, 30s) linear infinite var(--delay, 0s); }
.star.blink        { animation: blink var(--dur, 8s) ease-in-out infinite var(--delay, 0s); }

@keyframes twinkleSlow {
  from { opacity: var(--op-from, 0.2); transform: scale(1); }
  to   { opacity: var(--op-to, 0.9);   transform: scale(1.4); }
}

@keyframes twinkleFast {
  from { opacity: var(--op-from, 0.3); }
  to   { opacity: var(--op-to, 1); }
}

@keyframes drift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(var(--dx1, 4px), var(--dy1, -3px)); }
  50%  { transform: translate(var(--dx2, -2px), var(--dy2, 5px)); }
  75%  { transform: translate(var(--dx3, 5px), var(--dy3, 2px)); }
  100% { transform: translate(0, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  10%, 90%  { opacity: 0; }
  50%       { opacity: var(--op-to, 0.8); transform: scale(1.2); }
}

/* ============================================================
   GLASSMORPHISM BUTTONS & CARDS
   ============================================================ */
.glass-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 0 15px rgba(255, 255, 255, 0.03);
  border-radius: 24px;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.3);
}

.glass-btn:active {
  transform: translateY(1px);
}

/* ============================================================
   LOGIN PAGE STYLES (Folder 2 flow + Folder 1 aesthetic)
   ============================================================ */
.login_container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  position: relative;
  z-index: 1;
  padding: 20px;
}

.login_container h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.login_form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 380px;
  padding: 35px 25px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.input-field {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 0 16px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.login_form button[type="submit"] {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #00f0ff 0%, #7000ff 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

.login_form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(112, 0, 255, 0.6);
}

.login_description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 20px;
  text-align: center;
  max-width: 340px;
  line-height: 1.5;
}

/* ============================================================
   BIRTHDAY STORYTELLING PAGE (Folder 2 content + Folder 1 dark glass)
   ============================================================ */
.song {
  visibility: hidden;
  display: none;
}

.container {
  height: 100vh;
  width: 100vw;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  text-align: center;
  visibility: hidden;
  z-index: 1;
}

.container > div {
  left: 0;
  right: 0;
  top: 18vh;
  position: absolute;
}

.one {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.two {
  font-size: 1.25rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 12px;
}

.three {
  font-size: 3rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(255, 101, 163, 0.5);
}

/* Chatbox Glass */
.four .text-box {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  margin: 0 auto;
  padding: 24px 28px;
  position: relative;
  width: 580px;
  max-width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.text-box p {
  margin: 0;
  text-align: left;
  line-height: 1.7;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
}

.text-box span {
  visibility: hidden;
}

.text-box .fake-btn {
  background: linear-gradient(135deg, #00f0ff 0%, #0072ff 100%);
  border-radius: 25px;
  bottom: -22px;
  right: 20px;
  position: absolute;
  color: #fff;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.4);
}

/* Idea section typography */
.five p {
  font-size: 1.8rem;
  position: absolute;
  left: 0;
  right: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.idea-3 strong {
  border-radius: 8px;
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-cyan) !important;
  color: #06070d !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.five .idea-5 {
  font-size: 3.5rem;
  font-weight: 600;
  color: #ffffff;
}

.idea-5 span,
.idea-6 span,
.wish-hbd span {
  display: inline-block;
}

.idea-6 span {
  font-size: 13rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff65a3 0%, #ff8e53 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 101, 163, 0.6));
}

/* Section Six: Photo + Hat + Wishes */
.six {
  position: relative;
  top: 8vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.six .profile-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.six img.profile-picture {
  display: inline-block;
  height: 280px;
  width: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

.six .hat {
  position: absolute;
  left: 36%;
  top: -24px;
  width: 75px;
  transform: rotate(-15deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.wish-hbd {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 15px 0 10px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff65a3 0%, #7000ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 101, 163, 0.5));
}

.wish h5 {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 650px;
  margin: 10px auto 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Balloons floating up */
.ballons img {
  display: inline-block;
  position: absolute;
  width: 80px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
}

.ballons img:nth-child(even) { left: -10%; }
.ballons img:nth-child(odd) { right: -10%; }
.ballons img:nth-child(3n + 0) { left: 30%; }

/* SVG Background Circles (Section Eight) */
.seven .eight {
  height: 100vh;
  position: fixed;
  top: 0;
  width: 100vw;
  pointer-events: none;
}

.eight svg {
  left: 0;
  position: absolute;
  top: 0;
  visibility: hidden;
  width: 25px;
  z-index: -1;
}

.eight svg:nth-child(1) { fill: #ff65a3; left: 5vw; top: 7vh; }
.eight svg:nth-child(2) { fill: #00f0ff; left: 35vw; top: 23vh; }
.eight svg:nth-child(3) { fill: #7000ff; left: 23vw; top: 33vh; }
.eight svg:nth-child(4) { fill: #ffbe0b; left: 57vw; top: 43vh; }
.eight svg:nth-child(5) { fill: #ff006e; left: 7vw; top: 68vh; }
.eight svg:nth-child(6) { fill: #8338ec; left: 77vw; top: 42vh; }
.eight svg:nth-child(7) { fill: #3a86ff; left: 83vw; top: 68vh; }
.eight svg:nth-child(8) { fill: #00f0ff; left: 37vw; top: 86vh; }
.eight svg:nth-child(9) { fill: #ff65a3; left: 87vw; top: 94vh; }

/* Section Nine: Closing & Replay */
.nine p {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

#replay {
  cursor: pointer;
  z-index: 3;
  color: var(--accent-cyan);
  text-decoration: underline;
  margin-top: 15px;
  font-weight: 500;
  transition: color 0.3s;
}

#replay:hover {
  color: var(--accent-pink);
}

.last-smile {
  font-size: 3rem;
  margin-top: 15px;
}

/* ============================================================
   AI ASSISTANT CHATBOT WIDGET (Folder 1 Integration)
   ============================================================ */
.bot-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.bot-chat-bubble {
  margin-bottom: 12px;
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 20px;
  border-bottom-right-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: floatBounce 3s ease-in-out infinite;
  cursor: pointer;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bot-avatar-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.bot-avatar-wrapper:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.7);
}

.chat-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  height: 400px;
  background: rgba(15, 18, 35, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.chat-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
}

.chat-header {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message {
  display: flex;
  max-width: 85%;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
}

.msg-content {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.assistant .msg-content {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-top-left-radius: 2px;
}

.user .msg-content {
  background: linear-gradient(135deg, #00f0ff 0%, #0072ff 100%);
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-input-container {
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 8px;
}

.glass-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px 14px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media screen and (max-width: 500px) {
  .login_form {
    width: 90%;
    padding: 25px 20px;
  }

  .one {
    font-size: 2.8rem;
  }

  .three {
    font-size: 2rem;
  }

  .four .text-box {
    width: 92%;
    padding: 16px;
  }

  .five p {
    font-size: 1.3rem;
  }

  .five .idea-5 {
    font-size: 2.3rem;
  }

  .idea-6 span {
    font-size: 7rem;
  }

  .six img.profile-picture {
    height: 200px;
    width: 200px;
  }

  .six .hat {
    left: 30%;
    width: 55px;
    top: -18px;
  }

  .wish-hbd {
    font-size: 2rem;
  }

  .wish h5 {
    font-size: 0.95rem;
  }

  .nine p {
    font-size: 1.2rem;
  }
}

/* ============================================================
   SECTION 10: END CREDITS MEMORY GALLERY
   ============================================================ */
.ten {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(22, 27, 51, 0.95) 0%, rgba(11, 13, 27, 0.98) 100%);
  backdrop-filter: blur(10px);
}

.credits-header-inline {
  text-align: center;
  margin-bottom: 24px;
  padding: 10px 20px;
}

.credits-header-inline h2 {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00f0ff 0%, #ff65a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.credits-header-inline p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

.credits-wrapper {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 40px;
  padding-bottom: 80px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-cyan) rgba(255,255,255,0.05);
}

.credits-roll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 20px 0 100px;
  will-change: transform;
}

.memory-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 14px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 240, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.memory-card:hover {
  transform: scale(1.04) translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 18px 45px rgba(0, 240, 255, 0.35);
}

.memory-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.memory-caption {
  display: block;
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.5px;
}

.credits-footer {
  text-align: center;
  margin-top: 40px;
  padding: 30px 20px;
}

.credits-thanks {
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.6;
  text-shadow: 0 0 15px rgba(255, 101, 163, 0.6);
}

.replay-btn {
  display: inline-block;
  background: linear-gradient(135deg, #00f0ff 0%, #7000ff 100%);
  color: #ffffff !important;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.replay-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(112, 0, 255, 0.6);
}
