/* =========================
   CHRISTMAS / WINTER THEME - UCC (FULL VERSION)
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0d3b1c 0%, #081c0a 100%);
  color: #e8f4ea;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Snowfall */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  animation: fall 8s infinite linear;
  box-shadow: 0 0 6px #fff, 0 0 10px #a3d9ff;
}

@keyframes fall {
  0% { transform: translateY(-100px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* Twinkling lights background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, #ff0000, transparent),
    radial-gradient(2px 2px at 40px 70px, #00ff00, transparent),
    radial-gradient(2px 2px at 60px 20px, #ffff00, transparent),
    radial-gradient(2px 2px at 80px 50px, #ff00ff, transparent);
  background-size: 200px 200px;
  animation: twinkle 3s infinite alternate;
  z-index: 0;
  opacity: 0.4;
}

@keyframes twinkle {
  0% { opacity: 0.3; }
  100% { opacity: 0.7; }
}

/* Lore Screen */
#loreScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(45deg, #0d3b1c, #228b22, #1e90ff, #8b0000);
  background-size: 400% 400%;
  animation: gradientShift 6s ease infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  text-align: center;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#loreScreen h2 {
  font-size: 3em;
  margin-bottom: 20px;
  text-shadow: 0 0 15px #1e90ff, 0 0 25px #00ffaa;
  animation: glow 2s ease-in-out infinite alternate;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 3px;
}

@keyframes glow {
  from { text-shadow: 0 0 10px #1e90ff, 0 0 20px #00ffaa; }
  to { text-shadow: 0 0 20px #ff0000, 0 0 30px #ffff00; }
}

#loreScreen p {
  max-width: 600px;
  margin: 15px;
  font-size: 1.3em;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  color: #e1f7e7;
}

#loreScreen button {
  margin-top: 30px;
  padding: 15px 30px;
  background: linear-gradient(45deg, #b22222, #228b22);
  border: 3px solid #ffd700;
  border-radius: 12px;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(178,34,34,0.6);
  transition: all 0.3s ease;
  animation: pulse 1.5s infinite;
  font-family: 'Segoe UI', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 6px 20px rgba(178,34,34,0.6); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px #ff0000, 0 0 40px #ffd700; }
  100% { transform: scale(1); box-shadow: 0 6px 20px rgba(178,34,34,0.6); }
}

#loreScreen button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(255,0,0,0.8);
  background: linear-gradient(45deg, #ff0000, #00aa00);
}

/* Screens */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0d3b1c 0%, #081c0a 100%);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  text-align: center;
  padding: 20px;
  overflow-y: auto;
}

.screen.active {
  display: flex;
}

.credits-content {
  background: rgba(13,59,28,0.8);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 30px;
  max-width: 800px;
  box-shadow: 0 8px 32px rgba(34,139,34,0.3);
  border: 3px solid #ffd700;
}

.credits-content h2 {
  color: #b22222;
  margin-bottom: 20px;
  font-size: 2.5em;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
  text-transform: uppercase;
}

.credits-content p {
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 1.1em;
  color: #e1f7e7;
}

.credits-list {
  text-align: left;
  margin: 20px 0;
}

.credits-list li {
  margin: 8px 0;
  padding-left: 10px;
  color: #ffd700;
  border-left: 3px solid #b22222;
}

/* Minigame */
.minigame-container {
  background: rgba(13,59,28,0.8);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 20px;
  margin: 20px;
  box-shadow: 0 8px 32px rgba(34,139,34,0.3);
  border: 3px solid #ffd700;
}

.minigame-grid {
  display: grid;
  grid-template-columns: repeat(4, 60px);
  gap: 5px;
  margin: 20px auto;
  justify-content: center;
}

.minigame-cell {
  width: 60px;
  height: 60px;
  border: 3px solid #b22222;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(178,34,34,0.3);
  color: #e1f7e7;
}

.minigame-cell:hover {
  background: rgba(178,34,34,0.4);
  transform: scale(1.1);
  box-shadow: 0 0 15px #b22222;
}

.minigame-cell.active {
  background: #b22222;
  color: #0d3b1c;
  box-shadow: 0 0 20px #ff0000;
}

/* Multiplayer */
.multiplayer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 20px;
}

.player-card {
  background: rgba(13,59,28,0.8);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 15px;
  border: 3px solid #ffd700;
  min-width: 200px;
  transition: all 0.3s ease;
  color: #e1f7e7;
}

.player-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(255,0,0,0.5);
  border-color: #b22222;
}

.online-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b22222;
  display: inline-block;
  margin-left: 5px;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px #ff0000;
}

/* Navigation */
.nav-buttons {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 10px;
  z-index: 100;
}

.nav-btn {
  background: linear-gradient(45deg, #b22222, #228b22);
  color: #fff;
  border: 3px solid #ffd700;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(178,34,34,0.5);
  font-family: 'Segoe UI', sans-serif;
}

.nav-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(255,0,0,0.7);
  background: linear-gradient(45deg, #ff0000, #00aa00);
}

/* Main container */
.container {
  position: relative;
  z-index: 10;
  padding: 60px 20px 20px;
  text-align: center;
}

h1 {
  font-size: 3.5em;
  margin: 30px 0;
  text-shadow: 0 0 20px #1e90ff;
  background: linear-gradient(45deg, #b22222, #228b22, #ffd700, #1e90ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: colorShift 4s ease-in-out infinite;
  text-transform: uppercase;
  letter-spacing: 3px;
}

@keyframes colorShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(180deg); }
}

/* Clicker */
#clicker {
  width: 220px;
  height: 220px;
  margin: 30px auto;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  border: 4px solid #ffd700;
  box-shadow: 0 0 40px rgba(30,144,255,0.5);
}

