/* Import fonturi */
@import url(navbar.css);

:root {
  --bg-dark: #0a0e27;
  --accent-red: #00d9ff;
  --text-light: #e0f7ff;
  --text-shadow: #00ffff;
  --marker-color: #00ff88;
  --input-bg: #0f1629;
  --input-border: #00d9ff;
  --sidebar-width: 250px;
  --drop-highlight: #00ff88;
  --shadow-color: rgba(0, 217, 255, 0.3);
  --button-dark: #0f1629;
}


/* Reset / bază */
body {
  font-family: "Press Start 2P", monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-light);
  margin: 0;
}

.container {
  text-align: center;
  padding: 20px;
  background-color: #1a1a1a;
  box-shadow: 0 0 10px var(--accent-red), 0 0 3px var(--text-light);
  border: 2px solid var(--accent-red);
  width: 90%;
  max-width: 1200px;
  border-radius: 40px;
  -webkit-border-radius: 40px;
  -moz-border-radius: 40px;
  -ms-border-radius: 40px;
  -o-border-radius: 40px;
}

/* Titlu */
h1 {
  font-family: "Creepster", cursive;
  color: var(--accent-red);
  margin-bottom: 20px;
  font-size: 2.2em;
  /* Stil de bază static, animația e dată de clasă */
  text-shadow: 1px 1px 2px var(--text-light), -1px -1px 2px var(--shadow-color);
}


/* Flicker Clasic (profilul implicit de titlu) */
.flicker-classic {
  animation: flicker-classic 1s infinite alternate;
}

@keyframes flicker-classic {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.95;
    text-shadow: 1px 1px 2px var(--text-light);
  }

  100% {
    opacity: 1;
    text-shadow: 1px 1px 2px var(--text-light), -1px -1px 2px var(--shadow-color);
  }
}

/* NOU: Shadow Pulse (Titlu) */
.shadow-pulse {
  animation: shadow-pulse 1.5s infinite alternate;
}

@keyframes shadow-pulse {
  0% {
    text-shadow: 0 0 5px var(--accent-red), 0 0 10px #ff00ff;
  }

  100% {
    text-shadow: 0 0 10px var(--text-light), 0 0 20px #00ffff;
  }
}

/* NOU: Chromatic Pulse (Board) - aplicată pe grilă (#bingo-board) */
.chromatic-aberration {
  /* Clasa se aplică pe elementul #bingo-board */
  animation: chromatic-shift 5s infinite alternate;
}

@keyframes chromatic-shift {
  0% {
    filter: hue-rotate(0deg) saturate(1.2);
  }

  50% {
    filter: hue-rotate(180deg) saturate(1.5);
  }

  100% {
    filter: hue-rotate(360deg) saturate(1.2);
  }
}

/* Stil pentru titlul animat când flicker-ul este oprit */
.no-flicker {
  animation: none !important;
  text-shadow: 1px 1px 2px var(--text-light) !important;
  opacity: 1 !important;
}

/* --- Selector de Moduri (Butoane stilate) --- */
#mode-selector-panel {
  text-align: left;
  margin: 10px 0 20px 0;
  border-radius: 25px;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  -ms-border-radius: 25px;
  -o-border-radius: 25px;
}

#mode-selector p {
  font-size: 0.9em;
  margin-bottom: 8px;
  margin-right: 0%;
  text-align: left;
}

#mode-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  border-radius: 25px;
}

.mode-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 0.7em;
  padding: 10px 15px;
  cursor: pointer;
  background-color: var(--button-dark);
  color: var(--text-light);
  border: 2px solid var(--accent-red);
  transition: all 0.2s;
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.mode-btn:hover {
  background-color: #555;
  color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

.mode-btn.active {
  background-color: var(--accent-red);
  color: var(--bg-dark);
  /* Text negru pe roșu activ */
  border-color: var(--text-light);
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--text-light);
}

/* Layout principal (sidebar pe stânga + board) */
#main-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

