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

body {
  font-family: 'Montserrat', 'Raleway', sans-serif;
  background: linear-gradient(135deg, #ffe4e1, #fff0f5);
  color: #422f2f;
  min-height: 100vh;
  line-height: 1.6;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 15px 50px;
}

/* ===== NAVIGATION ===== */
nav {
  width: 100%;
  max-width: 700px;
  background-color: #9e5f6a;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 14px 0;
  border-radius: 12px;
  box-shadow: 0 5px 12px rgba(158, 95, 106, 0.5);
  margin-top: 20px;
  font-weight: 600;
  font-size: 1.1rem;
}

nav a {
  color: #f8f1f1;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 20px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 5px #f0d5db;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  background-color: #f6a5b6;
  color: #422f2f;
  transform: scale(1.05);
  box-shadow: 0 0 15px #f6a5b6;
}

/* ===== CONTAINER (MAIN WRAPPER) ===== */
.container {
  background-color: #fff9fb;
  width: 100%;
  max-width: 700px;
  border-radius: 25px;
  box-shadow: 0 10px 20px rgba(158, 95, 106, 0.3);
  margin: 25px auto 60px;
  padding: 30px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: text;
}

/* ===== HEADINGS ===== */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: #822c38;
  text-shadow: 2px 2px 5px #e2b9bd;
  margin-bottom: 15px;
  text-align: center;
}

h1 {
  font-size: 2.6rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

/* ===== PARAGRAPHS ===== */
p {
  font-size: 1.1rem;
  color: #5b3a3f;
  margin-bottom: 20px;
  max-width: 600px;
  text-align: center;
}

/* ===== SPARKLES ===== */
.sparkles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: visible;
  z-index: 1000;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #f6a5b6;
  filter: drop-shadow(0 0 3px #f6a5b6);
  border-radius: 50%;
  animation: sparkle-flicker 3s infinite alternate;
  opacity: 0.8;
}

@keyframes sparkle-flicker {
  0% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ===== MAGIC 8 BALL ===== */
.magic-8ball {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle at center, #1a1a1a, #000000);
  border-radius: 50%;
  box-shadow: inset -5px -5px 12px #111111, inset 5px 5px 15px #444444, 0 5px 10px rgba(0,0,0,0.8);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px 0 30px;
  user-select: none;
  position: relative;
}

.magic-8ball .triangle {
  width: 100px;
  height: 90px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: linear-gradient(135deg, #173d52, #005b8a);
  box-shadow: 0 0 10px #002f4b;
  color: #f6a5b6;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  line-height: 90px;
  user-select: none;
  padding: 0 8px;
  transition: background 0.3s ease;
  position: relative;
  top: 12px;
  font-family: 'Montserrat', sans-serif;
}

/* ===== QUIZ ===== */
.quiz-box {
  width: 100%;
  max-width: 600px;
  background: #f6e3e6;
  border-radius: 20px;
  box-shadow: 0 6px 15px rgba(158, 95, 106, 0.3);
  padding: 20px 30px;
  margin-bottom: 30px;
}

.quiz-box .question p {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #6f3d44;
}

.quiz-box label {
  display: block;
  margin-bottom: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #422f2f;
  user-select: none;
}

.quiz-box input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
}

.quiz-box button {
  margin-top: 15px;
  background-color: #9e5f6a;
  color: #fff9fb;
  font-weight: 700;
  padding: 12px 22px;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(158, 95, 106, 0.7);
  transition: background-color 0.3s ease;
}

.quiz-box button:hover {
  background-color: #f6a5b6;
  color: #422f2f;
  box-shadow: 0 8px 14px #f6a5b6;
}

.hidden {
  display: none !important;
}

#quiz-result {
  background: #fde3e8;
  border-radius: 25px;
  padding: 20px 30px;
  box-shadow: 0 4px 14px rgba(247, 154, 174, 0.6);
  max-width: 600px;
  margin: 20px auto 30px;
  color: #822c38;
  font-weight: 600;
  font-size: 1.15rem;
  text-align: center;
}

/* ===== SLANG & FUN FACT BOXES ===== */
.slang-box, .fact-box {
  background: #f9d5db;
  border-radius: 20px;
  padding: 20px 30px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 6px 15px rgba(158, 95, 106, 0.3);
  margin: 15px auto 40px;
  font-weight: 600;
  color: #6f3d44;
}

.slang-box p, .fact-box p {
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 1rem;
}

/* ===== LAVA LAMP ===== */
.lava-lamp {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 400px;
  background: linear-gradient(180deg, #f6a5b6 0%, #822c38 100%);
  border-radius: 150px 150px 80px 80px / 250px 250px 80px 80px;
  box-shadow: inset 0 5px 15px #f8bac0, 0 10px 25px rgba(130, 44, 56, 0.8);
  overflow: hidden;
  z-index: 50;
}

.lava-lamp .blob {
  position: absolute;
  bottom: 0;
  width: 60px;
  height: 60px;
  background: #f9b6bc;
  border-radius: 50%;
  animation: blob-move 6s infinite ease-in-out;
  opacity: 0.9;
  box-shadow: 0 4px 12px #f7a9b1;
}

.lava-lamp .blob:nth-child(2) {
  width: 80px;
  height: 80px;
  animation-delay: 2s;
  background: #e89a9e;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 6px 15px #e27c81;
}

.lava-lamp .blob:nth-child(3) {
  width: 70px;
  height: 70px;
  animation-delay: 4s;
  background: #d96d74;
  right: 15%;
  box-shadow: 0 5px 12px #be5157;
}

@keyframes blob-move {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-40px) scale(1.1);
  }
}

