* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg-dark: #0a0a0a;
  --color-bg-medium: #1a1a1a;
  --color-bg-light: #2a2a2a;
  --color-primary: #c41e3a;
  --color-primary-dark: #8b0000;
  --color-secondary: #b8860b;
  --color-text: #e0e0e0;
  --color-text-dim: #888;
  --color-danger: #ff4444;
  --color-success: #44ff88;
  --color-shadow: rgba(196, 30, 58, 0.5);
}

body {
  font-family: 'Roboto', sans-serif;
  background-image: url('./img/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
}

/* Background especial para a tela de jogo */
#game-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('./img/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px) brightness(0.25);
  z-index: 0;
}

#game-screen::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.7), rgba(0, 0, 0, 0.8));
  z-index: 1;
}

#game-screen {
  position: relative;
}

/* Efeito de Fumaça */
.smoke-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.smoke {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(100, 100, 100, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  animation: float 20s infinite ease-in-out;
}

/* Partículas adicionais para tela de jogo */
#game-screen.active .smoke-container .smoke {
  background: radial-gradient(circle, rgba(196, 30, 58, 0.08) 0%, transparent 70%);
}

.smoke:nth-child(1) {
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.smoke:nth-child(2) {
  top: 50%;
  right: -150px;
  animation-delay: -7s;
}

.smoke:nth-child(3) {
  bottom: -200px;
  left: 50%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(100px, -100px) scale(1.1); }
  66% { transform: translate(-100px, 100px) scale(0.9); }
}

/* Screens */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none !important;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 100;
  overflow-y: auto;
}

.screen.active {
  display: flex !important;
  flex-direction: column;
}

/* Splash Screen */
.splash-screen {
  background: radial-gradient(circle at center, rgba(196, 30, 58, 0.2) 0%, rgba(10, 10, 10, 0.95) 70%);
  backdrop-filter: blur(10px);
}

.splash-content {
  text-align: center;
  animation: fadeInUp 0.8s ease;
}

.splash-title {
  font-size: 80px;
  letter-spacing: 15px;
  text-shadow: 
    0 0 40px var(--color-shadow),
    0 0 80px rgba(196, 30, 58, 0.5),
    0 0 100px rgba(196, 30, 58, 0.3);
  animation: pulse 2s ease-in-out infinite;
  margin-bottom: 8px;
  background: transparent;
}

.splash-subtitle {
  font-size: 22px;
  letter-spacing: 8px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.btn-large {
  padding: 18px 45px;
  font-size: 20px;
  letter-spacing: 3px;
  margin-bottom: 15px;
  animation: pulse 2s ease-in-out infinite;
}

.btn-large:hover {
  transform: scale(1.1);
}

.splash-hint {
  color: var(--color-text-dim);
  font-size: 14px;
  font-style: italic;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Esconde elementos de jogo quando não na tela de jogo */
#login-screen .clues-panel,
#login-screen .players-sidebar,
#login-screen .game-area,
#login-screen .player-info-panel,
#lobby-screen .clues-panel,
#lobby-screen .players-sidebar,
#lobby-screen .game-area,
#lobby-screen .player-info-panel,
#end-screen .clues-panel,
#end-screen .players-sidebar,
#end-screen .game-area,
#end-screen .player-info-panel {
  display: none !important;
  visibility: hidden !important;
}

/* Apenas mostra painéis de jogo quando game-screen está ativo */
.clues-panel,
.players-sidebar,
.game-area,
.player-info-panel {
  display: none;
}

#game-screen.active .clues-panel,
#game-screen.active .players-sidebar,
#game-screen.active .game-area,
#game-screen.active .player-info-panel {
  display: block;
}

#game-screen.active .game-area {
  display: flex;
}

#game-screen.active .player-info-panel {
  display: flex;
}

/* Logo */
.logo-container {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease;
  position: relative;
  z-index: 200;
}

.game-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 64px;
  color: var(--color-text);
  text-shadow: 
    0 0 20px var(--color-primary),
    0 0 40px var(--color-primary),
    0 0 60px var(--color-primary);
  letter-spacing: 8px;
  margin: 0;
  line-height: 1;
  position: relative;
  z-index: 200;
  background: transparent;
}

.game-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: var(--color-secondary);
  letter-spacing: 6px;
  margin-top: 5px;
  text-shadow: 0 0 10px var(--color-secondary);
  position: relative;
  z-index: 200;
}