#custom-config-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 10px;
  border: 1px solid var(--text-light);
  background-color: #333333;
}

#game-area {
  flex-grow: 1;
}

/* Sidebar: secțiuni și inputuri */
.config-section {
  margin-bottom: 10px;
  text-align: left;
}

.config-section label,
.config-section h3 {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8em;
  font-family: "Press Start 2P", monospace;
}

#board-size,
#theme-list-input,
#save-set-name {
  font-family: monospace;
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-light);
  font-size: 13px;
  resize: vertical;
}

#board-size {
  font-family: "Press Start 2P", monospace;
}

/* Butoane sidebar */
.sidebar-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 0.7em;
  padding: 8px 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 5px;
  background-color: #1a1a1a;
  color: var(--text-light);
  border: 1px solid var(--accent-red);
  transition: background-color 0.1s;
}

.sidebar-btn.primary-btn {
  background-color: var(--accent-red);
  color: var(--text-light);
  border-color: var(--text-light);
  font-size: 0.8em;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.sidebar-btn:hover {
  background-color: var(--accent-red);
  color: var(--bg-dark);
}

.sidebar-btn.primary-btn:hover {
  background-color: var(--text-light);
  color: var(--bg-dark);
}


/* Stiluri pentru panoul de Seturi Personalizate Salvate */
#saved-sets-panel span {
  border-bottom: 2px solid var(--accent-red);
  padding-bottom: 5px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.5em;
}

#saved-sets-list p {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8em;
}

/* Stiluri pentru fiecare element din listă */
.saved-set-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.saved-set-item:last-child {
  border-bottom: none;
}

.saved-set-item span {
  /* Numele setului */
  flex-grow: 1;
  color: var(--accent-green);
  font-size: 0.8em;
  font-family: monospace;
}

/* Stiluri pentru butoanele de Încarcă și Șterge */

.saved-set-item button {
  /* Aplică stilul general al butoanelor din sidebar */
  font-family: "Press Start 2P", monospace;
  font-size: 0.65em;
  /* Puțin mai mic decât butoanele standard */
  padding: 4px 8px;
  margin-left: 5px;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
  transition: background-color 0.1s, color 0.1s, border-color 0.1s;
  height: 30px;
}

.load-set-btn,
.delete-set-btn {
  /* Stilul bazat pe cererea ta */
  background-color: #1a1a1a;
  color: var(--text-light);
  border: 1px solid var(--accent-red);
}

.load-set-btn:hover {
  background-color: var(--accent-red);
  color: var(--text-dark);
}

.delete-set-btn {
  border-color: #550000;
}

.delete-set-btn:hover {
  background-color: #cc0000;
  border-color: #cc0000;
  color: var(--text-light);
}

/* Drag & Drop list */
#draggable-themes-list {
  list-style: none;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px dashed var(--accent-red);
  background-color: #111;
}

.draggable-theme-item {
  font-family: monospace;
  font-size: 0.8em;
  padding: 5px;
  margin: 3px;
  background-color: #444;
  color: var(--text-light);
  cursor: grab;
  border-radius: 2px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 5px solid var(--accent-red);
}

.draggable-theme-item.dragged {
  opacity: 0.5;
}

/* Score / message */
#score-container {
  font-size: 1em;
  margin-bottom: 15px;
  padding: 6px 10px;
  background-color: #333333;
  border: 1px solid var(--text-light);
  text-shadow: 0 0 5px var(--text-light);
}

#message {
  margin-top: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-light);
  text-shadow: 0 0 5px var(--text-light), 0 0 10px var(--shadow-color);
  min-height: 25px;
  animation: flashMessage 0.5s infinite alternate;
}

/* Stil pentru mesajul de salvare (feedback vizual) */
#save-message {
  font-family: "Press Start 2P", monospace;
  color: #32cd32;
  /* Lime Green */
  text-shadow: 0 0 5px #32cd32;
  margin-top: 5px;
}

#message:empty {
  animation: none;
}

@keyframes flashMessage {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.8;
    text-shadow: 0 0 8px var(--text-light);
  }
}

