/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Fredoka+One&family=Nunito:wght@400;700;900&display=swap');

/* =========================================
   GLOBALNE USTAWIENIA (Reset CSS)
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: #03020d; 
  /* Tło z menu przypięte na stałe do body, by nie znikało po kliknięciu */
  background-image: url('assets/tlo-menu.png'), radial-gradient(ellipse at 40% 30%, #1a0535 0%, #06020f 60%, #000000 100%);
  background-size: cover;
  background-position: center top; 
  background-repeat: no-repeat;
  overflow: hidden;    /* Wyłączamy paski przewijania (scrollbary) */
  font-family: 'Nunito', sans-serif;
  color: #fff;
  user-select: none;   /* Zapobiega przypadkowemu zaznaczaniu tekstu myszką */
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(circle, rgba(3,2,13,0.55) 0%, rgba(0,0,0,0.92) 100%);
  z-index: -2;
  pointer-events: none;
}

/* Warstwa tła w samej grze - pojawia się po kliknięciu ZACZNIJ GRĘ */
#game-bg {
  position: fixed; inset: 0;
  background-color: #02010a;
  background-image: url('assets/tlo-gra.png');
  background-position: center top; 
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 1.5s ease-in-out;
}

#game-bg.active { opacity: 1; }


/* =========================================
   PASEK TYTUŁU (Tylko dla aplikacji Electron)
   ========================================= */
#titlebar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 32px;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 9999; /* Zawsze na samej górze */
  -webkit-app-region: drag; /* Pozwala na przeciąganie okna za ten pasek */
  border-bottom: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(5px);
}

#titlebar-title {
  font-family: 'Bangers', cursive;
  font-size: 14px;
  letter-spacing: 2px;
  color: #ff6b35;
  -webkit-app-region: no-drag; /* Wyłącza przeciąganie na samym tekście */
}

#titlebar-controls {
  display: flex;
  gap: 8px;
  -webkit-app-region: no-drag; /* Przyciski muszą być klikalne, a nie do przeciągania */
}

/* Przyciski kontrolne - Owieczki KAPKA */
.tb-btn {
  width: 30px; /* Zwiększono z 14px, aby owieczki były widoczne */
  height: 30px;
  border-radius: 0; /* Reset zaokrąglenia dla obrazków */
  border: none;
  cursor: pointer;
  display: flex; 
  align-items: center; 
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent; /* Usuwamy stare kolory tła */
}

/* Efekt najechania - owieczka lekko rośnie */
.tb-btn:hover { 
  transform: scale(1.2); 
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* Przypisanie konkretnych plików graficznych */
#btn-min { 
  background-image: url('assets/ui/guziki/mini.png'); 
}

#btn-max { 
  background-image: url('assets/ui/guziki/maxi.png'); 
}

#btn-close { 
  background-image: url('assets/ui/guziki/exit.png'); 
}


/* =========================================
   GŁÓWNY KONTENER GRY
   ========================================= */
#app {
  position: fixed;
  top: 32px; /* Odsunięcie od góry na wysokość paska tytułu */
  left: 0; right: 0; bottom: 0;
}

/* Miejsce, gdzie PixiJS rysuje grafikę gry (planszę, gwiazdy) */
#pixi-canvas {
  display: block;
  width: 100%;
  height: 100%;
}


/* =========================================
   MENU GŁÓWNE (Ekran powitalny)
   ========================================= */
#main-menu {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 150;
  overflow: hidden;
}

/* Animacja lewitowania logo głównego */
.menu-logo {
  max-width: 600px;
  margin-bottom: 60px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 10px 25px rgba(0,0,0,0.8));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Stylowanie przycisków w Menu Głównym */
.menu-buttons {
  display: flex; flex-direction: column; gap: 16px;
  width: 320px;
}

.mm-btn {
  padding: 18px;
  background: rgba(10, 10, 26, 0.85);
  border: 2px solid rgba(255, 45, 157, 0.4);
  border-radius: 16px;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 28px;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Bardzo płynne przejście */
  backdrop-filter: blur(10px);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden; /* Utrzymuje animację połysku wewnątrz przycisku */
}

/* Animacja "połysku" przelatującego przez przycisk po najechaniu */
.mm-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}
.mm-btn:hover::after { left: 150%; } /* Przelot z lewej do prawej */

/* Efekt po najechaniu na przycisk w menu */
.mm-btn:hover {
  background: rgba(255, 45, 157, 0.2);
  border-color: #ff2d9d;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255,45,157,0.4);
  color: #fff;
}

/* Efekt "wjeżdżania" przycisków po uruchomieniu aplikacji */
.mm-btn { animation: slideUp 0.5s ease forwards; opacity: 0; }
.mm-btn:nth-child(1) { animation-delay: 0.1s; }
.mm-btn:nth-child(2) { animation-delay: 0.2s; }
.mm-btn:nth-child(3) { animation-delay: 0.3s; }
.mm-btn:nth-child(4) { animation-delay: 0.4s; }

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


/* =========================================
   EKRAN LOBBY (Wybór graczy, połączenie z Twitchem)
   ========================================= */
#lobby {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 100;
  transition: opacity 0.4s ease; /* Zapewnia płynne pokazywanie się lobby */
}

#lobby.hidden { 
  opacity: 0; 
  pointer-events: none; 
  z-index: -1; 
}

/* Klasa dla pomniejszonego logo w lobby */
.lobby-logo {
  max-width: 320px;
  margin-bottom: 10px;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.8));
}

.logo-sub {
  font-family: 'Fredoka One', cursive;
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 30px;
}

