/* ===========================================
   OLIMPOSGAZAB MINI-GAME STYLES
   =========================================== */

/* Mini-game Section */
.minigame-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 25%, #2a0a2a 50%, #1a0a1a 75%, #0a0a0a 100%);
  background-size: 400% 400%;
  animation: minigameBackgroundFlow 25s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.minigame-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 0, 170, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 102, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 60%, rgba(170, 0, 255, 0.1) 0%, transparent 50%);
  animation: minigameGlow 20s ease-in-out infinite;
  pointer-events: none;
}

.minigame-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

/* Mini-game Header */
.minigame-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: minigameHeaderFadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.minigame-title {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #ff00aa 50%, #ff6600 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 30px rgba(255, 0, 170, 0.3);
  animation: minigameTitleGlow 4s ease-in-out infinite alternate;
  line-height: 1.2;
}

.minigame-description {
  font-size: 1.3rem;
  color: #cccccc;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  animation: minigameDescriptionSlide 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mini-game Content */
.minigame-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  animation: minigameContentFadeIn 1.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Game Area */
.minigame-game {
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 0, 170, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.minigame-game::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 0, 170, 0.05) 0%, rgba(255, 102, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.minigame-game:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 0, 170, 0.6);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 0, 170, 0.2);
}

.minigame-game:hover::before {
  opacity: 1;
}

/* Game Header */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 0, 170, 0.3);
}

.game-header h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 0%, #ff00aa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-stats {
  display: flex;
  gap: 2rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.game-stats .score {
  color: #ff00aa;
}

.game-stats .moves {
  color: #ff6600;
}

/* Game Board */
.game-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 4px;
  width: 400px;
  height: 400px;
  margin: 0 auto 2rem;
  background: rgba(30, 30, 30, 0.8);
  border: 2px solid rgba(255, 0, 170, 0.3);
  border-radius: 12px;
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.game-tile {
  background: linear-gradient(135deg, #ff00aa 0%, #ff6600 100%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.game-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-tile:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(255, 0, 170, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.game-tile:hover::before {
  opacity: 1;
}

.game-tile:active {
  transform: scale(0.95);
}

.game-tile.empty {
  background: rgba(30, 30, 30, 0.5);
  border: 2px dashed rgba(255, 0, 170, 0.3);
  cursor: default;
}

.game-tile.empty:hover {
  transform: none;
  box-shadow: none;
}

.game-tile.movable {
  animation: tilePulse 2s ease-in-out infinite;
}

.game-tile.correct {
  background: linear-gradient(135deg, #00ff00 0%, #00aa00 100%);
  animation: tileCorrect 0.6s ease-in-out;
}

/* Game Controls */
.game-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.game-btn {
  background: linear-gradient(135deg, #ff00aa 0%, #ff6600 100%);
  color: #ffffff;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.game-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 170, 0.4);
}

.game-btn:hover::before {
  left: 100%;
}

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

.game-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Game Message */
.game-message {
  text-align: center;
  padding: 1rem;
  background: rgba(30, 30, 30, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 0, 170, 0.3);
}

.game-message p {
  color: #ffffff;
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

.game-message.success {
  background: rgba(0, 255, 0, 0.1);
  border-color: rgba(0, 255, 0, 0.3);
  animation: messageSuccess 0.6s ease-in-out;
}

.game-message.error {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.3);
  animation: messageError 0.6s ease-in-out;
}

/* Mini-game Info */
.minigame-info {
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 102, 0, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.minigame-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.05) 0%, rgba(170, 0, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.minigame-info:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 102, 0, 0.6);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 102, 0, 0.2);
}

.minigame-info:hover::before {
  opacity: 1;
}

.minigame-info h3 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #ff6600 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.minigame-info ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.minigame-info li {
  color: #cccccc;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  padding-left: 0.5rem;
  transition: color 0.3s ease;
}

.minigame-info li:hover {
  color: #ff6600;
}

/* Achievements */
.achievements {
  margin-top: 2rem;
}

.achievements h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #ff00aa 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.achievement {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(30, 30, 30, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(255, 102, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.5;
}

.achievement.unlocked {
  opacity: 1;
  border-color: rgba(255, 102, 0, 0.6);
  background: rgba(30, 30, 30, 0.8);
  animation: achievementUnlock 0.8s ease-in-out;
}

.achievement-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6600 0%, #ff00aa 100%);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
}

.achievement-text {
  color: #ffffff;
  font-weight: 500;
  font-size: 1rem;
}

/* Animations */
@keyframes minigameBackgroundFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes minigameGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

@keyframes minigameHeaderFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes minigameTitleGlow {
  0%, 100% { text-shadow: 0 0 30px rgba(255, 0, 170, 0.3); }
  50% { text-shadow: 0 0 50px rgba(255, 0, 170, 0.6); }
}

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

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

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

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

@keyframes messageSuccess {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes messageError {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes achievementUnlock {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .minigame-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .minigame-title {
    font-size: 2.2rem;
  }
  
  .game-board {
    width: 350px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .minigame-title {
    font-size: 1.8rem;
  }
  
  .minigame-description {
    font-size: 1.1rem;
  }
  
  .game-board {
    width: 300px;
    height: 300px;
  }
  
  .game-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .game-stats {
    gap: 1rem;
  }
  
  .game-controls {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .minigame-container {
    padding: 0 1rem;
  }
  
  .minigame-game,
  .minigame-info {
    padding: 1.5rem;
  }
  
  .game-board {
    width: 250px;
    height: 250px;
  }
  
  .game-tile {
    font-size: 1.2rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .minigame-section,
  .minigame-section::before,
  .minigame-title,
  .game-tile,
  .achievement {
    animation: none;
  }
  
  .minigame-game:hover,
  .minigame-info:hover,
  .game-btn:hover {
    transform: none;
  }
}
