/* Custom Christmas Theme Styles */
:root {
  --christmas-red: #ef4444;
  --christmas-green: #22c55e;
  --christmas-gold: #fbbf24;
  --snow-white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Loading animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Button hover effects */
button {
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

/* Advent calendar door animations */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.door.unlocked {
  background: linear-gradient(
    90deg,
    rgba(239, 68, 68, 0.5) 0%,
    rgba(239, 68, 68, 0.8) 50%,
    rgba(239, 68, 68, 0.5) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* Score popup animation */
@keyframes scorePopup {
  0% { 
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(5deg);
  }
  100% { 
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.score-popup {
  animation: scorePopup 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Leaderboard rank badges */
.rank-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.rank-silver {
  background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
  box-shadow: 0 0 20px rgba(229, 231, 235, 0.5);
}

.rank-bronze {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.5);
}

/* Modal backdrop blur effect */
.modal-backdrop {
  backdrop-filter: blur(8px);
}

/* Christmas lights decoration */
.christmas-lights {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  z-index: 999;
  pointer-events: none;
}

.light {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: blink 2s infinite;
}

.light:nth-child(1) { left: 5%; background: var(--christmas-red); }
.light:nth-child(2) { left: 15%; background: var(--christmas-green); animation-delay: 0.5s; }
.light:nth-child(3) { left: 25%; background: var(--christmas-gold); animation-delay: 1s; }
.light:nth-child(4) { left: 35%; background: var(--christmas-red); animation-delay: 1.5s; }
.light:nth-child(5) { left: 45%; background: var(--christmas-green); animation-delay: 0.2s; }
.light:nth-child(6) { left: 55%; background: var(--christmas-gold); animation-delay: 0.7s; }
.light:nth-child(7) { left: 65%; background: var(--christmas-red); animation-delay: 1.2s; }
.light:nth-child(8) { left: 75%; background: var(--christmas-green); animation-delay: 0.9s; }
.light:nth-child(9) { left: 85%; background: var(--christmas-gold); animation-delay: 1.7s; }
.light:nth-child(10) { left: 95%; background: var(--christmas-red); animation-delay: 0.4s; }

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px currentColor; }
  50% { opacity: 0.3; box-shadow: none; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .door {
    font-size: 0.9rem;
  }
  
  .snowflake {
    font-size: 1rem;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--christmas-red), var(--christmas-green));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--christmas-green), var(--christmas-red));
}

/* Text selection */
::selection {
  background: var(--christmas-gold);
  color: black;
}

::-moz-selection {
  background: var(--christmas-gold);
  color: black;
}