/* Grila Bingo */
.bingo-grid {
  display: grid;
  /*grid-template-columnsestesetatdinscript.js*/
  grid-gap: 3px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border: 4px dashed var(--accent-red);
  padding: 3px;
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

/* Celule */
.bingo-cell {
  background-color: #151515;
  border: 1px solid var(--accent-red);
  padding: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.65em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  height: 85px;
  box-sizing: border-box;
  transition: background-color 0.1s, color 0.1s;
  border-radius: 5px;
  text-shadow: 0 0 3px var(--text-light);
  word-break: break-word;
  overflow: hidden;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

.bingo-cell:hover {
  background-color: #252525;
  color: var(--accent-red);
  box-shadow: inset 0 0 5px var(--accent-red);
}

/* Stări celulă */
.bingo-cell.marked {
  background-color: var(--accent-red);
  color: var(--bg-dark);
  transform: scale(0.98);
  border-color: var(--text-light);
  box-shadow: inset 0 0 10px var(--bg-dark), 0 0 8px var(--text-light);
  position: relative;
}

.bingo-cell.marked::after {
  content: "X";
  font-family: Arial, sans-serif;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(5deg);
  font-size: 2em;
  color: var(--text-light);
  opacity: 0.8;
  pointer-events: none;
  text-shadow: 1px 1px 0 var(--bg-dark);
}

.bingo-cell.bingo-win {
  background-color: var(--text-light) !important;
  color: var(--bg-dark);
  transform: scale(1.03);
  transition: transform 0.1s;
  border-color: var(--accent-red);
  box-shadow: 0 0 15px var(--text-light);
}

/* Drop target / gameplay mode */
.bingo-cell.drop-target {
  border: 3px solid var(--drop-highlight);
  background-color: #2a0000;
}

.bingo-cell.filled {
  background-color: #0d0d0d;
}

.bingo-cell.game-active {
  cursor: pointer !important;
}

/* Media queries */
@media (max-width: 768px) {
  #main-content {
    flex-direction: column;
  }

  #custom-config-sidebar {
    width: 100%;
  }

  .bingo-cell {
    height: 60px;
    font-size: 0.55em;
  }
}

@media (max-width: 480px) {
  .bingo-grid {
    width: 100%;
    grid-gap: 2px;
  }

  .bingo-cell {
    height: 70px;
    font-size: 0.6em;
    padding: 2px;
  }

  h1 {
    font-size: 1.8em;
  }
}

/* --- Selector de Moduri (Butoane stilate) --- */

select {
  font-family: "Press Start 2P", monospace;
  font-size: 0.7em;
  padding: 10px 15px;
  cursor: pointer;
  background-color: var(--button-dark);
  color: var(--text-light);
  border: 2px solid var(--accent-red);
  transition: all 0.2s;
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

select#mode-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
}

select#mode-selector .mode-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 1.5em;
  padding: 10px 15px;
  cursor: pointer;
  background-color: var(--button-dark);
  color: var(--text-light);
  border: 2px solid var(--accent-red);
  transition: all 0.2s;
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

select#mode-selector .mode-btn:hover {
  background-color: #555;
  color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

select#mode-selector .mode-btn.active {
  background-color: var(--accent-red);
  color: var(--bg-dark);
  /* Text negru pe roșu activ */
  border-color: var(--text-light);
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--text-light);
}

option {
  font-size: 24px;
}

/* Stiluri pentru secțiunea Creator */

.creator {
  position: fixed;
  bottom: 5px;
  left: 10px;
  background-color: rgba(26, 26, 26, 0.8);
  border: 1px solid var(--accent-red);
  padding: 10px 10px;
  border-radius: 2px;
  box-shadow: 0 0 5px var(--accent-red);
  z-index: 10;
}

.creator summary {
  font-size: 9px;
}

.creator details[open] {
  background-color: rgba(26, 26, 26, 0.95);
  padding: 10px;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-red);
  max-width: 300px;
}

