/* Epic Landing Page Enhancements */
:root {
  --epic-gold: #ffd700;
  --epic-red: #dc143c;
  --epic-blue: #1e90ff;
  --epic-purple: #8a2be2;
  --shadow-dark: rgba(0, 0, 0, 0.8);
}

.particles-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.epic-title-wrapper {
  position: relative;
  z-index: 10;
  margin-bottom: 3rem;
}

.epic-title {
  font-family: 'MedievalSharp', serif;
  font-size: 8rem;
  font-weight: bold;
  color: var(--epic-gold);
  text-shadow:
    0 0 10px rgba(255, 215, 0, 0.8),
    0 0 20px rgba(255, 215, 0, 0.6),
    0 0 30px rgba(255, 215, 0, 0.4),
    0 0 40px rgba(220, 20, 60, 0.6),
    0 5px 15px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.3rem;
  margin-bottom: 1rem;
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% {
    transform: scale(1);
    text-shadow:
      0 0 10px rgba(255, 215, 0, 0.8),
      0 0 20px rgba(255, 215, 0, 0.6),
      0 0 30px rgba(255, 215, 0, 0.4),
      0 0 40px rgba(220, 20, 60, 0.6),
      0 5px 15px rgba(0, 0, 0, 0.9);
  }
  50% {
    transform: scale(1.05);
    text-shadow:
      0 0 20px rgba(255, 215, 0, 1),
      0 0 30px rgba(255, 215, 0, 0.8),
      0 0 40px rgba(255, 215, 0, 0.6),
      0 0 60px rgba(220, 20, 60, 0.8),
      0 8px 20px rgba(0, 0, 0, 0.9);
  }
}

.epic-subtitle-wrapper {
  margin: 2rem auto;
  max-width: 600px;
}

.epic-subtitle {
  font-family: 'MedievalSharp', serif;
  font-size: 2.5rem;
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.8),
    0 2px 5px rgba(0, 0, 0, 0.9);
  margin-bottom: 0.5rem;
}

.subtitle-underline {
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--epic-gold), var(--epic-red), var(--epic-gold), transparent);
  margin: 0 auto;
  animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes underlineGlow {
  0%, 100% { box-shadow: 0 0 5px var(--epic-gold); }
  50% { box-shadow: 0 0 15px var(--epic-red); }
}

.epic-tagline {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-top: 1.5rem;
  font-style: italic;
}

.landing-buttons {
  margin-top: 3rem;
  z-index: 10;
  position: relative;
}

.button-epic {
  font-family: 'MedievalSharp', serif;
  background: linear-gradient(135deg, var(--epic-red) 0%, #8b0000 100%);
  border: 3px solid var(--epic-gold);
  color: white;
  font-size: 1.5rem;
  padding: 1.5rem 3rem;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow:
    0 0 20px rgba(220, 20, 60, 0.6),
    0 5px 15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

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

.button-epic:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.8),
    0 0 40px rgba(220, 20, 60, 0.6),
    0 10px 25px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: #fff;
}

.button-epic:hover::before {
  left: 100%;
}

.button-epic-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.button-epic-text {
  font-weight: bold;
  letter-spacing: 0.1rem;
}

.button-epic-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

.quick-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.stat-badge:hover {
  transform: translateY(-5px);
  border-color: var(--epic-gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.stat-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6));
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  font-weight: bold;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

/* Card Rarity Effects */
.card-rarity-common {
  box-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
}

.card-rarity-rare {
  box-shadow: 0 0 15px rgba(30, 144, 255, 0.8);
  border: 2px solid var(--epic-blue) !important;
}

.card-rarity-epic {
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.9);
  border: 2px solid var(--epic-purple) !important;
  animation: epicGlow 2s ease-in-out infinite;
}

.card-rarity-legendary {
  box-shadow: 0 0 30px rgba(255, 215, 0, 1);
  border: 3px solid var(--epic-gold) !important;
  animation: legendaryGlow 1.5s ease-in-out infinite;
}

@keyframes epicGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.9);
  }
  50% {
    box-shadow: 0 0 35px rgba(138, 43, 226, 1), 0 0 50px rgba(138, 43, 226, 0.6);
  }
}

@keyframes legendaryGlow {
  0%, 100% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 50px rgba(255, 165, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 50px rgba(255, 215, 0, 1), 0 0 80px rgba(255, 165, 0, 0.8);
  }
}