#clicker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(178,34,34,0.5);
  transition: all 0.2s ease;
  border-radius: 15px;
  filter: drop-shadow(0 0 15px #ffd700);
}

#clicker:hover {
  transform: scale(1.12);
  box-shadow: 0 0 50px #ff0000, 0 0 70px #00ff00;
}

#clicker:active {
  transform: scale(0.96);
}

/* Click effect */
.click-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 2.2em;
  font-weight: bold;
  color: #a3d9ff;
  text-shadow: 0 0 10px #1e90ff;
  animation: floatUp 1.2s ease-out forwards;
  font-family: 'Segoe UI', sans-serif;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -180%) scale(1.8);
  }
}

/* Stats */
#stats {
  margin: 30px;
  font-size: 1.6em;
  background: rgba(13,59,28,0.75);
  backdrop-filter: blur(12px);
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 35px rgba(34,139,34,0.4);
  border: 3px solid #ffd700;
  display: inline-block;
  color: #fff;
}

/* Shop */
.shop {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

.item {
  padding: 20px;
  background: linear-gradient(135deg, rgba(178,34,34,0.25), rgba(34,139,34,0.2));
  backdrop-filter: blur(12px);
  border: 3px solid #ffd700;
  border-radius: 15px;
  cursor: pointer;
  width: 230px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(178,34,34,0.3);
  position: relative;
  overflow: hidden;
  color: #fff;
}

.item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.3), transparent);
  transition: left 0.7s;
}

.item:hover::before {
  left: 100%;
}

.item:hover {
  transform: translateY(-12px) scale(1.06);
  box-shadow: 0 18px 45px rgba(255,0,0,0.5);
  border-color: #ff0000;
}

.item-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.item-disabled:hover {
  transform: none;
}

/* Floating fish -> floating snowflakes */
.floating-fish {
  position: fixed;
  font-size: 2em;
  pointer-events: none;
  z-index: 100;
  animation: floatAway 3s ease-out forwards;
  color: #a3d9ff;
  text-shadow: 2px 2px 8px rgba(30,144,255,0.8);
}

@keyframes floatAway {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) rotate(360deg);
  }
}

/* Achievement popup */
.achievement {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(45deg, #b22222, #228b22);
  color: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(178,34,34,0.7);
  transform: translateX(350px);
  animation: slideIn 0.6s ease-out forwards, slideOut 0.6s ease-in 3.5s forwards;
  z-index: 1000;
  border: 3px solid #ffd700;
  font-family: 'Segoe UI', sans-serif;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

@keyframes slideOut {
  to { transform: translateX(350px); }
}

/* Game panels */
.game-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 40px 20px;
}

.panel {
  background: linear-gradient(135deg, rgba(178,34,34,0.25), rgba(34,139,34,0.2));
  backdrop-filter: blur(15px);
  border: 3px solid #ffd700;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(178,34,34,0.3);
}

.panel h3 {
  margin-bottom: 15px;
  color: #b22222;
  text-align: center;
  font-size: 1.3em;
  text-transform: uppercase;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

#storyContent {
  font-size: 1.1em;
  line-height: 1.6;
  color: #e1f7e7;
}

/* Leaderboard */
.leaderboard-entry {
  padding: 8px;
  margin: 5px 0;
  background: rgba(178,34,34,0.2);
  border-radius: 10px;
  border-left: 4px solid #b22222;
  color: #e1f7e7;
}

.leaderboard-entry.current-player {
  border-left-color: #ffd700;
  background: rgba(255,215,0,0.3);
  animation: highlight 2s infinite;
}

@keyframes highlight {
  0%, 100% { background: rgba(255,215,0,0.3); }
  50% { background: rgba(255,215,0,0.5); }
}

/* Achievement list */
.achievement-item {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 8px 0;
  background: rgba(178,34,34,0.2);
  border-radius: 12px;
  border-left: 4px solid #8b0000;
  transition: all 0.3s ease;
  color: #e1f7e7;
}

.achievement-item.unlocked {
  border-left-color: #b22222;
  background: rgba(178,34,34,0.3);
  animation: achievementGlow 3s ease-in-out;
}

@keyframes achievementGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(178,34,34,0.4); }
  50% { box-shadow: 0 0 20px rgba(178,34,34,0.6); }
}