.creator details[close] {
  margin-bottom: 5px;
}

.creator p {
  font-size: 8px;
}

/* --- Stiluri pentru MODALUL de Bun Venit --- */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(3px);

  /* Centrare conținut */
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #1a1a1a;
  padding: 30px;
  border: 3px solid var(--accent-red);
  width: 80%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 0 20px var(--accent-red);
  animation: fadeIn 0.5s;
}

.modal-content h2 {
  font-family: "Creepster", cursive;
  color: var(--text-light);
  font-size: 1.8em;
  margin-bottom: 15px;
  text-shadow: 0 0 8px var(--accent-red);
}

.modal-content p {
  font-family: "Press Start 2P", monospace;
  font-size: 0.8em;
  margin-bottom: 15px;
  line-height: 1.5;
}

#modal-timer-message {
  color: #ffcc00;
  /* Galben pentru vizibilitate */
  font-size: 0.7em;
}

#modal-start-btn {
  width: 80%;
  margin-top: 15px;
}

#modal-start-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background-color: #555;
}

summary::marker {
  color: #00000000;
}

/* --- Stiluri pentru Toggle Switch-uri (Efecte Globale) --- */

.toggle-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8em;
  cursor: pointer;
}

/* Stilul de bază al switch-ului (containerul vizual) */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

/* Ascunde checkbox-ul implicit */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Slider-ul (background-ul) */
.switch input+.switch:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--button-dark);
  border: 1px solid var(--accent-red);
  transition: .4s;
  border-radius: 20px;
}

/* Când este bifat (Pornit) */
.switch input:checked+.switch:before {
  background-color: var(--accent-red);
  border-color: var(--text-light);
}

/* Butonul rotund (Maneta) */
.switch input+.switch:after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  background-color: var(--text-light);
  transition: .4s;
  border-radius: 50%;
}

/* Mută maneta la dreapta când este bifat */
.switch input:checked+.switch:after {
  transform: translateX(20px);
  background-color: var(--bg-dark);
  /* Negru pe fundal roșu */
}


/* Reset / bază */
body {
  font-family: 'Press Start 2P', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-light);
  margin: 0;
}

.container {
  text-align: center;
  padding: 20px;
  background-color: #1a1a1a;
  border-radius: 0;
  box-shadow: 0 0 10px var(--accent-red), 0 0 3px var(--text-light);
  border: 2px solid var(--accent-red);
  width: 90%;
  max-width: 1200px;
  border-radius: 25px;
  -webkit-border-radius: 25px;
  -moz-border-radius: 25px;
  -ms-border-radius: 25px;
  -o-border-radius: 25px;
}

/* Titlu */
h1 {
  font-family: 'Creepster', cursive;
  color: var(--accent-red);
  margin-bottom: 20px;
  font-size: 2.2em;
  text-shadow: 1px 1px 2px var(--text-light), -1px -1px 2px var(--shadow-color);
  transition: all 0.3s ease;
}

/* --- Efecte Vizuale Titlu --- */
h1.effect-glow {
  text-shadow: 0 0 10px var(--accent-red), 0 0 20px var(--accent-red), 0 0 30px var(--accent-red);
}

h1.effect-flicker {
  animation: flicker 1s infinite alternate;
}

@keyframes flicker {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

h1.effect-rgb-gradient {
  background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rgb-shift 3s infinite;
}

@keyframes rgb-shift {
  0% {
    filter: hue-rotate(0deg);
  }

  33% {
    filter: hue-rotate(120deg);
  }

  66% {
    filter: hue-rotate(240deg);
  }

  100% {
    filter: hue-rotate(360deg);
  }
}

h1.effect-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* --- Efecte Vizuale Celule --- */
.bingo-cell.effect-glow {
  box-shadow: 0 0 10px var(--accent-red), inset 0 0 10px rgba(139, 0, 0, 0.5);
}

.bingo-cell.effect-shake {
  animation: shake 0.5s infinite;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-2px);
  }

  75% {
    transform: translateX(2px);
  }
}