/* Okienko z ustawieniami gry w lobby */
.lobby-panel {
  background: rgba(10, 10, 26, 0.85); /* Spójne z menu */
  border: 2px solid rgba(255, 45, 157, 0.4);
  border-radius: 24px;
  padding: 32px 40px;
  width: 580px;
  backdrop-filter: blur(10px); /* Efekt szkła (rozmycie tła za okienkiem) */
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.panel-title {
  font-family: 'Fredoka One', cursive;
  font-size: 22px;
  color: #ff2d9d; /* Spójne z menu */
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Siatka slotów na graczy (2 kolumny) */
.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  max-height: 280px; /* Zabezpieczenie wysokości */
  overflow-y: auto;  /* Aktywacja przewijania */
  padding-right: 10px; /* Miejsce na suwak */
}

/* Własny wygląd suwaka tylko dla siatki graczy */
.players-grid::-webkit-scrollbar { width: 6px; }
.players-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.players-grid::-webkit-scrollbar-thumb { background: #ff2d9d; border-radius: 4px; }

.player-slot {
  background: rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.player-slot:hover {
  border-color: rgba(168,85,247,0.5);
  background: rgba(168,85,247,0.1);
}

/* Klasa aktywna dla wybranego gracza/slotu */
.player-slot.active {
  border-color: var(--pcolor);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 20px color-mix(in srgb, var(--pcolor) 30%, transparent);
}

.player-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--pcolor, #444);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.player-info { flex: 1; min-width: 0; }

/* Pole wpisywania nazwy gracza */
.player-name-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
}
.player-name-input::placeholder { color: rgba(255,255,255,0.3); }

.player-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Pasek połączenia z Twitchem */
.twitch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  background: rgba(100,65,165,0.2);
  border: 1px solid rgba(100,65,165,0.4);
  border-radius: 12px;
  padding: 12px 16px;
}

.twitch-icon { font-size: 22px; }

.twitch-input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.twitch-input:focus { border-color: #9147ff; background: rgba(0,0,0,0.5); }

/* Kropeczka statusu (połączyło/nie połączyło) */
.twitch-status {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #666;
  transition: all 0.3s;
}
.twitch-status.connected { background: #00d47e; box-shadow: 0 0 10px #00d47e; }
.twitch-status.error { background: #ff4444; box-shadow: 0 0 10px #ff4444; }

/* Wiersz z dropdownami (Listy wyboru w ustawieniach) */
.settings-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.setting-group { flex: 1; }

.setting-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.setting-select {
  width: 100%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.setting-select:focus { border-color: #a855f7; }

/* Główny przycisk startu gry w lobby */
.btn-start {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #ff6b35, #ff2d9d);
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 30px;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 25px rgba(255,45,157,0.4);
}
.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255,45,157,0.6);
}
.btn-start:active { transform: translateY(0); box-shadow: 0 4px 15px rgba(255,45,157,0.4); }


/* =========================================
   HUD (INTERFEJS W TRAKCIE GRY)
   ========================================= */
#hud {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; /* Pozwala klikać "przez" pusty HUD w planszę pod spodem */
  z-index: 50;
  display: none;
}

#hud.visible { display: block; }

/* ---- BOX NA ŚRODKU PLANSZY (Logo + Ostatnie powiadomienie) ---- */
#center-board-box {
  position: absolute;
  /* Zostawiamy centrowanie w poziomie */
  left: 50%;
  transform: translateX(-50%); 
  
  /* ---> NOWA POZYCJA: BLISKO DOŁU <--- */
  bottom: 80px; /* Odstęp od dolnego rzędu pól (dopasuj wg uznania) */
  
  /* Wyłączamy stare centrowanie pionowe, jeśli było */
  top: auto; 
  
  z-index: 10; /* Logo pod banerem eventów */
  pointer-events: none;
  
  /* Opcjonalnie: lekkie zmniejszenie loga, jeśli na dole jest ciaśniej */
  /* transform: translateX(-50%) scale(0.85); */
}

/* Duże logo na środku */
.center-logo {
  max-width: 450px; /* Dopasuj wg upodobań, by pasowało na środek 50 pól */
  filter: drop-shadow(0 10px 25px rgba(0,0,0,0.6));
  animation: floatCenter 5s ease-in-out infinite;
  margin-bottom: -15px; /* Przybliża logo do napisu pod nim */
}

@keyframes floatCenter {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
}

/* Napis "BOARD GAME OF CHAOS" pod głównym logiem */
.center-subtitle {
  font-family: 'Fredoka One', cursive;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 25px;
}

/* Box w którym wyświetli się tekst powiadomień np. "Gracz 1 zebrał 3 monety!" */
#center-event-log {
  background: rgba(10, 10, 26, 0.7);
  border: 1px solid rgba(255, 45, 157, 0.3);
  border-radius: 12px;
  padding: 12px 24px;
  min-width: 300px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  opacity: 0; /* Domyślnie schowane */
  transition: opacity 0.3s ease;
}
#center-event-log.show { opacity: 1; }


/* ---- BOX DLA LISTY GRACZY (Lewy Górny Róg) ---- */
#players-hud-container {
  position: absolute;
  top: 12px; 
  left: 12px;
  pointer-events: all;
}

#players-hud {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phud-card {
  background: rgba(0,0,0,0.5);
  border: 2px solid var(--pcolor);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  transition: all 0.3s;
}

/* Wyróżnienie karty gracza, którego jest tura */
/* Wymuszenie usunięcia starego tła podczas aktywnej tury */
.phud-card.active-turn {
  background: transparent !important;
  box-shadow: none !important;
}

.phud-avatar { font-size: 24px; }
.phud-info { flex: 1; }

.phud-name {
  font-family: 'Fredoka One', cursive;
  font-size: 15px;
  color: var(--pcolor);
}

.phud-stats {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.phud-stat { display: flex; align-items: center; gap: 3px; }
.phud-items { display: flex; gap: 3px; }

.item-badge {
  font-size: 14px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}

/* Baner z napisem czyja to tura (wyskakuje na chwilę) */
#turn-banner {
  position: absolute;
  top: 40%; /* Przesunięte ciut wyżej, by nie zasłaniać środkowego loga */
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0,0,0,0.9);
  border: 3px solid var(--pcolor, #fff);
  border-radius: 20px;
  padding: 16px 40px;
  text-align: center;
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

#turn-banner.show { transform: translate(-50%, -50%) scale(1); }

#turn-banner-name {
  font-family: 'Bangers', cursive;
  font-size: 48px;
  color: var(--pcolor, #fff);
  text-shadow: 0 0 20px var(--pcolor, #fff);
}

#turn-banner-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 4px;
}

/* System kostki do gry */
#dice-container {
  position: absolute;
  bottom: 50px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  pointer-events: all;
  width: 190px;
}

#dice-display {
  width: 100%;
  height: 70px;
  background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.1s;
  order: 1;
}


