/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  position: relative;
}

/* Background */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/BG_Imagem.jpg") center center / cover no-repeat;
  z-index: -2;
}

.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

/* Container principal - Full HD otimizado */
.container {
  width: 100vw;
  height: 100vh;
  max-width: 1920px;
  max-height: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 40px 60px;
  position: relative;
}

/* Logo no topo */
.header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.logo {
  height: 170px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/* Área da Roleta */
.roleta-container {
  position: relative;
  width: 90vw;
  max-width: 1400px;
  height: 360px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.roleta-wheel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.pergunta-item {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  font-size: 28px;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: all 0.2s ease;
  color: #fff;
}

.pergunta-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.08);
}

.pergunta-item.highlight {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.2)
  );
  transform: scale(1.02);
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Seletor no centro */
.roleta-selector {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 120px;
  transform: translateY(-50%);
  border-top: 5px solid #ffd700;
  border-bottom: 5px solid #ffd700;
  background: linear-gradient(
    90deg,
    rgba(255, 215, 0, 0.1),
    rgba(255, 215, 0, 0.2) 50%,
    rgba(255, 215, 0, 0.1)
  );
  pointer-events: none;
  z-index: 10;
  box-shadow:
    inset 0 0 20px rgba(255, 215, 0, 0.5),
    0 0 40px rgba(255, 215, 0, 0.6);
}

/* Pergunta Selecionada */
.pergunta-selecionada {
  width: 1400px;
  padding: 60px;
  text-align: center;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 20px;
  animation: slideIn 0.5s ease-out;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 3px solid rgba(255, 215, 0, 0.5);
}

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

.pergunta-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 30px;
  letter-spacing: 2px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.pergunta-texto {
  font-size: 52px;
  font-weight: bold;
  line-height: 1.5;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  padding: 0 20px;
}

/* Controles */
.controles {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-top: 20px;
}

.btn {
  padding: 20px 60px;
  font-size: 24px;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.6);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-large {
  padding: 25px 80px;
  font-size: 28px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* Botões de canto */
.corner-buttons {
  position: absolute;
  top: 40px;
  right: 60px;
  display: flex;
  gap: 15px;
}

.btn-icon {
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Botão Fullscreen no canto */
.btn-fullscreen-corner {
  position: absolute;
  top: 40px;
  right: 60px;
  width: 50px;
  height: 50px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.btn-fullscreen-corner:hover {
  background: rgba(255, 215, 0, 0.8);
  transform: scale(1.1);
}

:fullscreen .btn-fullscreen-corner,
:-webkit-full-screen .btn-fullscreen-corner,
:-moz-full-screen .btn-fullscreen-corner {
  display: none;
}

/* Indicador de status (discreto) */
.status-indicator {
  position: absolute;
  top: 45px;
  right: 120px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.status-indicator.online {
  background: #28a745;
  box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

.status-indicator.offline {
  background: #dc3545;
  box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
}

.status-indicator:hover {
  opacity: 1;
  transform: scale(1.5);
}

:fullscreen .status-indicator,
:-webkit-full-screen .status-indicator,
:-moz-full-screen .status-indicator {
  display: none;
}

/* Stats */
.stats {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.stat-item {
  font-size: 20px;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 25px;
  border-radius: 25px;
  color: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 215, 0, 0.3);
}

.stat-item strong {
  color: #ffd700;
  font-size: 24px;
  margin-left: 8px;
  font-weight: bold;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
}

.spinner {
  width: 80px;
  height: 80px;
  border: 6px solid rgba(255, 215, 0, 0.3);
  border-top: 6px solid #ffd700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 30px;
}

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

.loading-overlay p {
  font-size: 32px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Modo Tela Cheia */
:fullscreen .container,
:-webkit-full-screen .container,
:-moz-full-screen .container {
  width: 100vw;
  height: 100vh;
  transform: none !important;
}

:fullscreen .pergunta-texto,
:-webkit-full-screen .pergunta-texto,
:-moz-full-screen .pergunta-texto {
  font-size: 64px;
}

:fullscreen .roleta-container,
:-webkit-full-screen .roleta-container,
:-moz-full-screen .roleta-container {
  width: 85vw;
  max-width: 1600px;
  height: 360px;
}

:fullscreen .logo,
:-webkit-full-screen .logo,
:-moz-full-screen .logo {
  height: 170px;
}
