/* ===== GOAL CELEBRATION MODAL ===== */

.celebration-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.celebration-modal.active {
  display: flex;
}

.celebration-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.celebration-content {
  position: relative;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3) translateY(-100px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.celebration-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.celebration-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
}

/* ===== CARTOON CHARACTER ===== */

.celebration-character {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.celebration-character.bounce {
  animation: characterBounce 1s ease-in-out;
}

@keyframes characterBounce {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(0) scale(1.05);
  }
  75% {
    transform: translateY(-10px);
  }
}

.character-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Character Head */
.character-head {
  position: relative;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #FFD93D 0%, #FFC107 100%);
  border-radius: 50%;
  border: 4px solid #FF6B35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Eyes */
.character-eyes {
  display: flex;
  gap: 30px;
  margin-bottom: 10px;
}

.eye {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  border: 2px solid #333;
  position: relative;
  animation: blink 4s infinite;
}

@keyframes blink {
  0%, 48%, 52%, 100% {
    height: 20px;
  }
  50% {
    height: 2px;
  }
}

.pupil {
  width: 10px;
  height: 10px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
  animation: lookAround 3s infinite;
}

@keyframes lookAround {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-3px, 0);
  }
  50% {
    transform: translate(3px, 0);
  }
  75% {
    transform: translate(0, 3px);
  }
}

/* Mouth */
.character-mouth {
  width: 40px;
  height: 20px;
  border: 3px solid #333;
  border-top: none;
  border-radius: 0 0 40px 40px;
  background: #FF6B35;
  position: absolute;
  bottom: 25px;
  animation: smile 2s infinite;
}

@keyframes smile {
  0%, 100% {
    width: 40px;
  }
  50% {
    width: 50px;
  }
}

/* Cheeks */
.character-cheeks {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.cheek {
  position: absolute;
  width: 20px;
  height: 15px;
  background: rgba(255, 107, 53, 0.4);
  border-radius: 50%;
  top: 60px;
}

.left-cheek {
  left: 15px;
}

.right-cheek {
  right: 15px;
}

/* Body */
.character-body-main {
  width: 100px;
  height: 120px;
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  border-radius: 50% 50% 40% 40%;
  border: 4px solid #4A5FAD;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-top: -10px;
  z-index: 1;
}

/* Arms */
.character-arms {
  position: absolute;
  width: 150px;
  top: 130px;
  display: flex;
  justify-content: space-between;
}

.arm {
  width: 20px;
  height: 60px;
  background: linear-gradient(135deg, #FFD93D 0%, #FFC107 100%);
  border-radius: 10px;
  border: 3px solid #FF6B35;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.left-arm {
  transform: rotate(-20deg);
  transform-origin: top center;
  animation: waveLeft 1.5s infinite;
}

.right-arm {
  transform: rotate(20deg);
  transform-origin: top center;
  animation: waveRight 1.5s infinite;
}

@keyframes waveLeft {
  0%, 100% {
    transform: rotate(-20deg);
  }
  50% {
    transform: rotate(-40deg);
  }
}

@keyframes waveRight {
  0%, 100% {
    transform: rotate(20deg);
  }
  50% {
    transform: rotate(40deg);
  }
}

/* ===== CELEBRATION BOARD ===== */

.celebration-board {
  background: white;
  border-radius: 20px;
  padding: 30px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 5px solid #FFD93D;
  position: relative;
  max-width: 400px;
  text-align: center;
  animation: boardFloat 3s ease-in-out infinite;
}

@keyframes boardFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.board-content h2 {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: #667EEA;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.celebration-message {
  font-size: 16px;
  color: #666;
  margin: 0 0 10px 0;
}

.celebration-streak {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.celebration-streak-number {
  font-size: 64px;
  font-weight: 900;
  color: #FF6B35;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  line-height: 1;
  animation: pulseNumber 1s infinite;
}

@keyframes pulseNumber {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.celebration-streak-label {
  font-size: 24px;
  font-weight: 700;
  color: #667EEA;
}

.celebration-subtitle {
  font-size: 14px;
  color: #999;
  margin: 15px 0 0 0;
  font-style: italic;
}

/* ===== FLOATING EMOJIS ===== */

.floating-emojis {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.float-emoji {
  position: absolute;
  font-size: 40px;
  bottom: -60px;
  left: 50%;
  animation: floatUp 4s ease-out infinite;
  opacity: 0;
  animation-delay: var(--delay, 0s);
  transform: translateX(var(--x, 0px));
}

@keyframes floatUp {
  0% {
    bottom: -60px;
    opacity: 0;
    transform: translateX(var(--x, 0px)) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: translateX(var(--x, 0px)) rotate(360deg);
  }
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 768px) {
  .celebration-content {
    padding: 20px;
    max-width: 90%;
  }
  
  .character-head {
    width: 100px;
    height: 100px;
  }
  
  .character-body-main {
    width: 80px;
    height: 100px;
  }
  
  .character-arms {
    width: 120px;
    top: 110px;
  }
  
  .celebration-board {
    padding: 20px 30px;
    max-width: 320px;
  }
  
  .board-content h2 {
    font-size: 24px;
  }
  
  .celebration-streak-number {
    font-size: 48px;
  }
  
  .celebration-streak-label {
    font-size: 20px;
  }
  
  .float-emoji {
    font-size: 30px;
  }
}

/* ===== DARK THEME ===== */

body.dark-theme .celebration-board {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--text-primary);
}

body.dark-theme .board-content h2 {
  color: var(--primary-light);
}

body.dark-theme .celebration-message {
  color: var(--text-secondary);
}

body.dark-theme .celebration-subtitle {
  color: var(--text-light);
}