/* Cards */
.card {
  background: rgba(26, 26, 26, 0.95);
  border: 2px solid var(--color-bg-light);
  border-radius: 10px;
  padding: 25px;
  max-width: 500px;
  width: 100%;
  box-shadow: 
    0 10px 50px rgba(0, 0, 0, 0.8),
    0 0 30px var(--color-shadow);
  animation: fadeInUp 1s ease;
  position: relative;
  z-index: 200;
}

.lobby-card, .end-card {
  max-width: 600px;
}

/* Inputs */
input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  background: var(--color-bg-dark);
  border: 2px solid var(--color-bg-light);
  border-radius: 5px;
  color: var(--color-text);
  margin-bottom: 15px;
  transition: all 0.3s ease;
  font-family: 'Roboto', sans-serif;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-shadow);
}

/* Buttons */
.btn {
  position: relative;
  padding: 12px 30px;
  font-size: 16px;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  background: var(--color-bg-light);
  border: 2px solid var(--color-primary);
  color: var(--color-text);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  border-radius: 5px;
  text-transform: uppercase;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  transition: left 0.3s ease;
  z-index: 0;
}

.btn:hover::before {
  left: 0;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn:hover {
  box-shadow: 0 0 30px var(--color-shadow);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--color-text-dim);
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-primary {
  border-color: var(--color-primary);
}

.btn-primary::before {
  background: var(--color-primary);
}

.btn-secondary {
  border-color: var(--color-secondary);
}

.btn-secondary::before {
  background: var(--color-secondary);
}

.btn-danger {
  border-color: var(--color-danger);
}

.btn-danger::before {
  background: var(--color-danger);
}

.button-group {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

/* Join Room */
.join-room-container {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--color-bg-light);
  animation: fadeIn 0.3s ease;
}

/* Rules */
.rules-container {
  max-width: 500px;
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  background: rgba(26, 26, 26, 0.7);
  border: 1px solid var(--color-bg-light);
  border-radius: 10px;
  animation: fadeInUp 1s ease 0.3s both;
  position: relative;
  z-index: 200;
}

.rules-container h3 {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--color-primary);
  font-size: 20px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.rules-container ul {
  list-style: none;
  padding-left: 0;
}

.rules-container li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  color: var(--color-text-dim);
  font-size: 13px;
  line-height: 1.5;
}

.rules-container li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* Lobby */
.room-code-display {
  text-align: center;
  margin: 30px 0;
}

.room-code-display span {
  display: block;
  font-size: 14px;
  color: var(--color-text-dim);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.room-code-display .code {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--color-primary);
  letter-spacing: 10px;
  text-shadow: 0 0 20px var(--color-shadow);
  padding: 20px;
  background: var(--color-bg-dark);
  border-radius: 10px;
  border: 2px solid var(--color-primary);
}

/* Icon-only share button */
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(196,30,58,0.06);
  border: 1px solid rgba(196,30,58,0.12);
  color: var(--color-text);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.icon-btn i { color: var(--color-primary); font-size: 18px; }

.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(196,30,58,0.18);
  background: rgba(196,30,58,0.08);
}

/* Slightly smaller code box on narrow screens to keep layout compact */
@media (max-width: 800px) {
  .room-code-display .code { font-size: 40px; padding: 14px; }
  .icon-btn { width: 40px; height: 40px; }
}

/* New row layout to position code and icon nicely */
.room-code-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.room-code-row .code { margin: 0; }

/* Make the icon circular and subtle */
.icon-btn {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(196,30,58,0.12);
  color: var(--color-text);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.icon-btn:focus { outline: 2px solid rgba(196,30,58,0.18); }

@media (max-width: 800px) {
  .room-code-row { gap: 8px; }
  .icon-btn { width: 40px; height: 40px; }
}

.players-list {
  margin: 30px 0;
}

.players-list h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 15px;
  color: var(--color-secondary);
}

#players-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.player-item {
  padding: 12px 20px;
  background: var(--color-bg-dark);
  border: 1px solid var(--color-bg-light);
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

.player-icon {
  font-size: 18px;
  color: var(--color-secondary);
  width: 26px;
  text-align: center;
}

.player-name {
  flex: 1;
  font-size: 15px;
}