.bingo-cell.effect-rgb-colors {
  animation: rgb-border 3s infinite;
}

@keyframes rgb-border {
  0% {
    border-color: #ff0000;
  }

  33% {
    border-color: #00ff00;
  }

  66% {
    border-color: #0000ff;
  }

  100% {
    border-color: #ff0000;
  }
}


/* --- Selector de Moduri --- */
#mode-selector-panel {
  text-align: left;
  margin: 10px 0 20px 0;
}

#mode-selector-panel p {
  font-size: 0.9em;
  margin-bottom: 8px;
  text-align: left;
}

/* Stil pentru TOATE elementele <select> */
select {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7em;
  padding: 10px 15px;
  cursor: pointer;
  background-color: var(--button-dark);
  color: var(--text-light);
  border: 2px solid var(--accent-red);
  transition: all 0.2s;
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  width: 100%;
  /* Lățime completă implicit */
}

select:hover {
  background-color: #555;
  color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-red);
}

option {
  font-size: 1.5em;
  /* Mărește textul opțiunilor */
}

/* Layout principal (sidebar + board) */
#main-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

#custom-config-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  padding: 10px;
  border: 1px solid var(--text-light);
  background-color: #333333;
}

#game-area {
  flex-grow: 1;
}

/* Sidebar: secțiuni și inputuri */
.config-section {
  margin-bottom: 10px;
  text-align: left;
}

.config-section label,
.config-section h3 {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8em;
  font-family: 'Press Start 2P', monospace;
}

#board-size,
#theme-list-input {
  font-family: monospace;
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-light);
  font-size: 13px;
  resize: vertical;
}

#board-size {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7em;
}

/* Butoane sidebar */
.sidebar-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7em;
  padding: 8px 10px;
  cursor: pointer;
  width: 100%;
  margin-top: 5px;
  background-color: #1a1a1a;
  color: var(--text-light);
  border: 1px solid var(--accent-red);
  transition: background-color 0.1s;
}

.sidebar-btn.primary-btn {
  background-color: var(--accent-red);
  color: var(--text-light);
  border-color: var(--text-light);
  font-size: 0.8em;
  padding: 10px;
  margin-bottom: 10px;
}

.sidebar-btn:hover {
  background-color: var(--accent-red);
  color: var(--bg-dark);
}

.sidebar-btn.primary-btn:hover {
  background-color: var(--text-light);
  color: var(--bg-dark);
}

/* Drag & Drop list */
#draggable-themes-list {
  list-style: none;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px dashed var(--accent-red);
  background-color: #111;
}

.draggable-theme-item {
  font-family: monospace;
  font-size: 0.8em;
  padding: 5px;
  margin: 3px;
  background-color: #444;
  color: var(--text-light);
  cursor: grab;
  border-radius: 2px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 5px solid var(--accent-red);
}

.draggable-theme-item.dragged {
  opacity: 0.5;
}

/* Score / message */
#score-container {
  font-size: 1em;
  margin-bottom: 15px;
  padding: 6px 10px;
  background-color: #333333;
  border: 1px solid var(--text-light);
  text-shadow: 0 0 5px var(--text-light);
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  -ms-border-radius: 15px;
  -o-border-radius: 15px;
}

#message {
  margin-top: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--text-light);
  text-shadow: 0 0 5px var(--text-light), 0 0 10px var(--shadow-color);
  min-height: 25px;
  animation: flashMessage 0.5s infinite alternate;
}

#message:empty {
  animation: none;
}

@keyframes flashMessage {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.8;
    text-shadow: 0 0 8px var(--text-light);
  }
}

/* Grila Bingo */
.bingo-grid {
  display: grid;
  grid-gap: 3px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border: 4px dashed var(--accent-red);
  padding: 3px;
}

/* Celule */
.bingo-cell {
  background-color: #151515;
  border: 1px solid var(--accent-red);
  padding: 3px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.65em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  height: 85px;
  box-sizing: border-box;
  transition: background-color 0.1s, color 0.1s, transform 0.1s;
  text-shadow: 0 0 3px var(--text-light);
  word-break: break-word;
  overflow: hidden;
}