/* Animacja trzęsienia kostką podczas rzutu */
#dice-display.rolling {
  animation: diceRoll 0.5s ease-in-out;
}

@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(-15deg) scale(1.1); }
  75% { transform: rotate(10deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Przycisk do rzutu kostką */
#btn-roll {
  padding: 0 28px;
  min-height: 82px;
  background: linear-gradient(135deg, #ff2d9d, #a855f7, #ff2d9d);
  background-size: 200% 200%;
  animation: rollBtnPulse 3s ease infinite;
  border: none;
  border-radius: 18px;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 26px;
  letter-spacing: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
  box-shadow: 0 0 40px rgba(255,45,157,0.55), 0 4px 20px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

#btn-roll::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: 0.6s;
}
#btn-roll:not(:disabled):hover::after { left: 150%; }

@keyframes rollBtnPulse {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 0 35px rgba(255,45,157,0.5), 0 4px 20px rgba(0,0,0,0.5); }
  50% { background-position: 100% 50%; box-shadow: 0 0 55px rgba(168,85,247,0.7), 0 4px 24px rgba(0,0,0,0.5); }
}

#btn-roll:not(:disabled):hover { 
  transform: translateY(-3px) scale(1.03); 
  box-shadow: 0 0 60px rgba(255,45,157,0.8), 0 8px 28px rgba(0,0,0,0.5); 
}
#btn-roll:disabled { opacity: 0.4; cursor: not-allowed; transform: none; animation: none; box-shadow: none; }


/* =========================================
   TWITCH INTEGRACJE (Czat i Ankiety)
   ========================================= */
#twitch-feed {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 280px;
  max-height: 200px;
  overflow: hidden;
  pointer-events: none;
  /* Sprawia, że wiadomości zanikają u góry (wygląda to dużo lepiej!) */
  mask-image: linear-gradient(to top, rgba(0,0,0,1) 80%, rgba(0,0,0,0));
}

.chat-message {
  background: rgba(0,0,0,0.7);
  border-left: 3px solid #9147ff;
  border-radius: 0 8px 8px 0;
  padding: 6px 12px;
  margin-bottom: 4px;
  font-size: 13px;
  animation: slideInChat 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(2px);
}

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

.chat-user { color: #9147ff; font-weight: 700; }
.chat-text { color: rgba(255,255,255,0.9); }

/* Okno Ankiety Twitcha */
#twitch-poll {
  position: absolute;
  bottom: 220px;
  right: 12px;
  width: 300px;
  background: rgba(0,0,0,0.85);
  border: 2px solid #9147ff;
  border-radius: 16px;
  padding: 16px;
  display: none;
  pointer-events: all;
  box-shadow: 0 10px 30px rgba(145,71,255,0.3);
}

#twitch-poll.visible { display: block; animation: slideInChat 0.4s ease; }

.poll-title {
  font-family: 'Fredoka One', cursive;
  font-size: 16px;
  color: #9147ff;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

.poll-option {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

/* Pasek postępu dla opcji w ankiecie */
.poll-option-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(145,71,255,0.25);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.poll-option-text { position: relative; z-index: 1; }
.poll-option-votes { position: relative; z-index: 1; color: #9147ff; font-weight: 700; }

.poll-timer {
  text-align: center;
  margin-top: 10px;
  font-size: 22px;
  font-family: 'Bangers', cursive;
  color: #ff6b35;
}


/* =========================================
   ZDARZENIA, SKLEP I PASKI INFORMACYJNE
   ========================================= */
   
/* Popup dla losowych zdarzeń (np. pole Event) */
#event-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 300;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
}

#event-popup.show { transform: translate(-50%, -50%) scale(1); }

.event-card {
  background: linear-gradient(135deg, rgba(10,10,26,0.95), rgba(26,10,50,0.95));
  border: 2px solid var(--ecolor, #ff6b35);
  border-radius: 24px;
  padding: 30px 40px;
  min-width: 360px;
  box-shadow: 0 0 60px color-mix(in srgb, var(--ecolor, #ff6b35) 40%, transparent);
}

.event-icon { font-size: 64px; margin-bottom: 12px; }
.event-title {
  font-family: 'Bangers', cursive;
  font-size: 38px;
  color: var(--ecolor, #ff6b35);
}
.event-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-top: 8px;
}

/* =========================================
   SKLEP WERSJA PRO (Szeroki z animacjami)
   ========================================= */
#shop-panel {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 250;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#shop-panel.visible {
  opacity: 1;
  pointer-events: all;
}

/* Rozmyte tło przykrywające planszę */
.shop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 20, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.shop-bg {
  position: relative;
  z-index: 2;
  width: 95vw;
  max-width: 1200px; /* Szerszy kontener pozwala na zmieszczenie 5 kolumn */
  background: linear-gradient(135deg, rgba(15,12,38,0.95), rgba(26,10,50,0.98));
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 28px;
  padding: 35px 45px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.8), 0 0 50px rgba(255,215,0,0.15);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#shop-panel.visible .shop-bg {
  transform: scale(1) translateY(0);
}

/* GÓRNY PASEK: Tytuł i Monety */
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  border-bottom: 2px solid rgba(255,255,255,0.08);
  padding-bottom: 15px;
}

.shop-title {
  font-family: 'Bangers', cursive;
  font-size: 46px;
  color: #ffd700;
  text-shadow: 0 4px 15px rgba(255,215,0,0.4);
  letter-spacing: 2px;
  margin: 0;
}

.shop-wallet {
  font-family: 'Fredoka One', cursive;
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.5);
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid rgba(255,215,0,0.3);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.shop-wallet span {
  color: #00ffcc;
  font-size: 26px;
  margin-left: 8px;
  text-shadow: 0 0 10px rgba(0,255,204,0.4);
}

/* SIATKA 5 KOLUMN */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 elementów w jednym rzędzie */
  gap: 16px;
  margin-bottom: 25px;
}

.shop-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 2px solid rgba(255,215,0,0.15);
  border-radius: 18px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  
  /* Animacja z JS będzie nimi sterować */
  opacity: 0;
  transform: translateY(20px);
  animation: shopItemIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes shopItemIn {
  to { opacity: 1; transform: translateY(0); }
}

.shop-item:hover:not(.locked) {
  border-color: #ffd700;
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(255,215,0,0.2);
}

.shop-item-icon {
  font-size: 46px;
  margin-bottom: 12px;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.shop-item:hover:not(.locked) .shop-item-icon {
  transform: scale(1.15) rotate(5deg);
}

.shop-item-name {
  font-family: 'Fredoka One', cursive;
  font-size: 16px;
  color: #fff;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.shop-item-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.4;
  flex-grow: 1; /* Wypycha cenę na sam dół */
  margin-bottom: 16px;
}

.shop-item-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: rgba(0,0,0,0.4);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.shop-item-price {
  font-family: 'Fredoka One', cursive;
  font-size: 16px;
  color: #ffd700;
}

.shop-item-btn {
  font-family: 'Bangers', cursive;
  font-size: 15px;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #000;
  padding: 4px 10px;
  border-radius: 8px;
  transition: 0.2s;
}

.shop-item:hover:not(.locked) .shop-item-btn {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(255,215,0,0.4);
}

/* Zablokowane itemy (Brak kasy / brak miejsca) */
.shop-item.locked {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(80%);
}

.shop-item-lock {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 18px;
  background: rgba(0,0,0,0.8);
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-close-shop {
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 24px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-shop:hover {
  background: rgba(255,45,157,0.2);
  border-color: #ff2d9d;
  box-shadow: 0 10px 25px rgba(255,45,157,0.3);
  transform: translateY(-2px);
}

.btn-close-shop {
  width: 100%;
  padding: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-close-shop:hover { background: rgba(255,255,255,0.2); }

/* =========================================
   POPRAWIONY BANER EVENTÓW (W pętli)
   ========================================= */
#global-event-banner {
  position: absolute;
  left: 50%;
  /* Łączymy centrowanie z delikatnym przesunięciem startowym w górę */
  transform: translate(-50%, -20px); 
  
  /* ---> POZYCJA SPOCZYNKOWA <--- */
  top: 110px; /* Startuje niżej, by nie zasłaniać górnych pól przy wjeździe */
  opacity: 0;
  visibility: hidden; /* Zapewnia, że baner nie blokuje myszki gdy schowany */
  
  /* ---> WYMIARY <--- */
  width: 90%;
  max-width: 850px;
  height: auto; /* Zmieniono na auto, by tekst opisu się nie dusił */
  min-height: 110px;
  padding: 15px 0;
  
  /* Stylizacja tła */
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 45, 157, 0.85) 20%, 
    rgba(168, 85, 247, 0.85) 80%, 
    transparent 100%
  );
  backdrop-filter: blur(8px);
  border-top: 3px solid rgba(255, 255, 255, 0.9);
  border-bottom: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.4);
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  z-index: 1000; /* Bardzo wysoki z-index */
  pointer-events: none;
  
  /* Animacja: dodajemy transform do transition dla płynności */
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.5s;
}

/* ---> STAN AKTYWNY <--- */
#global-event-banner.show {
  top: 195px; /* Stała pozycja wewnątrz Twojej pętli */
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0); /* Płynny "opad" na docelowe miejsce */
}

