/* ===========================
   GLOBAL STYLES
=========================== */

body {
  font-family: Arial, sans-serif;
  background-color: #fff8e7;
  color: #333;
  text-align: center;
  margin: 0;
  padding: 0;
}

/* ===========================
   HEADER
=========================== */

header {
  padding: 20px;
}

header h1 {
  margin-bottom: 5px;
}

/* ===========================
   COOKIE SECTION
=========================== */

#cookie-container {
  position: relative;
  margin-top: 40px;
}

#cookie-container img {
  width: 380px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Whole cookie hover */
#cookie-whole:hover {
  transform: scale(1.05);
}

/* Hide halves initially */
#cookie-left,
#cookie-right {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  opacity: 0;
  transform: translateX(-50%);
}

/* Clip the halves */
#cookie-left {
  clip-path: inset(0 50% 0 0);
}

#cookie-right {
  clip-path: inset(0 0 0 50%);
}

/* ===========================
   COOKIE ANIMATIONS
=========================== */

@keyframes cookie-shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

.shake {
  animation: cookie-shake 0.4s ease;
}

.grow {
  transform: scale(1.2);
}

.fall-left {
  animation: fallLeft 0.6s forwards ease-in;
}

.fall-right {
  animation: fallRight 0.6s forwards ease-in;
}

@keyframes fallLeft {
  to {
    transform: translate(-200px, 300px) rotate(-40deg);
    opacity: 0;
  }
}

@keyframes fallRight {
  to {
    transform: translate(200px, 300px) rotate(40deg);
    opacity: 0;
  }
}

/* ===========================
   FORTUNE STRIP
=========================== */

#fortune-strip {
  margin-top: 20px;
  background: white;
  padding: 15px;
  display: inline-block;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);

  opacity: 0;
  transform: scale(0.8);
  transition: 0.4s ease;
}

#fortune-strip-text {
  margin: 0;
  font-size: 1.2rem;
}

/* ===========================
   RATING BUTTONS
=========================== */

#rating-buttons {
  margin-top: 25px;
  opacity: 0;
  transition: 0.4s ease;
}

#rating-buttons button {
  margin: 0 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease;
}

#love-button {
  background: #ff6b6b;
  color: white;
}

#love-button:hover {
  background: #ff4a4a;
}

#meh-button {
  background: #ffd93d;
}

#meh-button:hover {
  background: #f5c400;
}

#hate-button {
  background: #6c757d;
  color: white;
}

#hate-button:hover {
  background: #555d63;
}

/* ===========================
   FOOTER
=========================== */

footer {
  margin-top: 40px;
  padding: 20px;
}

footer button {
  margin: 5px;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #eee;
}

footer button:hover {
  background: #ddd;
}

/* ===========================
   MODALS
=========================== */

#stats-modal,
#custom-snack-modal {
  display: none;
  background: white;
  padding: 20px;
  width: 80%;
  max-width: 400px;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#stats-modal button,
#custom-snack-modal button {
  margin-top: 10px;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #eee;
}

#stats-modal button:hover,
#custom-snack-modal button:hover {
  background: #ddd;
}