.host-badge {
  font-size: 14px;
  margin-left: 8px;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.host-badge i { color: var(--color-primary); }

/* Configurações do Host */
.host-settings {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
  border: 2px solid var(--color-primary);
  border-radius: 12px;
  padding: 25px;
  margin: 25px 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.host-settings h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 20px;
  text-align: center;
  text-transform: uppercase;
}

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

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-item label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.setting-item input[type="number"] {
  padding: 12px 16px;
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid var(--color-bg-light);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  transition: all 0.3s ease;
}

.setting-item input[type="number"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(196, 30, 58, 0.3);
  background: rgba(10, 10, 10, 0.95);
}

.setting-item input[type="number"]::-webkit-inner-spin-button,
.setting-item input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.setting-item input[type="number"] {
  -moz-appearance: textfield;
}

.waiting-message {
  text-align: center;
  color: var(--color-text-dim);
  margin-top: 20px;
  font-style: italic;
}

/* Game Screen */
#game-screen {
  display: none;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 30px 20px;
  overflow-y: auto;
}

#game-screen.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

/* Container principal do jogo */
.game-container {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 100;
  margin: 0 auto;
  padding: 0 20px;
}

.player-info-panel {
  width: 100%;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.role-reveal {
  flex: 1 1 100%;
  min-width: 400px;
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(10, 10, 10, 0.98));
  border: 3px solid var(--color-primary);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 
    0 0 40px var(--color-shadow),
    inset 0 0 30px rgba(196, 30, 58, 0.1);
  position: relative;
  overflow: hidden;
  animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
  0%, 100% { 
    box-shadow: 
      0 0 40px var(--color-shadow),
      inset 0 0 30px rgba(196, 30, 58, 0.1);
  }
  50% { 
    box-shadow: 
      0 0 60px var(--color-shadow),
      inset 0 0 50px rgba(196, 30, 58, 0.15);
  }
}

.role-reveal::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(196, 30, 58, 0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

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

#role-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 3px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  line-height: 1.2;
}

#word-text {
  font-size: 36px;
  font-weight: bold;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--color-secondary);
  text-shadow: 
    0 0 30px rgba(184, 134, 11, 0.8),
    0 0 60px rgba(184, 134, 11, 0.5);
  position: relative;
  z-index: 1;
  letter-spacing: 5px;
  padding: 12px;
  background: rgba(184, 134, 11, 0.1);
  border-radius: 8px;
  margin-top: 10px;
}

.game-info {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.info-item {
  background: linear-gradient(145deg, rgba(42, 42, 42, 0.95), rgba(26, 26, 26, 0.95));
  border: 2px solid var(--color-bg-light);
  border-radius: 10px;
  padding: 10px 25px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  min-width: 110px;
}

.info-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  border-color: var(--color-primary);
}

.info-item .label {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--color-text-dim);
  margin-bottom: 3px;
}

.info-item .value {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  color: var(--color-primary);
  text-shadow: 0 0 10px var(--color-shadow);
}

/* Game Area */
.game-area {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.turn-panel {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(10, 10, 10, 0.98));
  border: 3px solid var(--color-primary);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  animation: slideIn 0.3s ease;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 50px var(--color-shadow),
    inset 0 0 30px rgba(196, 30, 58, 0.05);
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.turn-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 15px;
  padding: 3px;
  background: linear-gradient(45deg, var(--color-primary), transparent, var(--color-primary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  animation: borderGlow 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.turn-info h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 4px;
  margin-bottom: 20px;
  color: var(--color-primary);
  text-transform: uppercase;
  text-shadow: 0 0 20px var(--color-shadow);
}

.timer-container {
  margin: 20px 0;
}

.timer {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 60px;
  color: var(--color-text);
  background: radial-gradient(circle, rgba(26, 26, 26, 1) 0%, rgba(10, 10, 10, 1) 100%);
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  line-height: 120px;
  text-align: center;
  box-shadow: 
    0 0 40px var(--color-shadow),
    0 0 80px rgba(196, 30, 58, 0.3),
    inset 0 0 40px rgba(196, 30, 58, 0.1);
  animation: pulse 1s infinite;
  position: relative;
}

.timer::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0.3;
  animation: ripple 1.5s ease-out infinite;
}

/* @keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px var(--color-shadow), 0 0 80px rgba(196, 30, 58, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px var(--color-shadow), 0 0 120px rgba(196, 30, 58, 0.5); }
} */

@keyframes ripple {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 0; }
}

.clue-input-container {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  align-items: stretch;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 10;
}

.clue-input-container input {
  flex: 1;
  margin: 0;
  font-size: 16px;
  padding: 12px 18px;
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid var(--color-primary);
  color: var(--color-text);
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  position: relative;
  z-index: 11;
  cursor: text;
}

.clue-input-container input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 30px var(--color-shadow);
  background: rgba(10, 10, 10, 0.95);
}