/* GŁÓWNY TYTUŁ */
#global-event-banner .banner-title {
  font-family: 'Bangers', cursive;
  font-size: 54px;
  color: #fff;
  text-shadow: 3px 3px 0px #000, 0 0 20px rgba(255, 255, 255, 0.5);
  margin: 0;
  line-height: 0.9;
  letter-spacing: 2px;
}

/* OPIS POD SPODEM - Teraz idealnie wycentrowany */
#global-event-banner .banner-desc {
  font-family: 'Bangers', cursive;
  font-size: 19px;
  color: #ffd700; /* Złoty kolor dla lepszej czytelności opisu */
  margin-top: 8px;
  padding: 5px 40px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  
  /* Centrowanie tekstu wewnątrz paska */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Dolny pasek z przyciskami (Zakończ turę, Użyj przedmiotu) */
#action-bar {
  display: none;
}

.action-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(10,10,26,0.85);
  color: rgba(255,255,255,0.9);
  font-family: 'Fredoka One', cursive;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}

.action-btn:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Pasek określający aktualną turę (na górze po środku) */
#turn-order {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 10px;
  background: rgba(0,0,0,0.75);
  border-radius: 999px;
  padding: 8px 20px;
  align-items: center;
  pointer-events: none;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  min-height: 64px;
  z-index: 60;
}

/* Stare .turn-indicator – nadal potrzebne jako bazowy reset, ale nowy JS buduje własny HTML */
.turn-indicator {
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.turn-indicator.current {
  border-color: var(--pcolor);
  box-shadow: 0 0 14px var(--pcolor), 0 0 28px var(--pcolor)55;
}

.turn-indicator.done { opacity: 0.3; }

/* NOWA WIEŻA POWIADOMIEŃ - Wyśrodkowana tuż pod logiem w grze! */
#notification-stack {
  position: absolute;
  top: 60%; 
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; z-index: 300;
}

.notification {
  background: rgba(10,10,26,0.9);
  border: 2px solid #ff2d9d; /* Różowa ramka w stylu menu */
  border-radius: 12px; padding: 12px 24px;
  font-size: 16px; font-weight: 700;
  animation: notifInCenter 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), notifOutCenter 0.3s ease 3s forwards;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(255, 45, 157, 0.4);
}

@keyframes notifInCenter { 
  from { opacity: 0; transform: translateY(20px) scale(0.9); } 
  to { opacity: 1; transform: translateY(0) scale(1); } 
} 
@keyframes notifOutCenter { 
  from { opacity: 1; transform: translateY(0) scale(1); } 
  to { opacity: 0; transform: translateY(-20px) scale(0.9); } 
} 

/* Scrollbary - własny wygląd dla przeglądarki i Electrona */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.8); }
/* =========================================
   NOWE MENU / USTAWIENIA / TWÓRCY / WOW FX
   ========================================= */

#menu-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 110;
  overflow: hidden;
}

#menu-particles::before,
#menu-particles::after {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.18) 0, transparent 18%),
    radial-gradient(circle at 75% 20%, rgba(255, 45, 157, 0.18) 0, transparent 16%),
    radial-gradient(circle at 70% 75%, rgba(0, 212, 255, 0.16) 0, transparent 18%),
    radial-gradient(circle at 30% 80%, rgba(168, 85, 247, 0.15) 0, transparent 20%);
  animation: menuNebula 14s linear infinite;
}