.achievement-icon {
  font-size: 1.5em;
  margin-right: 10px;
  filter: grayscale(1);
  transition: filter 0.3s ease;
  color: #228b22;
}

.achievement-item.unlocked .achievement-icon {
  filter: grayscale(0);
  color: #ffd700;
}

/* Power level up */
.power-level-up {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(45deg, #b22222, #228b22, #1e90ff);
  color: #fff;
  padding: 25px 35px;
  border-radius: 20px;
  font-size: 1.8em;
  font-weight: bold;
  z-index: 2000;
  animation: powerLevelAnimation 3.5s ease-out forwards;
  box-shadow: 0 0 80px rgba(30,144,255,0.9);
  border: 4px solid #ffd700;
  font-family: 'Segoe UI', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
}

@keyframes powerLevelAnimation {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
}

/* Slideshow */
.slideshow-container {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.slide {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-image {
  width: 100%;
  max-width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(178,34,34,0.5);
  margin-bottom: 15px;
  border: 3px solid #ffd700;
}

.slide-caption {
  color: #e1f7e7;
  text-align: center;
}

.slide-caption h4 {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #b22222;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  text-transform: uppercase;
}

.slide-caption p {
  font-size: 1em;
  line-height: 1.5;
  color: #e1f7e7;
}

.slideshow-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 0 10px;
}

.slide-btn {
  background: linear-gradient(45deg, #b22222, #228b22);
  color: #fff;
  border: 3px solid #ffd700;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(178,34,34,0.5);
  font-family: 'Segoe UI', sans-serif;
}

.slide-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(255,0,0,0.7);
  background: linear-gradient(45deg, #ff0000, #00aa00);
}

.slide-btn:active {
  transform: translateY(0);
}

.slide-counter {
  color: #fff;
  font-weight: bold;
  background: rgba(178,34,34,0.3);
  padding: 8px 12px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  font-size: 1em;
  border: 2px solid #ffd700;
}

/* Battle screen */
#battleScreen {
  background: radial-gradient(circle, rgba(178,34,34,0.6) 0%, rgba(13,59,28,0.9) 100%);
}

#battleClickButton:hover {
  background: #ff0000 !important;
  transform: scale(1.05);
  box-shadow: 0 0 25px #b22222 !important;
}

#battleClickButton:active {
  transform: scale(0.95);
}

/* Adventure */
#adventureContainer h1 {
  background: linear-gradient(45deg, #b22222, #228b22, #8b0000, #0d3b1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.adventure-scene-hover:hover {
  transform: scale(1.1);
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 15px #b22222);
}

/* Ending credits */
#endingCredits {
  background: linear-gradient(135deg, #0d3b1c 0%, #228b22 50%, #8b0000 100%);
  background-size: 400% 400%;
  animation: gradientShift 4s ease infinite;
}

/* Mobile */
@media (max-width: 768px) {
  h1 { font-size: 2.5em; }
  #clicker { width: 180px; height: 180px; }
  .shop { flex-direction: column; align-items: center; }
  .item { width: 90%; max-width: 300px; }
  #stats { font-size: 1.3em; padding: 15px; }
  .game-panels { grid-template-columns: 1fr; margin: 20px 10px; }
  .panel { padding: 15px; }
  .slide-image { max-width: 250px; height: 150px; }
  .slideshow-controls { flex-direction: column; gap: 10px; }
  .slide-btn { font-size: 0.9em; padding: 8px 12px; }
  .nav-buttons { flex-direction: column; }
  .container { padding-top: 100px; }
  
  #battleArea { flex-direction: column; gap: 20px; }
  #adventureStats { font-size: 0.9em; }
  #creditsText { font-size: 1em; width: 95%; }
}