.bingo-cell:hover {
  background-color: #252525;
  color: var(--accent-red);
  box-shadow: inset 0 0 5px var(--accent-red);
}

/* Stări celulă */
.bingo-cell.marked {
  background-color: var(--marker-color);
  /* Verde */
  color: var(--bg-dark);
  transform: scale(0.98);
  border-color: var(--text-light);
  box-shadow: inset 0 0 10px var(--bg-dark), 0 0 8px var(--text-light);
}

.bingo-cell.bingo-win {
  background-color: var(--text-light) !important;
  color: var(--bg-dark);
  transform: scale(1.03);
  border-color: var(--accent-red);
  box-shadow: 0 0 15px var(--text-light);
}

/* Drop target / gameplay mode */
.bingo-cell.drop-target {
  border: 3px solid var(--drop-highlight);
  background-color: #2a0000;
}

.bingo-cell.filled {
  background-color: #0d0d0d;
}

.bingo-cell.game-active {
  cursor: pointer !important;
}

/* Media queries */
@media (max-width: 768px) {
  #main-content {
    flex-direction: column;
  }

  #custom-config-sidebar {
    width: 100%;
    box-sizing: border-box;
  }

  .bingo-cell {
    height: 60px;
    font-size: 0.55em;
  }
}

@media (max-width: 480px) {
  .bingo-cell {
    height: 70px;
    font-size: 0.6em;
  }

  h1 {
    font-size: 1.8em;
  }
}

/* Creator */
.creator {
  position: fixed;
  bottom: 5px;
  left: 10px;
  background-color: rgba(26, 26, 26, 0.8);
  border: 1px solid var(--accent-red);
  padding: 10px;
  border-radius: 2px;
  box-shadow: 0 0 5px var(--accent-red);
  z-index: 10;
}

.creator summary {
  font-size: 9px;
}

.creator details[open] {
  padding: 10px;
  max-width: 300px;
}

.creator p {
  font-size: 8px;
}

summary::marker {
  color: #00000000;
}

/* --- Modal de Bun Venit --- */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #1a1a1a;
  padding: 30px;
  border: 3px solid var(--accent-red);
  width: 80%;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 0 20px var(--accent-red);
}

.modal-content h2 {
  font-family: 'Creepster', cursive;
  color: var(--text-light);
  font-size: 1.8em;
  margin-bottom: 15px;
  text-shadow: 0 0 8px var(--accent-red);
}

.modal-content p {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8em;
  margin-bottom: 15px;
  line-height: 1.5;
}

#modal-timer-message {
  color: #ffcc00;
  font-size: 0.7em;
}

#modal-start-btn {
  width: 80%;
  margin-top: 15px;
}

#modal-start-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background-color: #555;
}

/* --- (NOU) Stiluri pentru Setări Globale Efecte --- */
#global-effects-panel {
  margin-bottom: 20px;
  text-align: left;
  border-radius: 20px;

}

#global-effects-panel summary {
  font-size: 0.8em;
  cursor: pointer;
  color: var(--accent-red);
  text-shadow: 0 0 3px var(--text-shadow);
}

.effects-controls {
  background-color: #111;
  border: 1px dashed var(--accent-red);
  padding: 15px;
  margin-top: 10px;
  border-radius: 20px;
}

.effects-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.effects-row:last-child {
  margin-bottom: 0;
}

/* Stil pentru etichetele Toggle */
.toggle-label {
  font-size: 0.7em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  /* Ocupă spațiu egal */
}

/* Stil pentru etichetele Select */
.select-label {
  font-size: 0.7em;
  display: block;
  flex: 1;
  /* Ocupă spațiu egal */
}

.select-label.full-width {
  flex-basis: 100%;
  /* Ocupă tot rândul */
}

.select-label select {
  margin-top: 5px;
  width: 100%;
}