#menu-particles::after {
  animation-duration: 18s;
  animation-direction: reverse;
  filter: blur(20px);
}

@keyframes menuNebula {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}

.menu-shell {
  width: min(1180px, calc(100vw - 60px));
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  z-index: 160;
  position: relative;
}

.menu-left,
.menu-right {
  position: relative;
  z-index: 2;
}

.menu-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.menu-tagline {
  max-width: 560px;
  text-align: center;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  margin: -24px 0 28px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.menu-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.menu-info-card {
  background: rgba(10, 10, 26, 0.72);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}

.menu-card-title {
  font-family: 'Fredoka One', cursive;
  font-size: 22px;
  color: #ffb56d;
  margin-bottom: 10px;
}

.menu-card-text {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.84);
}

.floating-card {
  animation: cardFloat 5.8s ease-in-out infinite;
}

.floating-card.delay-1 {
  animation-delay: 1.2s;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.menu-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(35px);
  opacity: 0.42;
  pointer-events: none;
  z-index: 120;
  animation: orbDrift 8s ease-in-out infinite;
}

.orb-1 {
  width: 180px;
  height: 180px;
  left: 12%;
  top: 18%;
  background: rgba(255, 107, 53, 0.4);
}

.orb-2 {
  width: 240px;
  height: 240px;
  right: 12%;
  top: 24%;
  background: rgba(255, 45, 157, 0.35);
  animation-delay: 1s;
}

.orb-3 {
  width: 220px;
  height: 220px;
  right: 20%;
  bottom: 18%;
  background: rgba(0, 212, 255, 0.26);
  animation-delay: 2s;
}

@keyframes orbDrift {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-16px) scale(1.06); }
}

.mm-btn-primary {
  background: linear-gradient(135deg, #ff6b35, #ff2d9d);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 26px rgba(255,45,157,0.35);
}

.mm-btn-primary:hover {
  background: linear-gradient(135deg, #ff7d48, #ff47a7);
}

.menu-modal {
  position: absolute;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.menu-modal.visible {
  opacity: 1;
  pointer-events: all;
}

.menu-modal.hidden {
  display: none;
}

.menu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 18, 0.68);
  backdrop-filter: blur(9px);
}

.menu-modal-card {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 28px;
  background: rgba(12, 10, 28, 0.84);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s ease;
}

.menu-modal.visible .menu-modal-card {
  transform: translateY(0) scale(1);
}

.wow-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    rgba(12, 10, 28, 0.86);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 0 60px rgba(168,85,247,0.14);
}

.menu-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s ease;
}

.menu-modal-close:hover {
  background: rgba(255,255,255,0.16);
  transform: scale(1.06);
}

.modal-title {
  font-family: 'Bangers', cursive;
  font-size: 50px;
  letter-spacing: 3px;
  color: #ffb56d;
  text-shadow: 0 5px 18px rgba(255,107,53,0.3);
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin-bottom: 26px;
}

.play-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.play-form-code {
  grid-column: 1 / -1;
}

.play-form-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.play-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.7);
}

.play-input-main {
  font-size: 18px !important;
  padding: 14px !important;
  text-align: center;
  font-weight: 900;
}

.room-code-input {
  font-size: 20px !important;
  text-align: center;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 3px;
}

.play-actions {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}

.play-actions .mm-btn {
  flex: 1;
}

.play-helper-box {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.play-helper-title {
  font-family: 'Fredoka One', cursive;
  color: #00d4ff;
  margin-bottom: 6px;
}

.play-helper-text {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
}

.settings-panel {
  width: min(980px, calc(100vw - 40px));
}

.settings-grid-extended {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.setting-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 18px;
}

.setting-box-title {
  font-family: 'Fredoka One', cursive;
  font-size: 18px;
  color: #ff9ad1;
  margin-bottom: 14px;
}

.setting-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
}

.setting-switch-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #ff2d9d;
  cursor: pointer;
}

.menu-range {
  width: 100%;
  margin-top: 10px;
  accent-color: #ff2d9d;
}

.settings-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.creators-panel {
  width: min(900px, calc(100vw - 40px));
}

.creators-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.creator-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.creator-main {
  border-color: rgba(255,107,53,0.35);
  box-shadow: 0 0 30px rgba(255,107,53,0.12);
}

.creator-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.creator-name {
  font-family: 'Bangers', cursive;
  font-size: 36px;
  letter-spacing: 2px;
  color: #fff;
}

.creator-role {
  font-size: 14px;
  color: #ffb56d;
  margin: 6px 0 12px 0;
  font-weight: 800;
}

.creator-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
}

.lobby-title-bar {
  gap: 18px;
}

.lobby-room-box {
  background: rgba(0,0,0,0.45);
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,212,255,0.45);
  min-width: 240px;
}
.lobby-room-box {
  margin-left: auto;
}

.lobby-room-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.lobby-room-label {
  font-size: 11px;
  color: #aaa;
  letter-spacing: 1px;
}

.copy-room-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #00d4ff, #0ea5e9);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.copy-room-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,212,255,0.25);
}

.lobby-room-code-value {
  font-family: 'Bangers', cursive;
  font-size: 28px;
  color: #00d4ff;
  letter-spacing: 3px;
}

.lobby-panel {
  width: min(760px, calc(100vw - 40px));
  position: relative;
  overflow: hidden;
}

.lobby-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.03), transparent 45%, rgba(255,255,255,0.03));
  pointer-events: none;
}

.lobby-decor-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  pointer-events: none;
  animation: ringSpin 14s linear infinite;
}

.ring-a {
  width: 180px;
  height: 180px;
  left: 8%;
  top: 22%;
  border-color: rgba(255,45,157,0.22);
}

.ring-b {
  width: 250px;
  height: 250px;
  right: 10%;
  bottom: 12%;
  border-color: rgba(0,212,255,0.18);
  animation-direction: reverse;
  animation-duration: 18s;
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#lobby {
  z-index: 180;
}

#main-menu,
#lobby,
.menu-modal-card,
.menu-info-card,
.lobby-panel {
  will-change: transform, opacity;
}