/* Floating Damage Numbers */
.damage-number {
  position: absolute;
  font-size: 3rem;
  font-weight: bold;
  font-family: 'MedievalSharp', serif;
  color: #ff0000;
  text-shadow:
    0 0 10px rgba(255, 0, 0, 1),
    0 0 20px rgba(255, 0, 0, 0.8),
    2px 2px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 9999;
  animation: floatDamage 1.5s ease-out forwards;
}

.damage-number.healing {
  color: #00ff00;
  text-shadow:
    0 0 10px rgba(0, 255, 0, 1),
    0 0 20px rgba(0, 255, 0, 0.8),
    2px 2px 4px rgba(0, 0, 0, 0.9);
}

.damage-number.critical {
  color: #ffd700;
  font-size: 4rem;
  text-shadow:
    0 0 15px rgba(255, 215, 0, 1),
    0 0 30px rgba(255, 215, 0, 0.8),
    2px 2px 6px rgba(0, 0, 0, 0.9);
}

@keyframes floatDamage {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.5);
  }
  20% {
    transform: translateY(-20px) scale(1.2);
  }
  50% {
    opacity: 1;
    transform: translateY(-60px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(0.8);
  }
}

/* Particle Effects */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
}

.particle-fire {
  background: radial-gradient(circle, #ff6600, #ff0000);
  box-shadow: 0 0 10px #ff6600, 0 0 20px #ff0000;
}

.particle-magic {
  background: radial-gradient(circle, #00ffff, #0066ff);
  box-shadow: 0 0 10px #00ffff, 0 0 20px #0066ff;
}

.particle-blood {
  background: radial-gradient(circle, #ff0000, #8b0000);
  box-shadow: 0 0 5px #ff0000;
}

/* Screen Shake Effect */
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-10px, 5px); }
  20% { transform: translate(10px, -5px); }
  30% { transform: translate(-8px, 8px); }
  40% { transform: translate(8px, -8px); }
  50% { transform: translate(-6px, 6px); }
  60% { transform: translate(6px, -6px); }
  70% { transform: translate(-4px, 4px); }
  80% { transform: translate(4px, -4px); }
  90% { transform: translate(-2px, 2px); }
}

.screen-shake {
  animation: screenShake 0.5s ease-in-out;
}

/* Combo Display */
.combo-display {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'MedievalSharp', serif;
  font-size: 5rem;
  font-weight: bold;
  color: var(--epic-gold);
  text-shadow:
    0 0 20px rgba(255, 215, 0, 1),
    0 0 40px rgba(255, 165, 0, 0.8),
    0 5px 10px rgba(0, 0, 0, 0.9);
  z-index: 10000;
  pointer-events: none;
  animation: comboAppear 2s ease-out forwards;
}

@keyframes comboAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1) rotate(-2deg);
  }
  80% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) translateY(-50px);
  }
}

/* Achievement Notification */
.achievement-notification {
  position: fixed;
  top: 100px;
  right: -400px;
  width: 350px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(50, 50, 50, 0.95));
  border: 3px solid var(--epic-gold);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.8);
  z-index: 10001;
  animation: slideInAchievement 0.5s ease-out forwards, slideOutAchievement 0.5s ease-in 4.5s forwards;
}

@keyframes slideInAchievement {
  to { right: 20px; }
}

@keyframes slideOutAchievement {
  to { right: -400px; }
}

.achievement-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.achievement-title {
  font-family: 'MedievalSharp', serif;
  font-size: 1.3rem;
  color: var(--epic-gold);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.achievement-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

/* STUNNING MODAL STYLES */
.modal.is-active .modal-content {
  animation: modalSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-100px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content .box {
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.98), rgba(40, 20, 20, 0.98));
  border: 3px solid var(--epic-gold);
  border-radius: 15px;
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.6),
    0 20px 60px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.modal-content .box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: modalGlow 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes modalGlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10%, 10%) rotate(90deg); }
  50% { transform: translate(0, 20%) rotate(180deg); }
  75% { transform: translate(-10%, 10%) rotate(270deg); }
}

.modal-content .title {
  font-family: 'MedievalSharp', serif;
  font-size: 3rem;
  color: var(--epic-gold);
  text-align: center;
  text-shadow:
    0 0 20px rgba(255, 215, 0, 0.8),
    0 5px 10px rgba(0, 0, 0, 0.9);
  margin-bottom: 2rem;
  animation: titleShine 2s ease-in-out infinite;
}

