/* =========================
   HALLOWEEN THEME - UCC
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Creepster', cursive, 'Arial', sans-serif;
  background: linear-gradient(135deg, #2d1b35 0%, #1a0d1f 100%);
  color: #ff6b35;
  overflow-x: hidden;
  min-height: 100vh;
}

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

.star {
  position: absolute;
  background: #ff9500;
  border-radius: 50%;
  animation: twinkle 2s infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

#loreScreen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(45deg, #8b0000, #ff8c00, #5d2d4f, #228b22);
  background-size: 400% 400%;
  animation: gradientShift 3s 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: 3px 3px 6px rgba(0,0,0,0.7);
  animation: bounce 2s infinite;
  color: #ff6b35;
  text-transform: uppercase;
  letter-spacing: 2px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

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

#loreScreen button {
  margin-top: 30px;
  padding: 15px 30px;
  background: linear-gradient(45deg, #8b0000, #ff4500);
  border: 2px solid #ff9500;
  border-radius: 10px;
  color: #ffd700;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139,0,0,0.5);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  font-family: 'Creepster', cursive;
  text-transform: uppercase;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px #ff4500; }
  100% { transform: scale(1); }
}

#loreScreen button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(255,69,0,0.7);
  background: linear-gradient(45deg, #ff4500, #8b0000);
}

.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d1b35 0%, #1a0d1f 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(45,27,53,0.8);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 30px;
  max-width: 800px;
  box-shadow: 0 8px 32px rgba(139,0,0,0.3);
  border: 2px solid #ff9500;
}

.credits-content h2 {
  color: #ff6b35;
  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: #ffd700;
}

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

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

.minigame-container {
  background: rgba(45,27,53,0.8);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 20px;
  margin: 20px;
  box-shadow: 0 8px 32px rgba(139,0,0,0.3);
  border: 2px solid #ff9500;
}

.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: 2px solid #ff6b35;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(139,0,0,0.3);
  color: #ffd700;
}

.minigame-cell:hover {
  background: rgba(255,107,53,0.4);
  transform: scale(1.1);
  box-shadow: 0 0 15px #ff6b35;
}

.minigame-cell.active {
  background: #ff6b35;
  color: #2d1b35;
  box-shadow: 0 0 20px #ff4500;
}

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

.player-card {
  background: rgba(45,27,53,0.8);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 15px;
  border: 2px solid #ff9500;
  min-width: 200px;
  transition: all 0.3s ease;
  color: #ffd700;
}

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

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

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

.nav-btn {
  background: linear-gradient(45deg, #8b0000, #ff4500);
  color: #ffd700;
  border: 2px solid #ff9500;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139,0,0,0.5);
  font-family: 'Creepster', cursive;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,69,0,0.7);
  background: linear-gradient(45deg, #ff4500, #8b0000);
}

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

h1 {
  font-size: 3em;
  margin: 30px 0;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
  background: linear-gradient(45deg, #ff6b35, #ff9500, #ffd700, #8b0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: colorShift 3s ease-in-out infinite;
  text-transform: uppercase;
  letter-spacing: 3px;
}

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

#clicker {
  width: 200px;
  height: 200px;
  margin: 30px auto;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: radial-gradient(circle, rgba(255,107,53,0.3) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  border: 3px solid #ff9500;
}

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

#clicker:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px #ff4500;
}

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

.click-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 2em;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
  animation: floatUp 1s ease-out forwards;
  font-family: 'Creepster', cursive;
}

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

#stats {
  margin: 30px;
  font-size: 1.5em;
  background: rgba(45,27,53,0.8);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(139,0,0,0.3);
  border: 2px solid #ff9500;
  display: inline-block;
  color: #ffd700;
}

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

.item {
  padding: 20px;
  background: linear-gradient(135deg, rgba(139,0,0,0.3), rgba(45,27,53,0.2));
  backdrop-filter: blur(10px);
  border: 2px solid #ff9500;
  border-radius: 15px;
  cursor: pointer;
  width: 220px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(139,0,0,0.3);
  position: relative;
  overflow: hidden;
  color: #ffd700;
}

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

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

.item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255,69,0,0.5);
  border-color: #ff6b35;
}

.item:active {
  transform: translateY(-5px) scale(1.02);
}

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

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

.floating-fish {
  position: fixed;
  font-size: 2em;
  pointer-events: none;
  z-index: 100;
  animation: floatAway 3s ease-out forwards;
  color: #ff6b35;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

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

.achievement {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(45deg, #8b0000, #ff6b35);
  color: #ffd700;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(139,0,0,0.5);
  transform: translateX(300px);
  animation: slideIn 0.5s ease-out forwards, slideOut 0.5s ease-in 3s forwards;
  z-index: 1000;
  border: 2px solid #ff9500;
  font-family: 'Creepster', cursive;
}

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

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

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

.panel {
  background: linear-gradient(135deg, rgba(139,0,0,0.3), rgba(45,27,53,0.2));
  backdrop-filter: blur(15px);
  border: 2px solid #ff9500;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(139,0,0,0.3);
}

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

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

.leaderboard-entry {
  padding: 8px;
  margin: 5px 0;
  background: rgba(139,0,0,0.2);
  border-radius: 10px;
  border-left: 4px solid #ff6b35;
  color: #ffd700;
}

.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-item {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 8px 0;
  background: rgba(139,0,0,0.2);
  border-radius: 12px;
  border-left: 4px solid #5d2d4f;
  transition: all 0.3s ease;
  color: #ffd700;
}

.achievement-item.unlocked {
  border-left-color: #ff6b35;
  background: rgba(255,107,53,0.3);
  animation: achievementGlow 3s ease-in-out;
}

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

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

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

.power-level-up {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(45deg, #8b0000, #ff6b35);
  color: #ffd700;
  padding: 20px;
  border-radius: 15px;
  font-size: 1.5em;
  font-weight: bold;
  z-index: 2000;
  animation: powerLevelAnimation 3s ease-out forwards;
  box-shadow: 0 0 50px rgba(255,107,53,0.7);
  border: 3px solid #ff9500;
  font-family: 'Creepster', cursive;
  text-transform: uppercase;
}

@keyframes powerLevelAnimation {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.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(139,0,0,0.5);
  margin-bottom: 15px;
  border: 3px solid #ff9500;
}

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

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

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

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

.slide-btn {
  background: linear-gradient(45deg, #8b0000, #ff4500);
  color: #ffd700;
  border: 2px solid #ff9500;
  padding: 10px 15px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(139,0,0,0.5);
  font-family: 'Creepster', cursive;
}

.slide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,69,0,0.7);
  background: linear-gradient(45deg, #ff4500, #8b0000);
}

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

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

#battleScreen {
  background: radial-gradient(circle, rgba(139,0,0,0.6) 0%, rgba(29,9,35,0.9) 100%);
}

#battleClickButton:hover {
  background: #ff4500 !important;
  transform: scale(1.05);
  box-shadow: 0 0 20px #ff6b35 !important;
}

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

#adventureContainer h1 {
  background: linear-gradient(45deg, #ff6b35, #ff9500, #8b0000, #5d2d4f);
  -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 10px #ff6b35);
}

#endingCredits {
  background: linear-gradient(135deg, #2d1b35 0%, #5d2d4f 50%, #8b0000 100%);
  background-size: 400% 400%;
  animation: gradientShift 4s ease infinite;
}

@media (max-width: 768px) {
  h1 { font-size: 2em; }
  #clicker { width: 150px; height: 150px; }
  .shop { flex-direction: column; align-items: center; }
  .item { width: 90%; max-width: 300px; }
  #stats { font-size: 1.2em; }
  .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.8em; 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%; }
}