#main-menu {
  animation: menuFadeIn 0.55s ease;
}

#lobby:not(.hidden) {
  animation: lobbyRiseIn 0.45s ease;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: scale(1.01); }
  to { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 1080px) {
  .menu-shell {
    grid-template-columns: 1fr;
    width: min(760px, calc(100vw - 30px));
    padding-top: 12px;
  }

  .menu-right {
    display: none;
  }

  .menu-logo {
    max-width: min(90vw, 480px);
    margin-bottom: 36px;
  }

  .modal-title {
    font-size: 40px;
  }

  .play-form-grid,
  .settings-grid-extended,
  .creators-grid {
    grid-template-columns: 1fr;
  }

  .lobby-panel {
    width: min(95vw, 760px);
    padding: 24px;
  }

  .panel-title.lobby-title-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-row {
    flex-direction: column;
  }
}

@media (max-height: 820px) {
  .menu-logo {
    max-width: 440px;
    margin-bottom: 30px;
  }

  .menu-tagline {
    margin-bottom: 20px;
  }

  .menu-buttons {
    gap: 12px;
  }

  .mm-btn {
    padding: 15px;
    font-size: 24px;
  }
}
/* =========================================
   FIX INPUTÓW / FOCUS / KLIKALNOŚĆ W MODALACH
   ========================================= */

#play-menu,
#settings-modal,
#creators-modal {
  pointer-events: none;
}

#play-menu.visible,
#settings-modal.visible,
#creators-modal.visible {
  pointer-events: all;
}

.menu-modal-card,
.menu-modal-card * {
  pointer-events: auto;
}

#login-panel,
.play-form-grid,
.play-form-block,
.play-actions {
  position: relative;
  z-index: 5;
}

#mm-nick,
#mm-twitch,
#mm-room-code,
#twitch-channel,
.setting-select,
.menu-range,
.setting-switch-row input,
.play-actions button,
.menu-modal-close,
.copy-room-btn {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
}

#mm-nick,
#mm-twitch,
#mm-room-code,
#twitch-channel {
  position: relative;
  z-index: 10;
  cursor: text;
}

#mm-nick:focus,
#mm-twitch:focus,
#mm-room-code:focus,
#twitch-channel:focus,
.setting-select:focus {
  outline: none;
  border-color: #ff2d9d !important;
  box-shadow: 0 0 0 3px rgba(255, 45, 157, 0.18), 0 0 18px rgba(255, 45, 157, 0.18);
  background: rgba(0,0,0,0.55);
}

.menu-modal-backdrop {
  pointer-events: auto;
}

.menu-modal-card {
  pointer-events: auto;
}
/* =========================================
   ROZBUDOWANA SEKCJA TWÓRCÓW
   ========================================= */

.creators-panel-wide {
  width: min(1100px, calc(100vw - 40px));
}

.creators-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.creator-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 30px rgba(0,0,0,0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.creator-row:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 16px 34px rgba(0,0,0,0.22);
}

.creator-row-main {
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 30px rgba(255,255,255,0.05),
    0 16px 34px rgba(0,0,0,0.22);
}

.creator-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-align: center;
}

.creator-role-badge-idea {
  background: linear-gradient(135deg, rgba(168,85,247,0.22), rgba(168,85,247,0.08));
  border-color: rgba(168,85,247,0.3);
}

.creator-role-badge-events {
  background: linear-gradient(135deg, rgba(0,187,255,0.18), rgba(191,244,250,0.08));
  border-color: rgba(0,187,255,0.3);
}

.creator-role-badge-test {
  background: linear-gradient(135deg, rgba(255,149,0,0.18), rgba(255,149,0,0.08));
  border-color: rgba(255,149,0,0.3);
}

.creator-content {
  display: flex;
  flex-direction: column;
}

.creator-name {
  font-family: 'Bangers', cursive;
  font-size: 40px;
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 8px;
}

.creator-name-silver {
  background: linear-gradient(135deg, #f4f4f4 0%, #d8d8d8 30%, #ffffff 50%, #bfc3c9 70%, #f7f7f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255,255,255,0.18));
}

.creator-name-violet {
  color: #a855f7;
  text-shadow: 0 0 18px rgba(168,85,247,0.35);
}

.creator-name-holo {
  background: linear-gradient(135deg, #00bbff 0%, #7de9ff 30%, #bff4fa 55%, #00bbff 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: holoShift 4.2s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(0,187,255,0.24));
}

.creator-name-orange {
  color: #ff9500;
  text-shadow: 0 0 18px rgba(255,149,0,0.28);
}

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

.creator-role-line {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,0.72);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.creator-desc {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.84);
}

@media (max-width: 900px) {
  .creator-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .creator-role-badge {
    width: fit-content;
  }

  .creator-name {
    font-size: 34px;
  }
}
/* =========================================
   MENU PAUZY (ESC)
   ========================================= */

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.pause-overlay.hidden {
  display: none;
}

.pause-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.pause-panel {
  position: relative;
  z-index: 2;
  width: min(520px, calc(100vw - 40px));
  padding: 32px 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(10,10,26,0.96), rgba(35,16,58,0.94));
  border: 2px solid rgba(255, 45, 157, 0.35);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    0 0 30px rgba(255,45,157,0.15);
  text-align: center;
  animation: pausePopIn 0.22s ease;
}

@keyframes pausePopIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pause-title {
  font-family: 'Bangers', cursive;
  font-size: 54px;
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ff6b35, #ff2d9d, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pause-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  margin-bottom: 26px;
}

