* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  background: #0a0a0a;
  color: #eee;
  font-family: 'Georgia', serif;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

header {
  text-align: center;
  margin-bottom: 48px;
}

h1 {
  font-size: 34px;
  letter-spacing: 2px;
  color: #d4b483;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.subtitulo {
  font-size: 13px;
  color: #8a7a5c;
  letter-spacing: 3px;
  margin-top: 8px;
  text-transform: uppercase;
}

/* --- Login --- */
#login-section {
  max-width: 380px;
  margin: 0 auto;
  text-align: center;
}

#login-section label {
  display: block;
  font-size: 13px;
  color: #8a7a5c;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.fila {
  display: flex;
  gap: 8px;
}

#input-usuario {
  flex: 1;
  background: rgba(20, 15, 10, 0.9);
  border: 1px solid rgba(212,180,131,0.25);
  color: #f0ead6;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 15px;
  border-radius: 3px;
  outline: none;
}

#input-usuario:focus {
  border-color: #d4b483;
}

button {
  background: rgba(212,180,131,0.15);
  border: 1px solid rgba(212,180,131,0.5);
  color: #d4b483;
  padding: 12px 22px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  border-radius: 3px;
  transition: all 0.2s;
  letter-spacing: 1px;
}

button:hover {
  background: rgba(212,180,131,0.3);
}

button.secundario {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: #aaa;
}

button.secundario:hover {
  background: rgba(255,255,255,0.05);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Partidas --- */
.cabecera-partidas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.cabecera-partidas h2 {
  font-size: 18px;
  color: #d4b483;
  letter-spacing: 2px;
  font-weight: normal;
}

.acciones-cabecera {
  display: flex;
  gap: 8px;
}

#lista-partidas {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.partida-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 22, 14, 0.6);
  border: 1px solid rgba(212,180,131,0.2);
  padding: 16px 20px;
  border-radius: 3px;
  transition: all 0.2s;
}

.partida-item:hover {
  border-color: rgba(212,180,131,0.5);
  background: rgba(40, 30, 18, 0.7);
}

.partida-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  flex: 1;
}

.partida-titulo {
  font-size: 16px;
  color: #f0ead6;
}

.partida-meta {
  font-size: 12px;
  color: #8a7a5c;
  letter-spacing: 1px;
}

.partida-acciones {
  display: flex;
  gap: 8px;
}

.btn-borrar {
  background: transparent;
  border: 1px solid rgba(180, 80, 80, 0.4);
  color: #b45050;
  padding: 6px 12px;
  font-size: 12px;
}

.btn-borrar:hover {
  background: rgba(180, 80, 80, 0.15);
  border-color: #b45050;
}

#mensaje {
  padding: 12px 16px;
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 20px;
}

#mensaje.info {
  background: rgba(80, 120, 180, 0.15);
  border: 1px solid rgba(80, 120, 180, 0.4);
  color: #a8c4e0;
}

#mensaje.error {
  background: rgba(180, 80, 80, 0.15);
  border: 1px solid rgba(180, 80, 80, 0.4);
  color: #e0a8a8;
}

#sin-partidas {
  text-align: center;
  padding: 40px 20px;
  color: #6a5a3c;
  font-size: 14px;
  font-style: italic;
}

.oculto {
  display: none !important;
}

/* Tema compartido con config.html */
:root {
  --tema-rosa: rgba(255, 0, 200, 0.35);
  --tema-cian: rgba(0, 200, 255, 0.38);
  --tema-borde: rgba(255,255,255,0.28);
}

html, body {
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  background: #29182b url('/background.webp') center / cover fixed no-repeat;
}

#app { padding-top: 40px; }
h1 { color: white; text-shadow: 0 2px 8px rgba(0,0,0,0.65); }
.subtitulo { color: #8deaff; letter-spacing: 2px; }

#login-section label { color: white; letter-spacing: 1px; }
#input-usuario {
  background: rgba(20,12,27,0.76);
  border-color: var(--tema-borde);
  color: white;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
}
#input-usuario:focus { border-color: rgba(0,220,255,0.85); }

button {
  background: var(--tema-rosa);
  border-color: var(--tema-borde);
  border-radius: 9px;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
button:hover { background: var(--tema-cian); }
button.secundario { background: rgba(255,255,255,0.1); border-color: var(--tema-borde); color: white; }
button.secundario:hover { background: rgba(0,200,255,0.3); }

.cabecera-partidas h2 { color: white; letter-spacing: 1px; }
.partida-item {
  border-color: var(--tema-borde);
  border-radius: 10px;
  background: rgba(255,0,200,0.18);
  backdrop-filter: blur(8px);
}
.partida-item:hover {
  border-color: rgba(0,220,255,0.65);
  background: rgba(0,200,255,0.25);
}
.partida-titulo { color: white; }
.partida-meta { color: rgba(255,255,255,0.72); letter-spacing: 0.3px; }
.btn-borrar { background: rgba(220,70,90,0.25); border-color: rgba(255,180,190,0.55); color: white; }
.btn-borrar:hover { background: rgba(220,70,90,0.55); border-color: white; }

#mensaje.info {
  background: rgba(0,200,255,0.2);
  border-color: rgba(0,200,255,0.55);
  color: white;
}
#mensaje.error {
  background: rgba(220,70,90,0.24);
  border-color: rgba(255,180,190,0.55);
  color: white;
}
#sin-partidas { color: rgba(255,255,255,0.8); }

@media (max-width: 600px) {
  #app { padding: 28px 16px 48px; }
  header { margin-bottom: 32px; }
  h1 { font-size: 29px; }
  .cabecera-partidas { align-items: stretch; }
  .acciones-cabecera { flex-wrap: wrap; }
  .acciones-cabecera button { flex: 1 1 100%; }
  .partida-item { align-items: flex-start; gap: 12px; padding: 14px; }
  .partida-acciones { flex-direction: column; }
}