/* --- (NOU) Stiluri pentru Toggle Switch --- */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  /* Lățime redusă */
  height: 20px;
  /* Înălțime redusă */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--button-dark);
  border: 1px solid var(--accent-red);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  /* Mărime redusă */
  width: 14px;
  /* Mărime redusă */
  left: 2px;
  /* Poziție ajustată */
  bottom: 2px;
  /* Poziție ajustată */
  background-color: white;
  transition: .4s;
}

input:checked+.slider {
  background-color: var(--marker-color);
  /* Verde când e activ */
  border-color: var(--text-light);
}

input:checked+.slider:before {
  transform: translateX(20px);
  /* Distanță de alunecare ajustată */
}

.slider.round {
  border-radius: 20px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Config page styles */
#sound-selection-panel {
  margin-top: 20px;
  text-align: left;
  border-radius: 20px;
  ;
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  -ms-border-radius: 20px;
  -o-border-radius: 20px;
}

#sound-selection-panel h2 {
  color: var(--accent-red);
  font-family: 'Creepster', cursive;
  font-size: 1.5em;
  margin-bottom: 15px;
}

.sound-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--input-bg);
  border: 1px solid var(--accent-red);
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 15px;
  -ms-border-radius: 15px;
  -o-border-radius: 15px;
}

.sound-selector label {
  flex: 1;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7em;
  color: var(--text-light);
}

.sound-selector select {
  flex: 1;
  padding: 5px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  border: 1px solid var(--accent-red);
  border-radius: 2px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6em;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.sound-selector button {
  padding: 8px 15px;
  background-color: var(--button-dark);
  color: var(--text-light);
  border: 2px solid var(--accent-red);
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6em;
  border-radius: 2px;
  transition: all 0.2s;
  border-radius: 10px;

}

.sound-selector button:hover {
  background-color: var(--accent-red);
  color: var(--bg-dark);
}

/* Volume Slider Styles */
#sound-volume-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--button-dark);
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#sound-volume-slider:hover {
  opacity: 1;
}

#sound-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-red);
  cursor: pointer;
}

#sound-volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-red);
  cursor: pointer;
  border: none;
}

#volume-display {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6em;
  color: var(--text-light);
  margin-left: 10px;
  min-width: 50px;
  text-align: center;
}

/* NOU: Stiluri pentru paginile noi (Contribuitori, Updates) */
.app-page {
  padding: 20px;
  background-color: #1a1a1a;
  border: 2px solid var(--accent-red);
  margin-top: 20px;
  border-radius: 20px;
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  -ms-border-radius: 20px;
  -o-border-radius: 20px;
}

.app-page h2 {
  color: var(--accent-red);
  font-family: "Creepster", cursive;
  font-size: 2em;
  margin-bottom: 20px;
  text-shadow: 0 0 5px var(--text-light);
}

/* Stiluri pentru detalii (summuryuri) */
.app-page details {
  border: 1px solid var(--accent-red);
  padding: 10px;
  margin-bottom: 15px;
  background-color: #222222;
  text-align: left;
  border-radius: 15px;
  -webkit-border-radius: 15px;
  -moz-border-radius: 1px;
  -ms-border-radius: 1px;
  -o-border-radius: 1px;
}

.app-page summary {
  font-family: "Press Start 2P", monospace;
  font-size: 1em;
  color: var(--accent-red);
  cursor: pointer;
  text-shadow: 0 0 5px var(--accent-red);
  outline: none;
  padding: 5px 0;
}

.app-page ul {
  list-style-type: none;
  /* Elimină marcatorii default */
  padding-left: 0;
  font-size: 0.7em;
  text-align: left;
  margin-top: 10px;
  line-height: 1.6;
}

.app-page ul li {
  padding: 3px 0;
  color: var(--text-light);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  list-style-type: '';
  /* Emoji ca marcator */
  padding-left: 20px;
  text-indent: -20px;
  /* Aliniază textul, păstrând emoji-ul */
}

.app-page ul li:last-child {
  border-bottom: none;
}