/* ===== JUKEBOX ===== */
.jukebox-container {
  background: #f7d1d7;
  border-radius: 25px;
  max-width: 700px;
  width: 100%;
  margin: 40px auto 60px;
  padding: 25px 30px;
  box-shadow: 0 10px 18px rgba(158, 95, 106, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jukebox-iframe {
  border-radius: 20px;
  border: none;
  width: 90%;
  max-width: 600px;
  height: 80px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(130,44,56,0.3);
}

.jukebox-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 600px;
}

.jukebox-buttons button {
  background-color: #9e5f6a;
  color: #fff9fb;
  border: none;
  border-radius: 30px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(158, 95, 106, 0.7);
  transition: background-color 0.3s ease;
  flex: 1 1 120px;
  user-select: none;
}

.jukebox-buttons button:hover {
  background-color: #f6a5b6;
  color: #422f2f;
  box-shadow: 0 8px 14px #f6a5b6;
}

/* ===== PEN PAL ===== */
#penpal-select {
  width: 100%;
  max-width: 320px;
  font-size: 1.1rem;
  padding: 12px 16px;
  border: 3px solid #dca1a7;
  border-radius: 30px;
  background: #f6e3e6;
  box-shadow: inset 1px 1px 6px #f4d7db;
  margin-bottom: 35px;
  transition: border-color 0.3s ease;
  cursor: pointer;
}

#penpal-select:focus {
  outline: none;
  border-color: #822c38;
  box-shadow: 0 0 10px #d98895;
}

.chat-box {
  width: 100%;
  max-width: 700px;
  height: 350px;
  background-color: #fce8eb;
  border-radius: 30px;
  border: 3px solid #dca1a7;
  box-shadow: inset 2px 2px 10px #f6bfc5;
  padding: 20px 25px;
  overflow-y: auto;
  font-size: 1rem;
  color: #422f2f;
  line-height: 1.5;
  margin-bottom: 30px;
  scrollbar-width: thin;
  scrollbar-color: #d98895 #fce8eb;
}

.chat-box::-webkit-scrollbar {
  width: 9px;
}

.chat-box::-webkit-scrollbar-track {
  background: #fce8eb;
  border-radius: 20px;
}

.chat-box::-webkit-scrollbar-thumb {
  background-color: #d98895;
  border-radius: 20px;
  border: 3px solid #fce8eb;
}

.chat-message {
  margin-bottom: 18px;
  max-width: 75%;
  padding: 13px 18px;
  border-radius: 40px;
  animation: slideFadeIn 0.3s ease forwards;
  word-wrap: break-word;
  box-shadow: 1px 2px 6px rgba