/* styles.css CORREGIDO */
:root {
  --bg-body: #ffffff;      /* BLANCO PURO */
  --bg-panel: #f9f9f9;     /* Gris muy claro para paneles */
  --text-main: #333333;
  --text-nombre: #000000; 
  --border-color: #cccccc;
  --new-cyan: #97cee9;     
  --new-violet: #cf689f;   
  --radius: 8px;           
  --font-title: 'Bebas Neue', sans-serif;
  --font-text: 'Arial', sans-serif;
  --shadow: rgba(0, 0, 0, 0.15);
  --text-eliminated: #999999;
}

body {
  margin: 0;
  font-family: var(--font-text);
  background: var(--bg-body);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center; /* VOLVEMOS A CENTRAR TODO EL CUERPO */
  min-height: 100vh;
  overflow-x: hidden;
}

/* TIPOGRAFÍA */
h1, h2, h3, .panel-header, .panel-title, button, label {
    font-family: var(--font-title);
    text-transform: uppercase;
}

/* ESTRUCTURA */
header {
  padding: 20px;
  width: 100%;
  text-align: center; /* Logo y título centrados */
  box-sizing: border-box;
}

main {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    align-items: center; /* Mantiene los paneles centrados en la pantalla */
    width: 100%;
}

/* PANELES (SETUP) - Se ve normal, centrado */
.panel {
  background: var(--bg-panel);
  width: 400px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius); 
  box-shadow: 0 5px 20px var(--shadow);
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.panel-scroll-content {
    max-height: 450px; 
    overflow-y: auto; 
}

.panel-header, .panel-title {
    background: var(--new-violet);
    color: #fff;
    padding: 15px;
    font-size: 1.2rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group, .list-container, .mode-select {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.inputs-row { display: flex; gap: 10px; }

input, select {
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 4px;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 14px;
  border: none;
  background: var(--new-cyan); 
  color: #000; 
  border-radius: var(--radius); 
  margin-top: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: 0.2s;
}
button:hover { background: var(--new-violet); color: white; }

.btn-start {
    background: linear-gradient(90deg, var(--new-violet), var(--new-cyan));
    color: #fff;
    font-size: 1.5rem;
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0;
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--new-violet);
    color: var(--text-main);
}

/* JUEGO */
.hidden { display: none !important; }

.game-container {
    display: flex;
    justify-content: center; /* Centra el bloque general */
    align-items: flex-start;
    /* AQUÍ ESTÁ EL CAMBIO: Aumentamos el gap para empujar el panel derecho más lejos */
    gap: 100px; 
    width: 95%;
    max-width: 1400px;
    margin-top: 20px; 
}

.duration-control {
    width: 120px; 
    text-align: center;
    padding-top: 100px;
}

/* RULETA Y FLECHA */
.bloque-ruleta {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-border {
    position: relative;
    padding: 10px;
    border: 4px solid var(--new-cyan); 
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 20px var(--shadow);
}

/* FLECHA derecha (Mantenida como pediste) */
.flecha {
    position: absolute;
    top: 50%;
    right: -25px; /* Cambiado de left a right */
    left: auto;   /* Resetea la posición izquierda */
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 30px solid var(--new-violet); /* Cambiado de border-left a border-right */
    z-index: 10;
}

#controles { display: flex; gap: 10px; margin-top: 20px; width: 100%; }

/* MARCADOR */
.bloque-info { 
    width: 320px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px;
    /* Al aumentar el gap en game-container, esto se verá "más a la derecha" */
}

.panel-info {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius); 
    overflow: hidden;
}

.marcador-list {
    max-height: 350px; 
    overflow-y: auto; 
    padding: 0; margin: 0;
}

#marcadorEnVivo li {
    padding: 8px 15px;
    border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between;
    font-weight: bold;
}
.eliminated { text-decoration: line-through; color: var(--text-eliminated); }

#historial { height: 200px; overflow-y: auto; padding: 10px; font-size: 0.85rem; }

/* ADMIN */
.panel-admin {
    background: #fff;
    width: 90%; max-width: 1200px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}
.panel-admin .inputs-row input { flex-grow: 1; }
.panel-admin button { width: auto; min-width: 150px; margin: 0; }

/* POPUP */
.overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999; 
}

.popup {
  background: #fff;
  border: 3px solid var(--new-cyan);
  width: 450px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2); 
  overflow: hidden;
}
.popup h2 { background: var(--new-cyan); margin: 0; padding: 15px; }
.result-box { padding: 30px; font-size: 1.5rem; font-family: var(--font-title); }
.popup-btns { padding: 20px; background: #f0f0f0; }

span.highlight { color: var(--new-violet); font-size: 1.2em; }
footer { margin-top: 30px; padding-bottom: 10px; font-size: 0.8rem; color: #999; }