/* Styles pour le jeu Slots */

.slots-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0;
}

/* Machine à sous */
.slot-machine {
  background: #2c3e50;
  padding: 15px;
  border-radius: 20px;
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.5),
    inset 0 0 0 5px #34495e;
  position: relative;
  width: 100%;
  max-width: 800px; /* Increased for 5 reels */
}

.slot-frame {
  background: #ecf0f1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  height: 300px; /* 3 rows * 100px */
  display: flex;
  border: 5px solid #bdc3c7;
}

.reels-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.reel {
  flex: 1;
  height: 100%;
  border-right: 2px solid #bdc3c7;
  position: relative;
  overflow: hidden;
  background: white;
}

.reel:last-child {
  border-right: none;
}

.reel-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Will be populated by JS */
  display: flex;
  flex-direction: column;
  transition: transform 0s; /* Controlled by JS */
}

.slot-symbol {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem; /* Slightly smaller for 5 reels */
  line-height: 1;
  transition: all 0.3s;
}

.slot-symbol.win-cell {
  background: rgba(255, 215, 0, 0.3);
  box-shadow: inset 0 0 10px gold;
  animation: pulseWin 1s infinite;
}

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

.slot-shadow-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0) 20%,
    rgba(0,0,0,0) 80%,
    rgba(0,0,0,0.4) 100%
  );
  z-index: 10;
  border-radius: 5px;
}

.paylines-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.payline {
  position: absolute;
  background: rgba(255, 0, 0, 0.6);
  height: 4px;
  width: 100%;
  display: none; /* Hidden by default */
  box-shadow: 0 0 5px red;
}

.payline.show {
  display: block;
  animation: blink 1s infinite;
}

.line-top { top: 48px; } /* Center of top row (50px) approx */
.line-mid { top: 148px; } /* Center of mid row (150px) */
.line-bot { top: 248px; } /* Center of bot row (250px) */
.line-diag1 { 
  top: 148px; 
  transform: rotate(30deg) scaleX(1.2); 
}
.line-diag2 { 
  top: 148px; 
  transform: rotate(-30deg) scaleX(1.2); 
}

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

/* Contrôles */
.bet-controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bet-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bet-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.bet-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  padding-right: 4rem;
  color: var(--fg);
  font-size: 1.2rem;
  font-weight: bold;
  font-family: var(--font-mono);
}

.bet-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 91, 140, 255), 0.2);
}

.bet-currency {
  position: absolute;
  right: 1rem;
  color: var(--muted);
  pointer-events: none;
}

.quick-bets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-bet-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-bet-btn:hover {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--accent);
}

.play-btn {
  width: 100%;
  padding: 1.25rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Résultat */
.result-message {
  text-align: center;
  min-height: 3rem;
  font-weight: bold;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.result-message.show {
  opacity: 1;
  transform: translateY(0);
}

.result-message.win {
  color: #4ade80;
}

.result-message.lose {
  color: #f87171;
}

/* Payout Table */
.payout-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
}

.payout-table h3 {
  margin: 0 0 1rem 0;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
}

.payout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.payout-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.payout-item .symbol {
  font-size: 2rem;
}

.payout-item .multiplier {
  font-weight: bold;
  color: var(--accent);
}