.clue-input-container .btn {
  padding: 12px 25px;
  font-size: 16px;
  white-space: nowrap;
}

/* Clues Panel */
.clues-panel {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
  border: 2px solid var(--color-bg-light);
  border-radius: 15px;
  padding: 25px;
  max-height: 450px;
  overflow-y: auto;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.clues-panel h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 3px;
  margin-bottom: 18px;
  color: var(--color-secondary);
  text-align: center;
  text-shadow: 0 0 15px rgba(184, 134, 11, 0.5);
}

#clues-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clue-item {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(15, 15, 15, 0.9));
  border-left: 4px solid var(--color-primary);
  padding: 12px 18px;
  border-radius: 8px;
  animation: slideInLeft 0.3s ease;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.clue-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  border-left-color: var(--color-secondary);
}

.clue-item .player-name {
  font-weight: bold;
  color: var(--color-primary);
  margin-right: 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clue-item .clue-text {
  color: var(--color-text);
  font-size: 14px;
  font-style: italic;
}

/* Voting Panel */
.voting-panel {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(10, 10, 10, 0.98));
  border: 3px solid var(--color-danger);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  animation: slideIn 0.3s ease;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(255, 68, 68, 0.4);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.voting-panel h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 4px;
  color: var(--color-danger);
  margin-bottom: 15px;
  text-shadow: 0 0 30px rgba(255, 68, 68, 0.6);
  text-transform: uppercase;
}

.voting-panel p {
  color: var(--color-text);
  margin-bottom: 20px;
  font-size: 18px;
}

.vote-timer-container {
  margin: 20px 0 25px;
  text-align: center;
}

.vote-timer {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--color-danger);
  text-align: center;
  text-shadow: 0 0 30px var(--color-shadow);
  animation: pulse 1s ease-in-out infinite;
  min-width: 80px;
  display: inline-block;
  background: transparent !important;
  border: none !important;
  padding: 0;
  width: auto !important;
  height: auto !important;
  line-height: normal !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.vote-timer::before {
  display: none !important;
}

#vote-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.vote-option {
  padding: 18px 16px;
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid var(--color-bg-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.vote-option::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 68, 68, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.vote-option:hover {
  border-color: var(--color-danger);
  background: rgba(255, 68, 68, 0.1);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255, 68, 68, 0.4);
}

.vote-option:hover::before {
  width: 300px;
  height: 300px;
}

.vote-option.voted {
  border-color: var(--color-danger);
  background: linear-gradient(145deg, rgba(255, 68, 68, 0.3), rgba(139, 0, 0, 0.3));
  color: var(--color-text);
  box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
  transform: scale(1.05);
}

.vote-option.voted::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--color-danger);
  font-size: 24px;
  font-weight: bold;
}

#skip-vote-btn {
  margin-top: 20px;
  padding: 12px 30px;
  font-size: 16px;
}

#skip-vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Impostor Panel */
.impostor-panel {
  background: linear-gradient(145deg, rgba(139, 0, 0, 0.3), rgba(75, 0, 0, 0.2));
  border: 3px solid var(--color-primary-dark);
  border-radius: 15px;
  padding: 35px;
  text-align: center;
  animation: slideIn 0.3s ease;
  box-shadow: 
    0 10px 40px rgba(139, 0, 0, 0.5),
    inset 0 0 40px rgba(139, 0, 0, 0.2);
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.impostor-panel h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 4px;
  margin-bottom: 20px;
  color: var(--color-danger);
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
  text-transform: uppercase;
}

.impostor-panel p {
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--color-text);
}

.impostor-panel input {
  margin-bottom: 20px;
  max-width: 400px;
  width: 100%;
  font-size: 18px;
  padding: 15px 20px;
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid var(--color-primary-dark);
}

.impostor-panel input:focus {
  border-color: var(--color-danger);
  box-shadow: 0 0 25px rgba(255, 68, 68, 0.4);
}

.impostor-panel small {
  display: block;
  margin-top: 20px;
  color: var(--color-text-dim);
  font-size: 14px;
}

/* Players Sidebar */
.players-sidebar {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
  border: 2px solid var(--color-bg-light);
  border-radius: 15px;
  padding: 20px 25px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.7);
}

.players-sidebar h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 3px;
  margin-bottom: 15px;
  color: var(--color-secondary);
  text-align: center;
  text-shadow: 0 0 15px rgba(184, 134, 11, 0.5);
}

