/* Monster Thieves Game Styles */
/* BEM Methodology with game- prefix */

:root {
  --game-bg-primary: #0a0a0f;
  --game-bg-secondary: #1a1a2e;
  --game-bg-tertiary: #2a2a3e;
  --game-accent: #ff6b6b;
  --game-accent-light: #ff8e8e;
  --game-text-primary: #ffffff;
  --game-text-secondary: #b8b8d1;
  --game-border: rgba(255, 255, 255, 0.1);
  --game-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --game-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --game-radius: 0.75rem;
  --game-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--game-bg-primary) 0%, var(--game-bg-secondary) 100%);
  color: var(--game-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Game page layout */
.game-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.game-header {
  background: var(--game-bg-secondary);
  border-bottom: 2px solid var(--game-accent);
  padding: 1rem 0;
  box-shadow: var(--game-shadow);
}

.game-header__inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.game-logo {
  display: inline-block;
  text-decoration: none;
  transition: var(--game-transition);
}

.game-logo:hover {
  transform: scale(1.05);
}

.game-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.game-title {
  font-size: 1.5rem;
  margin: 0;
  color: var(--game-accent);
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Main game area */
.game-main {
  flex: 1;
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-container {
  max-width: 50rem;
  width: 100%;
  text-align: center;
}

/* Game info */
.game-info {
  margin-bottom: 2rem;
}

.game-info__title {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  color: var(--game-accent);
  font-weight: 700;
}

.game-info__text {
  font-size: 1.125rem;
  margin: 0;
  color: var(--game-text-secondary);
}

/* Slot machine */
.slot-machine {
  background: var(--game-bg-tertiary);
  border: 3px solid var(--game-accent);
  border-radius: var(--game-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--game-shadow-lg);
  position: relative;
  overflow: hidden;
}

.slot-machine::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 107, 107, 0.1) 50%, transparent 70%);
  animation: shimmer 3s infinite;
}

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

.slot-machine__display {
  background: var(--game-bg-primary);
  border: 2px solid var(--game-border);
  border-radius: var(--game-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.slot-machine__reels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.5rem;
  min-height: 200px;
  align-items: center;
  justify-items: center;
}

.reel {
  width: 60px;
  height: 60px;
  background: var(--game-bg-secondary);
  border: 2px solid var(--game-border);
  border-radius: var(--game-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: var(--game-transition);
  position: relative;
  overflow: hidden;
}

.reel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 107, 107, 0.2) 50%, transparent 100%);
  opacity: 0;
  transition: var(--game-transition);
}

.reel.spinning {
  animation: spin 0.6s ease-in-out;
}

.reel.win {
  border-color: var(--game-accent);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
  transform: scale(1.1);
}

.reel.win::before {
  opacity: 1;
}

@keyframes spin {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

/* Game controls */
.slot-machine__controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--game-radius);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--game-transition);
  text-decoration: none;
  min-width: 150px;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.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;
}

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

.game-btn--primary {
  background: linear-gradient(135deg, var(--game-accent) 0%, var(--game-accent-light) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.game-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

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

.game-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.game-btn__text {
  position: relative;
  z-index: 1;
}

.game-btn__icon {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
}

/* Game stats */
.game-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--game-bg-tertiary);
  border-radius: var(--game-radius);
  border: 1px solid var(--game-border);
}

.stat {
  text-align: center;
}

.stat__label {
  display: block;
  font-size: 0.875rem;
  color: var(--game-text-secondary);
  margin-bottom: 0.25rem;
}

.stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--game-accent);
}

/* Game rules */
.game-rules {
  background: var(--game-bg-tertiary);
  border-radius: var(--game-radius);
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid var(--game-border);
}

.game-rules__title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--game-accent);
  font-weight: 700;
}

.game-rules__list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  max-width: 20rem;
  margin: 0 auto;
}

.game-rules__list li {
  padding: 0.5rem 0;
  color: var(--game-text-secondary);
  border-bottom: 1px solid var(--game-border);
}

.game-rules__list li:last-child {
  border-bottom: none;
}

/* Game disclaimer */
.game-disclaimer {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--game-accent);
  border-radius: var(--game-radius);
  padding: 1rem;
  margin: 2rem 0;
}

.game-disclaimer__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--game-text-secondary);
  line-height: 1.6;
}

/* Footer */
.game-footer {
  background: var(--game-bg-secondary);
  border-top: 1px solid var(--game-border);
  padding: 1rem 0;
  margin-top: auto;
}

.game-footer__inner {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.game-footer__link {
  color: var(--game-accent);
  text-decoration: none;
  font-weight: 500;
  transition: var(--game-transition);
}

.game-footer__link:hover {
  text-decoration: underline;
}

.game-footer__links {
  display: flex;
  gap: 1rem;
}

.game-footer__links a {
  color: var(--game-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--game-transition);
}

.game-footer__links a:hover {
  color: var(--game-text-primary);
}

/* Win animation */
.win-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--game-accent);
  color: white;
  padding: 2rem;
  border-radius: var(--game-radius);
  font-size: 1.5rem;
  font-weight: 700;
  z-index: 1000;
  animation: winPulse 2s ease-in-out;
  box-shadow: var(--game-shadow-lg);
}

@keyframes winPulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Responsive design */
@media (max-width: 48rem) {
  .game-header__inner {
    flex-direction: column;
    text-align: center;
  }
  
  .game-title {
    font-size: 1.25rem;
  }
  
  .slot-machine {
    padding: 1rem;
  }
  
  .slot-machine__reels {
    gap: 0.25rem;
    min-height: 150px;
  }
  
  .reel {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }
  
  .game-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .game-stats {
    grid-template-columns: 1fr;
  }
  
  .game-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 30rem) {
  .game-main {
    padding: 1rem 0.5rem;
  }
  
  .slot-machine__reels {
    gap: 0.2rem;
    min-height: 120px;
  }
  
  .reel {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
  
  .slot-machine {
    padding: 0.75rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .reel.spinning,
  .game-btn::before,
  .slot-machine::before {
    animation: none;
  }
  
  .reel.win {
    transform: none;
  }
}

/* Focus styles */
.game-btn:focus,
.game-footer__link:focus,
.game-footer__links a:focus {
  outline: 2px solid var(--game-accent);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .game-header,
  .game-footer,
  .slot-machine__controls {
    display: none;
  }
  
  .slot-machine {
    border: 2px solid #000;
    background: white;
    color: black;
  }
  
  .reel {
    border: 1px solid #000;
    background: white;
  }
}