@keyframes titleShine {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(255, 215, 0, 0.8),
      0 5px 10px rgba(0, 0, 0, 0.9);
  }
  50% {
    text-shadow:
      0 0 30px rgba(255, 215, 0, 1),
      0 0 40px rgba(255, 165, 0, 0.6),
      0 5px 15px rgba(0, 0, 0, 0.9);
  }
}

.modal-content .label {
  color: rgba(255, 215, 0, 0.9);
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-bottom: 0.5rem;
}

.modal-content .input,
.modal-content .select select {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 215, 0, 0.4);
  color: white;
  font-size: 1.1rem;
  padding: 0.75rem;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.modal-content .input:focus,
.modal-content .select select:focus {
  border-color: var(--epic-gold);
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.6),
    inset 0 1px 3px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.8);
  outline: none;
}

.modal-content .input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Deck Selection Cards */
.deck-selection-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.deck-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(40, 40, 60, 0.8));
  border: 3px solid rgba(255, 215, 0, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

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

.deck-card:hover {
  transform: translateY(-10px) scale(1.05);
  border-color: var(--epic-gold);
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.8),
    0 15px 40px rgba(0, 0, 0, 0.6);
}

.deck-card:hover::before {
  left: 100%;
}

.deck-card.selected {
  border-color: var(--epic-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(220, 20, 60, 0.2));
  box-shadow:
    0 0 40px rgba(255, 215, 0, 1),
    inset 0 0 20px rgba(255, 215, 0, 0.3);
  transform: scale(1.05);
}

.deck-card-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.deck-card-name {
  font-family: 'MedievalSharp', serif;
  font-size: 1.3rem;
  color: var(--epic-gold);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.deck-card-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  line-height: 1.4;
}

/* Class Selection Cards */
.class-selection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.class-card {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(60, 20, 20, 0.9));
  border: 3px solid rgba(220, 20, 60, 0.5);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.class-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  border-radius: 50%;
}

.class-card:hover::after {
  width: 300px;
  height: 300px;
}

.class-card:hover {
  transform: translateY(-15px) rotateY(5deg);
  border-color: var(--epic-gold);
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.9),
    0 20px 50px rgba(0, 0, 0, 0.7);
}

.class-card.selected {
  border-color: var(--epic-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(220, 20, 60, 0.3));
  box-shadow:
    0 0 50px rgba(255, 215, 0, 1),
    inset 0 0 30px rgba(255, 215, 0, 0.4);
  transform: scale(1.1);
}

.class-card-icon {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 15px currentColor);
  position: relative;
  z-index: 1;
}

.class-card-name {
  font-family: 'MedievalSharp', serif;
  font-size: 1.5rem;
  color: white;
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  font-weight: bold;
  position: relative;
  z-index: 1;
}

.class-card-stats {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* Difficulty Indicators */
.difficulty-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.difficulty-option {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.difficulty-option:hover {
  transform: translateX(5px);
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(255, 215, 0, 0.1);
}

.difficulty-option.selected {
  border-color: var(--epic-gold);
  background: rgba(255, 215, 0, 0.2);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.difficulty-option input[type="radio"] {
  margin-right: 0.5rem;
}

.difficulty-label {
  font-size: 1.1rem;
  color: white;
  font-weight: bold;
}

.difficulty-skulls {
  margin-left: 0.5rem;
  color: var(--epic-red);
  filter: drop-shadow(0 0 5px rgba(220, 20, 60, 0.8));
}

/* CINEMATIC LOADING SCREEN */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a1a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.loading-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(220, 20, 60, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.15) 0%, transparent 40%);
  animation: loadingBackgroundShift 8s ease-in-out infinite;
}

@keyframes loadingBackgroundShift {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(5deg);
  }
}

.loading-title {
  font-family: 'MedievalSharp', serif;
  font-size: 4rem;
  color: var(--epic-gold);
  text-shadow:
    0 0 30px rgba(255, 215, 0, 1),
    0 0 60px rgba(255, 165, 0, 0.6),
    0 5px 20px rgba(0, 0, 0, 0.9);
  margin-bottom: 3rem;
  animation: loadingTitlePulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes loadingTitlePulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
}

.loading-progress-container {
  width: 60%;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.loading-progress-bar {
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  border: 3px solid var(--epic-gold);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 30px rgba(255, 215, 0, 0.6),
    inset 0 5px 10px rgba(0, 0, 0, 0.8);
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--epic-red) 0%,
    #ff4500 25%,
    var(--epic-gold) 50%,
    #ff4500 75%,
    var(--epic-red) 100%);
  background-size: 200% 100%;
  animation: progressFillAnimation 2s linear infinite;
  border-radius: 17px;
  position: relative;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.8),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: width 0.3s ease-out;
}

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