#game-players-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.game-player-item {
  padding: 10px 14px;
  background: rgba(10, 10, 10, 0.8);
  border: 2px solid var(--color-bg-light);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  transition: all 0.3s ease;
  font-weight: 500;
}

.game-player-item.eliminated {
  opacity: 0.3;
  text-decoration: line-through;
  filter: grayscale(100%);
}

.game-player-item.active {
  border-color: var(--color-primary);
  background: rgba(196, 30, 58, 0.2);
  box-shadow: 0 0 20px var(--color-shadow);
  transform: scale(1.05);
  font-weight: bold;
}

.game-player-item.active::before {
  content: '▶ ';
  color: var(--color-primary);
}

.game-player-item.played {
  border-color: var(--color-success);
  background: rgba(68, 255, 136, 0.1);
}

.game-player-item.played::after {
  content: ' ✓';
  color: var(--color-success);
}

/* End Screen */
.end-card {
  text-align: center;
}

.end-card h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 5px;
  margin-bottom: 30px;
  color: var(--color-primary);
  text-shadow: 0 0 30px var(--color-shadow);
}

.winner-info {
  font-size: 32px;
  margin-bottom: 30px;
  padding: 30px;
  background: var(--color-bg-dark);
  border-radius: 10px;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
}

.winner-info.impostor-win {
  color: var(--color-danger);
  border: 2px solid var(--color-danger);
  box-shadow: 0 0 30px rgba(255, 68, 68, 0.3);
}

.winner-info.crewmates-win {
  color: var(--color-success);
  border: 2px solid var(--color-success);
  box-shadow: 0 0 30px rgba(68, 255, 136, 0.3);
}

.end-details {
  margin: 30px 0;
  padding: 20px;
  background: var(--color-bg-dark);
  border-radius: 10px;
}

.end-details p {
  margin: 10px 0;
  font-size: 18px;
}

.end-details strong {
  color: var(--color-primary);
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--color-bg-medium);
  border: 2px solid var(--color-primary);
  border-radius: 10px;
  padding: 20px 30px;
  max-width: 400px;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transform: translateX(500px);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

/* Music Toggle Button */
.music-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.music-toggle:hover {
  transform: scale(1.1);
  border-color: var(--color-primary);
  box-shadow: 0 5px 30px var(--color-shadow);
}

.music-toggle:active {
  transform: scale(0.95);
}

#music-icon {
  display: block;
  line-height: 1;
  user-select: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-bg-light), var(--color-primary));
  border-radius: 10px;
  border: 2px solid var(--color-bg-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
  box-shadow: 0 0 10px var(--color-shadow);
}

/* Scrollbar Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-bg-dark);
}

/* Error state for inputs */
.input-error {
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.3) !important;
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .game-container {
    max-width: 95%;
  }

  .game-title {
    font-size: 60px;
  }

  .timer {
    width: 140px;
    height: 140px;
    line-height: 140px;
    font-size: 70px;
  }

  #game-players-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .game-title {
    font-size: 48px;
    letter-spacing: 5px;
  }

  .splash-title {
    font-size: 60px;
    letter-spacing: 10px;
  }

  .splash-subtitle {
    font-size: 20px;
    letter-spacing: 5px;
  }

  .btn-large {
    padding: 20px 40px;
    font-size: 20px;
  }
  
  .game-subtitle {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .card {
    padding: 30px 20px;
  }

  .button-group {
    flex-direction: column;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .host-settings {
    padding: 20px 15px;
  }

  .player-info-panel {
    flex-direction: column;
  }

  .role-reveal {
    min-width: 100%;
    padding: 30px 20px;
  }

  #role-text {
    font-size: 32px;
  }

  #word-text {
    font-size: 36px;
    letter-spacing: 4px;
  }

  .turn-panel {
    padding: 30px 20px;
  }

  .turn-info h3 {
    font-size: 28px;
  }

  .timer {
    width: 120px;
    height: 120px;
    line-height: 120px;
    font-size: 60px;
  }

  .clue-input-container {
    flex-direction: column;
  }

  .clue-input-container .btn {
    width: 100%;
  }

  #vote-options {
    grid-template-columns: 1fr;
  }

  #game-players-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .game-player-item {
    padding: 12px 10px;
    font-size: 14px;
  }

  .music-toggle {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .notification {
    right: 10px;
    top: 10px;
    max-width: calc(100% - 20px);
    padding: 15px 20px;
  }
}

/* Garantir que apenas uma tela seja visível por vez */
body > .screen:not(.active) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body > .screen.active {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