.pause-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pause-btn {
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: 'Fredoka One', cursive;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.pause-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.pause-btn-primary {
  background: linear-gradient(135deg, #ff6b35, #ff2d9d);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(255,45,157,0.25);
}

.pause-btn-danger {
  border-color: rgba(255, 91, 91, 0.28);
  background: rgba(255, 91, 91, 0.08);
}
.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.color-option {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.color-option:hover {
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(255,255,255,0.25);
}

.color-option.active {
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255,255,255,0.45);
  transform: scale(1.12);
}
/* ---- KARTA GRACZA (Nowy layout oparty na tle) ---- */
.phud-card {
  /* Resetujemy stare tła, pozwalamy samej grafice robić robotę */
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px; /* Dopasuj w razie potrzeby */
  transition: all 0.3s;
}

/* Wyróżnienie aktywnej tury (np. poświata całego obrazka) */
.phud-card.active-turn .phud-card-inner {
  filter: drop-shadow(0 0 12px var(--pcolor));
  transform: scale(1.05);
}

.phud-card-inner {
  position: relative;
  width: 250px; /* SZEROKOŚĆ KARTY - dopasuj do faktycznego rozmiaru grafiki z Photoshopa */
  display: block;
  transition: all 0.3s;
}

/* Główny obrazek karty (np. card_red.png) */
.phud-card-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

/* Kółko na awatar */
.phud-avatar-wrap {
  position: absolute;
  top: 13%;    /* Przesuwaj góra/dół (%) */
  left: 6%;    /* Przesuwaj lewo/prawo (%) */
  width: 27%;  /* Wielkość kółka w stosunku do szerokości karty */
  aspect-ratio: 1; /* Zawsze idealne koło */
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5); /* Zapasowe tło, gdy ładuje się obrazek */
}

.phud-avatar-wrap {
  position: absolute;
  
  /* POZYCJONOWANIE CAŁEGO KOŁA */
  top: 30px;  /* Przesuwanie góra/dół */
  left: 13px; /* Przesuwanie lewo/prawo */
  
  /* SKALOWANIE CAŁEGO KOŁA */
  width: 44px;      /* Zmieniając tę wartość, skalujesz całe koło */
  aspect-ratio: 1;  /* Zapewnia, że koło zawsze będzie idealnie okrągłe */
  
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 5;
}

.phud-avatar-img {
  /* Obrazek zawsze wypełnia 100% przeskalowanego koła */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* style.css */
.phud-name {
  position: absolute;
  top: 10px;        /* Wysokość paska na grafice card_color.png */
  left: 6%;        /* Zaczynamy za awatarem */
  right: 5%;        /* Margines od prawej krawędzi */
  
  /* KLUCZ DO WYŚRODKOWANIA: */
  display: flex;
  justify-content: center; /* Centrowanie w poziomie */
  align-items: center;     /* Centrowanie w pionie */
  text-align: center;
  
  font-family: 'Fredoka One', cursive;
  font-size: 13px;  /* Możesz ciut powiększyć, skoro jest wycentrowane */
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Jeśli nick będzie za długi, doda kropki (...) */
}

/* Wspólny styl na cyferki statystyk */
.phud-val {
  position: absolute;
  font-family: 'Fredoka One', cursive;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  z-index: 2;
  text-align: center;
  width: 40px; /* Pomaga wyśrodkować tekst na dedykowanym okienku w grafice */
}

/* ----- PRECYZYJNE POZYCJONOWANIE NA KARTACH ----- */
/* Dostosuj te procenty, aby tekst wylądował idealnie w rowkach na obrazku */

.phud-coins {
  top: 30%;      /* Oś Y: góra/dół */
  right: 5%;    /* Oś X: od prawej krawędzi */
}

.phud-laps {
  bottom: 19%;   /* Oś Y: od dołu grafiki */
  left: 44%;     /* Oś X: od lewej krawędzi (sekcja RUNDY na dole po lewej) */
}

.phud-pos {
  bottom: 19%;   /* Oś Y: od dołu grafiki */
  right: 7%;    /* Oś X: od prawej krawędzi (sekcja POZYCJA na dole po prawej) */
}

/* Małe itemy pod kartą - UKRYTE */
.phud-items {
  display: none; /* Całkowicie wyłącza wyświetlanie przedmiotów w tym miejscu */
}
/* Styl dla przewijanej listy instrukcji */
#howto-modal .creators-list::-webkit-scrollbar {
    width: 6px;
}
#howto-modal .creators-list::-webkit-scrollbar-thumb {
    background: #ff2d9d;
    border-radius: 10px;
}
#howto-modal .creator-desc b {
    color: #ff9cf5;
}
/* Zdefiniuj bazowe pozycjonowanie loga (upewnij się, że tak jest) */
#center-board-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* To trzyma logo na środku */
  z-index: 2;
  pointer-events: none;
}

/* Nowa animacja: operuje TYLKO na rotacji */
@keyframes logo-seizure {
  0% { rotate: 0deg; }
  20% { rotate: -4deg; }
  40% { rotate: 4deg; }
  60% { rotate: -4deg; }
  80% { rotate: 4deg; }
  100% { rotate: 0deg; }
}

.shake-active {
  /* Dodajemy 'important' żeby mieć pewność, że nic tego nie ruszy */
  animation: logo-seizure 0.2s ease-in-out !important;
}
/* --- STYLIZACJA OBRAZKOWEGO GUZIKA DISCORD --- */
.discord-anchor {
  position: fixed;
  right: 50px; /* Przesunięty lekko od krawędzi (Image 2) */
  bottom: 50px; /* Przesunięty lekko od dołu (Image 2) */
  text-decoration: none;
  z-index: 200;
  display: block;
  /* Przygotowanie pod ewentualny blask CSS pod spodem */
  isolation: isolate; 
}

.discord-img-btn {
  /* Skalowanie obrazka */
  width: auto;
  height: 90px; /* Dopasuj wysokość pod Twój projekt z PS */
  max-width: 300px;
  
  display: block;
  cursor: pointer;
  
  /* Cień pod obrazkiem dla głębi */
  filter: drop-shadow(0 6px 15px rgba(0,0,0,0.5));
  
  /* Płynna fizyka na hover (tąpnięcie) */
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s;
}

/* EFEKT NAJECHANIA MYSZKĄ */
.discord-img-btn:hover {
  /* Subtelne powiększenie i odskok w górę */
  transform: scale(1.06) translateY(-6px);
  /* Mocniejszy cień na hover */
  filter: drop-shadow(0 10px 25px rgba(88, 101, 242, 0.4));
}

/* --- OPCJONALNY BLASK POD OBRAZKIEM --- */
/* Jeśli Twój plik discord.png nie ma wbudowanego neonu, ten CSS doda go pod spodem */
.discord-glow {
  position: absolute;
  inset: 10px; /* Lekko mniejszy niż obrazek */
  background: radial-gradient(circle, rgba(88,101,242,0.6) 0%, rgba(88,101,242,0) 70%);
  filter: blur(15px);
  border-radius: 50px; /* Dopasuj do zaokrągleń obrazka */
  z-index: -1;
  opacity: 0.6;
  animation: discordPulse 2.5s ease-in-out infinite;
  transition: opacity 0.3s;
}

