* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #111827;
  color: #f8fafc;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

body.admin-theme {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.15), transparent 20%),
              radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 22%),
              #020617;
  color: #dbf9ff;
}

body.admin-theme .container {
  background: rgba(7, 28, 48, 0.96);
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.2);
}

body.admin-theme header h1,
body.admin-theme header p,
body.admin-theme footer {
  color: #d9f9ff;
}

body.admin-theme .card {
  background: rgba(3, 23, 43, 0.95);
  border-color: rgba(34, 197, 94, 0.35);
}

body.admin-theme button {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  color: #ffffff;
}

body.admin-theme button:hover {
  background: linear-gradient(135deg, #16a34a, #0ea5e9);
}

body.admin-theme .page-logo {
  max-height: 90px;
  border-radius: 16px;
  border: 2px solid rgba(34, 197, 94, 0.7);
  background: rgba(7, 18, 34, 0.85);
  padding: 8px;
}

body.admin-theme .auth-card {
  background: rgba(4, 18, 38, 0.98);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 50px rgba(34, 197, 94, 0.25);
}

body.admin-theme .auth-card h2 {
  color: #a5f3fc;
}

body.admin-theme .auth-card p,
body.admin-theme .auth-card .auth-note {
  color: #cfe9f8;
}

body.admin-theme .auth-card input {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(15, 23, 42, 0.98);
}

body.admin-theme .auth-card button {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
}

body.admin-theme .auth-card button:hover {
  background: linear-gradient(135deg, #16a34a, #0ea5e9);
}

.header-with-logo {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.page-logo {
  max-height: 84px;
  border-radius: 18px;
  border: 2px solid rgba(14, 165, 233, 0.6);
  background: rgba(15, 23, 42, 0.8);
  padding: 8px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 16, 37, 0.96);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(8, 27, 46, 0.98);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.2);
}

.auth-card h2 {
  margin-top: 16px;
  margin-bottom: 14px;
  color: #bae6fd;
}

.auth-card p,
.auth-card .auth-note {
  color: #cbd5e1;
  margin-bottom: 18px;
  line-height: 1.5;
}

.auth-card input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font-size: 1rem;
}

.auth-card button {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
}

header {
  margin-bottom: 24px;
}

h1, h2, h3 {
  margin: 0 0 12px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  background: #2563eb;
  color: #fff;
  transition: background 0.2s ease;
}

button:hover {
  background: #1d4ed8;
}

button.secondary {
  background: #475569;
}

button.danger {
  background: #dc2626;
}

.card {
  background: #1f2937;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  padding: 10px;
  font-size: 0.95rem;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.status {
  margin-top: 8px;
  color: #a5b4fc;
}

.alert {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid #334155;
}

footer {
  margin-top: 24px;
  text-align: center;
  color: #94a3b8;
}

/* Estilos hologram futurista para index.html */
.hologram-card {
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.8), rgba(30, 40, 60, 0.8));
  border: 2px solid;
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 255, 150, 0.3), inset 0 0 20px rgba(0, 255, 150, 0.1);
}

.hologram-card.easy {
  border-color: #10b981;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), inset 0 0 20px rgba(16, 185, 129, 0.15), 0 0 50px rgba(16, 185, 129, 0.2);
}

.hologram-card.medium {
  border-color: #3b82f6;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4), inset 0 0 20px rgba(59, 130, 246, 0.15), 0 0 50px rgba(59, 130, 246, 0.2);
}

.hologram-card.hard {
  border-color: #ef4444;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.4), inset 0 0 20px rgba(239, 68, 68, 0.15), 0 0 50px rgba(239, 68, 68, 0.2);
}

.hologram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.hologram-title {
  font-size: 1.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #10b981, #3b82f6, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.enigma-counter {
  font-size: 1.3rem;
  font-weight: bold;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.protocol-label {
  font-size: 0.9rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 16px 0 8px;
  opacity: 0.8;
}

.enigma-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.enigma-number {
  font-size: 1.2rem;
  font-weight: bold;
  color: #f8fafc;
  text-transform: uppercase;
}

.timer-display {
  text-align: right;
  font-size: 2rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  color: #10b981;
}

.timer-display.warning {
  color: #fbbf24;
}

.timer-display.danger {
  color: #ef4444;
  animation: pulse 0.5s infinite;
}

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

.enigma-name {
  font-size: 1.3rem;
  font-weight: bold;
  color: #e0e7ff;
  margin-bottom: 16px;
}

.enigma-text {
  background: rgba(15, 23, 42, 0.5);
  border-left: 3px solid #3b82f6;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  line-height: 1.6;
}

.code-input-container {
  margin-bottom: 16px;
}

.code-input-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.code-input-container input {
  width: 100%;
  padding: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid rgba(59, 130, 246, 0.5);
  color: #10b981;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 2px;
  transition: border-color 0.3s ease;
}

.code-input-container input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.buttons-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.buttons-container.with-skip {
  grid-template-columns: repeat(3, 1fr);
}

button.validate-btn {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: 1px solid #60a5fa;
  padding: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

button.validate-btn:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
}

button.skip-btn {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border: 1px solid #a78bfa;
  padding: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

button.skip-btn:hover {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

/* Estilos para el contenedor de inicio */
#startContainer {
  animation: fadeIn 0.6s ease-in;
}

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

#startContainer .hologram-card {
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.5), inset 0 0 30px rgba(16, 185, 129, 0.2), 0 0 100px rgba(16, 185, 129, 0.3);
  animation: hologramPulse 3s infinite;
}

@keyframes hologramPulse {
  0%, 100% {
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.5), inset 0 0 30px rgba(16, 185, 129, 0.2), 0 0 100px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 0 70px rgba(16, 185, 129, 0.7), inset 0 0 40px rgba(16, 185, 129, 0.3), 0 0 120px rgba(16, 185, 129, 0.4);
  }
}

.completion-message {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
  border: 2px solid #10b981;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.completion-message h2 {
  font-size: 2rem;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.completion-message p {
  font-size: 1.1rem;
  color: #cbd5e1;
}

@media (max-width: 800px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .enigma-display {
    grid-template-columns: 1fr;
  }
  
  .buttons-container,
  .buttons-container.with-skip {
    grid-template-columns: 1fr;
  }
  
  .hologram-title {
    font-size: 1.3rem;
  }
  
  .timer-display {
    font-size: 1.5rem;
  }
}
