@import url('https://fonts.googleapis.com/css2?family=Vazir:wght@400;500;600;700&display=swap');

:root {
  --primary: #ffd700; /* Golden accent */
  --primary-hover: #ffcc00;
  --success: #28a745;
  --success-hover: #218838;
  --danger: #dc3545;
  --danger-hover: #c82333;
  --warning: #ffc107;
  --warning-hover: #e0a800;
  --background: #121212; /* Dark background */
  --surface: #1e1e1e; /* Slightly lighter surface */
  --surface-hover: #2a2a2a;
  --text: #ffffff;
  --text-secondary: #b0b0b0;
  --border: #333333;
  --golden-gradient: linear-gradient(45deg, #ffd700, #ffcc00);
  --golden-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

* {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body.cyberpunk {
  font-family: 'Vazir', sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  padding: 20px 0;
  direction: rtl;
  line-height: 1.6;
  background-image: url(tabriz-elements.png);
  background-position: bottom;
  background-size: 900px auto;
  background-repeat: no-repeat;
}

.search-helper {
  display: none;
}

.container {
  max-width: 480px !important;
  padding: 0 20px;
  margin: 0 auto;
}

.game-logo {
  margin-bottom: 2rem;
  text-align: center;
}

.logo-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.1);
  box-shadow: var(--golden-shadow);
}

.neon-text {
  color: var(--primary);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 1rem;
  text-shadow: var(--golden-shadow);
  display: inline;
  margin-right: 20px;
}

.cyber-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 400px;
  margin: 0 auto;
}

.cyber-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}

.cyber-input {
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
  transition: all 0.3s ease;
}

.cyber-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
  outline: none;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-cyber-green {
  background: var(--success);
  color: white;
}

.btn-cyber-green:hover {
  background: var(--success-hover);
  transform: translateY(-2px);
}

.btn-cyber-red {
  background: var(--danger);
  color: white;
}

.btn-cyber-red:hover {
  background: var(--danger-hover);
}

.btn-cyber-orange {
  background: var(--warning);
  color: white;
}

.btn-cyber-orange:hover {
  background: var(--warning-hover);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.category-tile {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  position: relative;
}

.category-tile:hover {
  background: var(--surface-hover);
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--golden-shadow);
}

.category-tile i {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--primary);
  vertical-align: sub;
}

.word-box {
  font-size: 24px;
  padding: 24px;
  background: var(--surface);
  border-radius: 12px;
  margin: 20px 0;
  color: var(--text);
  text-align: center;
  border: 2px solid var(--border);
  box-shadow: var(--golden-shadow);
}

.timer-display {
  font-size: 56px;
  font-weight: bold;
  color: var(--primary);
  margin: 24px 0;
  text-shadow: var(--golden-shadow);
}

.game-progress {
  background: var(--surface);
  border-radius: 8px;
  height: 8px !important;
  overflow: hidden;
}

.game-progress .progress-bar {
  background: var(--golden-gradient);
  transition: width 0.3s ease;
}

.progress-caption {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 8px;
  white-space: pre-line;
  line-height: 1.6;
}

.turn-info {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1em;
  padding: 8px;
  border-radius: 8px;
  background: var(--background);
  text-shadow: var(--golden-shadow);
}

footer {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.input-spinner {
  zoom: 0.9;
}

footer p {
  margin-bottom: 0;
  padding-bottom: 10px;
}

.footer-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-stats .current-group {
  color: var(--primary);
  font-weight: bold;
}

.score-item {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.score-item.current-group {
  border-color: var(--primary);
  box-shadow: var(--golden-shadow);
}

.score-item.winner {
  background: var(--surface-hover);
  border: 1px solid var(--success);
}

.group-title {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
}

.points {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
}

.winner-text {
  color: var(--success);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.member-scores {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.audio-controls i {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
  transition: color 0.3s ease;
}

.audio-controls i:hover {
  color: var(--text);
}

.volume-slider {
  width: 100px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.game-section {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.game-section.active {
  opacity: 1;
  transform: translateY(0);
}

footer {
  margin-top: 40px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
}

footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-hover);
}

.persian-translation {
  display: block;
  font-size: 0.8em;
  color: gray;
}

button .persian-translation {
  color: #ccc;
}

h2 .persian-translation {
  font-size: 18px;
  margin-top: 10px;
}

.cyber-input {
  display: inline;
  width: 50%;
}

#revealBtn .persian-translation, #changeWordBtn .persian-translation {
color: #fafafa;
font-size: 13px;
}

#changeWordBtn, #beginBtn {
width: 100%;
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .cyber-card {
    padding: 20px;
  }

  .category-grid {
    gap: 12px;
  }

  .category-tile {
    padding: 16px;
  }

  .timer-display {
    font-size: 48px;
  }

  .word-box {
    font-size: 20px;
    padding: 20px;
  }
}

#nextRoundBtnFooter, #helpBtn {
  background: black;
  color: white;
  border: 1px solid #777;
  padding: 5px 10px;
  width: 100px;
  height: 28px;
  font-size: 0.8em;
  display: inline-block;
  margin-bottom: 5px;
}

#nextRoundBtnFooter:hover, #helpBtn:hover {
  background: gray;
}

/* Additional CSS moved from game.js */
.cyber-scores {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.score-item {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
}

.score-item.current-group {
  border-color: var(--success);
  box-shadow: 0 0 15px var(--success);
}

.score-item.winner {
  border-color: var(--warning);
  box-shadow: 0 0 20px var(--warning);
}

.group-title {
  color: var(--primary);
  margin: 0;
}

.points {
  font-size: 24px;
  color: var(--success);
  text-shadow: 0 0 5px var(--success);
}

.winner-text {
  color: var(--warning);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 0 0 10px var(--warning);
  animation: winner-pulse 1.5s infinite alternate;
}

.tie-text {
  color: var(--primary);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  text-shadow: 0 0 10px var(--primary);
  animation: tie-pulse 1.5s infinite alternate;
}

.btn-cyber-blue {
  background: green;
  color: white;
}

.points-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.8em;
}

#version-badge {
  background: var(--primary);
  color: black;
  padding: 5px 10px;
  border-radius: 50px;
  margin-right: 5px;
  font-weight: bold;
}

@keyframes winner-pulse {
  from { text-shadow: 0 0 10px var(--warning); }
  to { text-shadow: 0 0 20px var(--warning), 0 0 30px var(--warning); }
}

@keyframes tie-pulse {
  from { text-shadow: 0 0 10px var(--primary); }
  to { text-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary); }
}

#question-mark-icon {
  border: 1px solid white;
  border-radius: 100%;
  padding: 1px 4px;
  font-style: normal;
}



#nextRoundBtnFooter, #contactBtn {
  background: black;
  color: white;
  border: 1px solid #777;
  padding: 0px 10px;
  width: 100px;
  height: 28px;
  font-size: 0.8em;
  display: inline-block;
  margin-bottom: 5px;
}

#contact-icon {
  font-size: 18px;
  vertical-align: middle;
  font-style: normal;
  display: inline;
}

#nextRoundBtnFooter:hover, #contactBtn:hover {
  background: gray;
}