.discord-anchor:hover .discord-glow {
  opacity: 1;
  filter: blur(20px);
}

/* Subtelny puls blasku */
@keyframes discordPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 0.9; }
}
/* Nowy układ pionowy */
.menu-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.menu-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Pomniejszone logo */
.menu-logo-small {
  max-width: 400px; /* Zmniejszone z 600px */
  height: auto;
  margin-bottom: 20px;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 10px 25px rgba(0,0,0,0.8));
}

/* Wywalamy stare karty boczne */
.menu-right { display: none !important; }

/* --- ANIMACJA PŁYWANIA (BALON DISCORDA) --- */
@keyframes discordFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-15px) rotate(2deg); /* Podlot w górę i lekkie przechylenie w prawo */
  }
  66% {
    transform: translateY(-5px) rotate(-2deg); /* Delikatny opad i przechylenie w lewo */
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

.discord-img-btn {
  /* Skalowanie obrazka */
  width: auto;
  height: 275px; 
  max-width: 300px;
  
  display: block;
  cursor: pointer;
  
  /* Cień pod obrazkiem */
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
  
  /* ---> AKTYWACJA ANIMACJI PŁYWANIA <--- */
  animation: discordFloat 6s ease-in-out infinite;
  
  /* Płynne przejście dla efektu hover */
  transition: filter 0.3s ease;
}

/* EFEKT NAJECHANIA MYSZKĄ */
/* Używamy selektora na anchorze, żeby zatrzymać/zmodyfikować pływanie */
.discord-anchor:hover .discord-img-btn {
  /* Po najechaniu możemy lekko przyspieszyć pulsowanie lub wzmocnić cień */
  filter: drop-shadow(0 15px 30px rgba(88, 101, 242, 0.6));
  /* Jeśli chcesz, żeby po najechaniu przestał się bujać, odkomentuj linię poniżej: */
  /* animation-play-state: paused; */
}

.discord-anchor:hover {
  /* Delikatne powiększenie całej tabliczki na hover */
  transform: scale(1.05);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- DOPASOWANIE BLASKU DO RUCHU --- */
.discord-glow {
  position: absolute;
  inset: 40px; 
  background: radial-gradient(circle, rgba(88,101,242,0.5) 0%, rgba(88,101,242,0) 70%);
  filter: blur(25px);
  z-index: -1;
  opacity: 0.5;
  
  /* Blask musi podążać za ruchem obrazka */
  animation: discordFloat 6s ease-in-out infinite, discordPulse 3s ease-in-out infinite;
}
#menu-balloons-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 5; /* Wyżej niż tło, niżej niż przyciski menu */
}

.menu-balloon {
  position: absolute;
  width: 160px;
  height: auto;
  user-select: none;
  pointer-events: none;
  animation: balloonSway 3s ease-in-out infinite;
}

@keyframes balloonSway {
  0%   { transform: rotate(-6deg) scaleX(1); }
  25%  { transform: rotate(4deg) scaleX(0.97); }
  50%  { transform: rotate(-3deg) scaleX(1.02); }
  75%  { transform: rotate(5deg) scaleX(0.98); }
  100% { transform: rotate(-6deg) scaleX(1); }
}
/* =========================================
   ALWAYS-VISIBLE INVENTORY PANEL (bottom-right)
   ========================================= */
#always-inventory {
  background: linear-gradient(135deg, rgba(10,8,30,0.97), rgba(20,10,45,0.99));
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 10px 14px;
  z-index: 190;
  width: 100%;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6), 0 0 18px rgba(168,85,247,0.12);
  pointer-events: none;
  backdrop-filter: blur(12px);
}

#always-inventory .inv-header {
  font-family: 'Fredoka One', cursive;
  font-size: 11px;
  color: #ff9cf5;
  letter-spacing: 1px;
  margin-bottom: 7px;
  text-transform: uppercase;
}

#always-inventory .inv-slot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 4px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background 0.2s;
}

#always-inventory .inv-slot.filled {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
}

#always-inventory .inv-slot.empty {
  background: rgba(255,255,255,0.025);
  opacity: 0.4;
}

#always-inventory .inv-slot-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

#always-inventory .inv-slot-name {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

#always-inventory .inv-slot-type {
  font-size: 8px;
  letter-spacing: 0.5px;
}

#always-inventory .inv-slot-type.active { color: #a3e635; }
#always-inventory .inv-slot-type.passive { color: #60a5fa; }

/* =========================================
   DICE CONTAINER - wider for bigger button
   ========================================= */
#dice-container {
  width: 180px;
}

/* =========================================
   ANIMACJA KOSTKI W PRZYCISKU RZUĆ
   ========================================= */
.btn-roll-anim-dice {
  font-size: 44px;
  line-height: 1;
  display: inline-block;
  animation: diceSpinIn 0.08s ease;
}

.btn-roll-anim-result {
  font-size: 52px;
  animation: diceResultPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes diceSpinIn {
  from { transform: rotate(-20deg) scale(0.7); opacity: 0.4; }
  to   { transform: rotate(0deg)   scale(1);   opacity: 1; }
}

@keyframes diceResultPop {
  0%   { transform: scale(0.5) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(5deg);   opacity: 1; }
  100% { transform: scale(1)   rotate(0deg);   opacity: 1; }
}

#btn-roll.rolling {
  background: linear-gradient(135deg, #1a1a3a, #2a2a5a) !important;
  animation: none !important;
  box-shadow: 0 0 30px rgba(168,85,247,0.5) !important;
  cursor: wait;
}

/* =========================================
   EKWIPUNEK - hover i hint
   ========================================= */
#always-inventory {
  transition: border-color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

#always-inventory:hover {
  border-color: rgba(168,85,247,0.7) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6), 0 0 22px rgba(168,85,247,0.3) !important;
}

.inv-hint {
  text-align: center;
  font-size: 10px;
  color: rgba(168,85,247,0.8);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-transform: uppercase;
  animation: invHintPulse 1.5s ease-in-out infinite;
}

@keyframes invHintPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}
