:root {
  --bg-dark: #0D0708;
  --bg-card: #2A0E14;
  --gold-main: #E8B84B;
  --gold-light: #F6D57E;
  --red-dark: #5C0E1A;
  --red-bright: #8C1626;
  --text-light: #FCEBD0;
  
  /* Rozmiar kom?rki owocu - dopasowuje si? p?ynnie do szeroko?ci ekranu */
  --cell-size: clamp(65px, 22vw, 100px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Georgia', serif;
}

body {
  background: radial-gradient(circle at 50% 30%, var(--bg-card) 0%, var(--bg-dark) 100%);
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Responsywny Header i Footer --- */
header, footer {
  background: rgba(13, 7, 8, 0.95);
  border-bottom: 2px solid var(--gold-main);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
}

footer {
  border-bottom: none;
  border-top: 2px solid var(--gold-main);
  margin-top: auto;
  font-size: 0.85rem;
  color: #a28d7d;
  justify-content: center;
  text-align: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold-light);
}

.logo-container svg {
  width: 40px;
  height: 40px;
}

nav {
  display: flex;
  gap: 15px;
}

nav a {
  color: var(--gold-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
  transition: color 0.3s;
}

nav a:hover {
  color: #fff;
}

/* --- Main Layout & Responsywna Maszyna --- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  width: 100%;
}

.machine-container {
  background: linear-gradient(145deg, var(--bg-card), #19080c);
  padding: clamp(15px, 4vw, 30px);
  border-radius: 24px;
  box-shadow: 0 0 35px rgba(232, 184, 75, 0.25), inset 0 0 15px rgba(0,0,0,0.8);
  border: 3px solid var(--gold-main);
  text-align: center;
  position: relative;
  width: 100%;
  max-width: calc(var(--cell-size) * 3 + 80px); /* Idealne dopasowanie do szeroko?ci owoc?w */
}

/* Tablica Kredyt?w */
.dashboard {
  display: flex;
  justify-content: space-around;
  background: rgba(13, 7, 8, 0.8);
  padding: 10px 5px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--gold-main);
  font-size: clamp(11px, 3vw, 14px);
}

.stat-value {
  font-size: clamp(16px, 5vw, 22px);
  font-weight: bold;
  color: var(--gold-light);
}

/* Siatka i B?bny (Viewport) */
.slot-viewport {
  position: relative;
  height: calc(var(--cell-size) * 3 + 20px);
  background: #000;
  border-radius: 14px;
  padding: 8px;
  border: 3px solid var(--red-bright);
  overflow: hidden;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  height: 100%;
}

.reel {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--red-dark) 50%, var(--bg-card) 100%);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gold-main);
}

/* Pojedynczy Symbol */
.symbol {
  height: var(--cell-size);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--cell-size) * 0.55); /* Rozmiar emoji skaluje si? z b?bnem */
  user-select: none;
}

.symbol.winner {
  animation: pulse 0.6s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--gold-light)); }
  100% { transform: scale(1.1); filter: drop-shadow(0 0 10px var(--gold-light)); }
}

/* Przycisk Zakr?? */
.btn {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-main) 100%);
  color: #000;
  border: none;
  padding: clamp(12px, 3vw, 16px) clamp(30px, 8vw, 50px);
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 5px 15px rgba(232, 184, 75, 0.4);
  transition: transform 0.2s;
  width: 100%;
  max-width: 280px;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { background: #444; color: #888; cursor: not-allowed; box-shadow: none; }

/* --- Responsywne Tabele i Podstrony --- */
.table-container {
  width: 100%;
  max-width: 800px;
  background: var(--bg-card);
  border: 2px solid var(--gold-main);
  border-radius: 16px;
  padding: clamp(15px, 4vw, 25px);
  margin: 20px auto;
  overflow-x: auto; /* Przewijanie na ma?ych ekranach w razie potrzeby */
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: clamp(12px, 3.5vw, 15px);
}

th, td {
  padding: clamp(8px, 2vw, 12px);
  text-align: left;
  border-bottom: 1px solid rgba(232, 184, 75, 0.2);
}

th { color: var(--gold-light); border-bottom: 2px solid var(--gold-main); }

/* Poprawka przeskoku animacji w JS dla dynamicznej wysoko?ci */
.symbol-container {
  display: flex;
  flex-direction: column;
}
