* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a1a2e;
  color: #eee;
  font-family: 'Courier New', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.game-container {
  text-align: center;
}

h1 {
  letter-spacing: 8px;
  margin-bottom: 15px;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
}

.game-area {
  display: flex;
  gap: 20px;
}

#board {
  background: #0f0f1e;
  border: 3px solid #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 140px;
}

.panel {
  background: #16213e;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 5px;
}

.panel h3 {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 5px;
}

.panel p {
  font-size: 22px;
  font-weight: bold;
  color: #00f0ff;
}

#next {
  background: #0f0f1e;
  border: 1px solid #333;
}

#startBtn {
  background: #00f0ff;
  color: #1a1a2e;
  border: none;
  padding: 10px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

#startBtn:hover {
  background: #00c0cc;
}

.controls {
  font-size: 11px;
  color: #888;
  text-align: left;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

#gameOverMsg {
  color: #ff3860;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 0 0 8px #ff3860;
}

#creditsBtn {
  background: #16213e;
  color: #00f0ff;
  border: 2px solid #00f0ff;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  width: 100%;
}

#creditsBtn:hover {
  background: #00f0ff;
  color: #1a1a2e;
}

#creditsModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.credits-box {
  background: #16213e;
  border: 2px solid #00f0ff;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  border-radius: 10px;
  padding: 30px 40px;
  text-align: center;
}

.credits-box h2 {
  color: #00f0ff;
  letter-spacing: 4px;
  margin-bottom: 15px;
}

.credits-box p {
  margin: 8px 0;
  font-size: 16px;
}

.credits-box strong {
  color: #00f0ff;
}

.credits-box button {
  margin-top: 20px;
  background: #00f0ff;
  color: #1a1a2e;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #16213e;
  color: #00f0ff;
  border: 2px solid #00f0ff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-family: inherit;
  margin-bottom: 15px;
  transition: 0.2s;
}

.back-btn:hover {
  background: #00f0ff;
  color: #1a1a2e;
}

#toggleTouch {
  background: #16213e;
  color: #00f0ff;
  border: 2px solid #00f0ff;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  width: 100%;
}

#toggleTouch:hover {
  background: #00f0ff;
  color: #1a1a2e;
}

#touchControls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-top: 5px;
}

.touch-row {
  display: flex;
  gap: 8px;
}

#touchControls button {
  background: #00f0ff;
  color: #1a1a2e;
  border: none;
  padding: 12px 16px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  touch-action: manipulation;
  user-select: none;
}

#touchControls button:active {
  background: #00c0cc;
}

#btnDrop {
  width: 100%;
  font-size: 14px;
}

/* Selettore lingua */
#langSelector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 15px;
}

.lang-btn {
  background: #16213e;
  color: #eee;
  border: 2px solid #333;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.lang-btn:hover {
  border-color: #00f0ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 240, 255, 0.3);
}

.lang-btn.active {
  background: #00f0ff;
  color: #1a1a2e;
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}