.loading-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'MedievalSharp', serif;
  font-size: 1.2rem;
  color: white;
  font-weight: bold;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 1),
    0 2px 4px rgba(0, 0, 0, 1);
  z-index: 2;
}

.loading-tips {
  margin-top: 3rem;
  text-align: center;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.loading-tip {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  line-height: 1.6;
  animation: tipFadeIn 0.8s ease-in-out;
}

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

.loading-tip::before {
  content: '💡 ';
  font-size: 1.5rem;
  margin-right: 0.5rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

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

.loading-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, var(--epic-gold), transparent);
  border-radius: 50%;
  animation: floatParticle 8s linear infinite;
  opacity: 0;
}

@keyframes floatParticle {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1);
  }
}

/* ENHANCED GAMEPLAY ANIMATIONS */
.card-hover-effect {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-effect:hover {
  transform: translateY(-20px) scale(1.15) rotateZ(2deg);
  filter: brightness(1.3) drop-shadow(0 10px 30px rgba(255, 215, 0, 0.8));
  z-index: 100;
}

.card-play-animation {
  animation: cardPlay 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes cardPlay {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.5) rotate(360deg);
    filter: brightness(2) drop-shadow(0 0 40px rgba(255, 215, 0, 1));
  }
  100% {
    transform: scale(0.9) rotate(720deg);
    opacity: 0.8;
  }
}

.attack-slash {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.8), transparent);
  transform: rotate(45deg);
  animation: slashAnimation 0.4s ease-out;
  pointer-events: none;
  z-index: 9999;
}

@keyframes slashAnimation {
  0% {
    opacity: 0;
    transform: rotate(45deg) translateX(-100px) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translateX(100px) scale(0.5);
  }
}

.victory-screen,
.defeat-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  animation: screenFadeIn 1s ease-out forwards;
}

.victory-screen {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.3), rgba(0, 100, 0, 0.8));
}

.defeat-screen {
  background: radial-gradient(circle, rgba(220, 20, 60, 0.3), rgba(50, 0, 0, 0.8));
}

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

.victory-title,
.defeat-title {
  font-family: 'MedievalSharp', serif;
  font-size: 8rem;
  font-weight: bold;
  text-shadow:
    0 0 40px currentColor,
    0 10px 30px rgba(0, 0, 0, 0.9);
  animation: titleExplosion 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  margin-bottom: 2rem;
}

.victory-title {
  color: var(--epic-gold);
}

.defeat-title {
  color: var(--epic-red);
}

@keyframes titleExplosion {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.turn-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'MedievalSharp', serif;
  font-size: 4rem;
  font-weight: bold;
  padding: 2rem 4rem;
  border: 4px solid;
  border-radius: 20px;
  z-index: 10000;
  animation: turnIndicatorAppear 2s ease-out forwards;
  pointer-events: none;
}

.turn-indicator.player-turn {
  color: var(--epic-gold);
  border-color: var(--epic-gold);
  background: rgba(255, 215, 0, 0.2);
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.8),
    inset 0 0 30px rgba(255, 215, 0, 0.3);
}

.turn-indicator.enemy-turn {
  color: var(--epic-red);
  border-color: var(--epic-red);
  background: rgba(220, 20, 60, 0.2);
  box-shadow:
    0 0 40px rgba(220, 20, 60, 0.8),
    inset 0 0 30px rgba(220, 20, 60, 0.3);
}

@keyframes turnIndicatorAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-10deg);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
  }
  40% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8) translateY(-50px);
  }
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .epic-title {
    font-size: 4rem;
  }
  .epic-subtitle {
    font-size: 1.5rem;
  }
  .button-epic {
    font-size: 1.2rem;
    padding: 1rem 2rem;
  }
  .quick-stats {
    flex-direction: column;
    gap: 1rem;
  }
  .loading-title {
    font-size: 2.5rem;
  }
  .loading-progress-container {
    width: 85%;
  }
  .victory-title,
  .defeat-title {
    font-size: 4rem;
  }
  .turn-indicator {
    font-size: 2.5rem;
    padding: 1.5rem 3rem;
  }
  .deck-selection-cards,
  .class-selection {
    grid-template-columns: 1fr;
  }
}
