/* Reset y configuración base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Comic Sans MS', 'Bangers', 'Arial Black', sans-serif;
  background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 50%, #ffe66d 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Efecto de puntos de medio tono (halftone) estilo cómic */
body::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle, rgba(0,0,0,0.15) 1px, transparent 1px),
    radial-gradient(circle, rgba(0,0,0,0.1) 1px, transparent 1px);
  background-size: 20px 20px, 40px 40px;
  background-position: 0 0, 10px 10px;
  pointer-events: none;
}

/* Efectos de explosión estilo manga */
body::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, transparent 30%, rgba(255,255,255,0.3) 31%, rgba(255,255,255,0.3) 32%, transparent 33%);
  top: -150px;
  right: -150px;
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Contenedor principal estilo cómic */
.container {
  background: white;
  border: 5px solid #000;
  border-radius: 0;
  box-shadow: 
    8px 8px 0 rgba(0,0,0,0.8),
    12px 12px 0 rgba(255,107,107,0.5);
  padding: 50px 40px;
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 10;
  animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform: rotate(-1deg);
}

/* Decoración de esquinas estilo manga */
.container::before,
.container::after {
  content: '★';
  position: absolute;
  font-size: 30px;
  color: #ff6b6b;
  animation: twinkle 2s ease-in-out infinite;
}

.container::before {
  top: -15px;
  left: -15px;
  animation-delay: 0s;
}

.container::after {
  bottom: -15px;
  right: -15px;
  animation-delay: 1s;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(-1deg);
  }
}

@keyframes twinkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.3) rotate(180deg);
    opacity: 0.7;
  }
}

/* Título estilo manga */
h2 {
  text-align: center;
  color: #000;
  font-size: 36px;
  margin-bottom: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 
    3px 3px 0 #ff6b6b,
    6px 6px 0 #4ecdc4;
  position: relative;
  animation: bounceTitle 1s ease-out;
}

@keyframes bounceTitle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Efecto de bocadillo de cómic */
h2::before {
  content: '¡';
  position: absolute;
  left: -20px;
  top: -5px;
  font-size: 40px;
  color: #ff6b6b;
}

h2::after {
  content: '!';
  position: absolute;
  right: -20px;
  top: -5px;
  font-size: 40px;
  color: #4ecdc4;
}

/* Formulario */
form {
  margin-top: 30px;
}

/* Inputs estilo cómic */
input[type="email"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  padding: 16px 20px;
  margin: 12px 0;
  border: 4px solid #000;
  border-radius: 0;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.3s ease;
  background: #fff;
  color: #000;
  font-family: inherit;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
  position: relative;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
select:focus {
  outline: none;
  border-color: #ff6b6b;
  background: #fffacd;
  box-shadow: 
    4px 4px 0 rgba(0,0,0,0.5),
    0 0 0 6px rgba(255,107,107,0.3);
  transform: translate(-2px, -2px);
}

input::placeholder {
  color: #999;
  font-weight: 600;
}

/* Botón principal estilo manga */
button[type="submit"] {
  width: 100%;
  padding: 18px;
  margin-top: 20px;
  border: 5px solid #000;
  border-radius: 0;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  box-shadow: 
    6px 6px 0 rgba(0,0,0,0.8),
    0 0 20px rgba(255,107,107,0.5);
  position: relative;
  overflow: hidden;
}

button[type="submit"]::before {
  content: '⚡';
  position: absolute;
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  animation: slideIcon 2s ease-in-out infinite;
}

button[type="submit"]::after {
  content: '⚡';
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  animation: slideIcon 2s ease-in-out infinite reverse;
}

@keyframes slideIcon {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(30px); }
}

button[type="submit"]:hover {
  transform: translate(-3px, -3px);
  box-shadow: 
    9px 9px 0 rgba(0,0,0,0.8),
    0 0 30px rgba(255,107,107,0.8);
  background: linear-gradient(135deg, #ff8787 0%, #ffa5a5 100%);
}

button[type="submit"]:active {
  transform: translate(2px, 2px);
  box-shadow: 
    3px 3px 0 rgba(0,0,0,0.8),
    0 0 15px rgba(255,107,107,0.5);
}

/* Botones secundarios */
button {
  font-family: inherit;
}

/* Enlaces estilo cómic */
p {
  text-align: center;
  margin-top: 25px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

p a {
  color: #4ecdc4;
  text-decoration: none;
  font-weight: 900;
  transition: all 0.3s ease;
  position: relative;
  padding: 2px 8px;
  border: 3px solid transparent;
}

p a:hover {
  color: #fff;
  background: #4ecdc4;
  border: 3px solid #000;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  transform: translate(-2px, -2px);
}

/* Tablas estilo manga */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  background: white;
  border: 5px solid #000;
  overflow: hidden;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
}

th {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
  color: white;
  padding: 16px;
  text-align: left;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  border: 3px solid #000;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

td {
  padding: 14px 16px;
  border: 2px solid #000;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
}

tr:nth-child(even) td {
  background: #fffacd;
}

tr:hover td {
  background: #ffecb3;
}

/* Imágenes en tablas estilo cómic */
td img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 4px solid #000;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  transition: all 0.3s ease;
}

td img:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.7);
}

/* Botones en tablas estilo manga */
td button {
  padding: 10px 18px;
  margin: 0 4px;
  border: 4px solid #000;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  transition: all 0.2s ease;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

td button:first-of-type {
  background: #4ecdc4;
  color: #000;
}

td button:first-of-type:hover {
  background: #6ee7df;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.7);
}

td button:last-of-type {
  background: #ff6b6b;
  color: white;
}

td button:last-of-type:hover {
  background: #ff8787;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.7);
}

td button:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

/* Mensajes de error/éxito estilo cómic */
.message {
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  animation: shake 0.5s ease;
  border: 4px solid #000;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.message.error {
  background: #ff6b6b;
  color: white;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.message.success {
  background: #4ecdc4;
  color: #000;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.message::before {
  content: '💥 ';
  font-size: 20px;
}

.message::after {
  content: ' 💥';
  font-size: 20px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-2deg); }
  75% { transform: translateX(5px) rotate(2deg); }
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 40px 25px;
    box-shadow: 
      6px 6px 0 rgba(0,0,0,0.8),
      9px 9px 0 rgba(255,107,107,0.5);
  }

  h2 {
    font-size: 28px;
    text-shadow: 
      2px 2px 0 #ff6b6b,
      4px 4px 0 #4ecdc4;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  select {
    padding: 14px 16px;
    font-size: 15px;
  }

  button[type="submit"] {
    padding: 16px;
    font-size: 16px;
  }
}

/* Estilos para contenedores más grandes (admin) */
.container.large {
  max-width: 1200px;
  padding: 40px;
}

/* Header para páginas de admin estilo manga */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 5px solid #000;
  position: relative;
}

.header::after {
  content: '⚡⚡⚡';
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 0 10px;
  font-size: 14px;
}

.header h2 {
  margin: 0;
}

.header button {
  padding: 12px 24px;
  background: #ff6b6b;
  color: white;
  border: 4px solid #000;
  cursor: pointer;
  font-weight: 900;
  transition: all 0.2s ease;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
}

.header button:hover {
  background: #ff8787;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.7);
}

.header button:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}