:root {
  --bg: #212529;
  --panel: #2e3440;
  --panel-soft: #3b4252;
  --pixel-border: #000000;
  --accent: #92400e;
  --accent-blue: #209cee;
  --accent-green: #92cc41;
  --accent-red: #e76e55;
  --text: #eceff4;
  --muted: #d8dee9;
  --pixel-shadow: 4px 4px 0px #000000;
}

* {
  box-sizing: border-box;
  image-rendering: pixelated;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Press Start 2P', monospace, cursive;
  background-color: var(--bg);
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.15) 1px, transparent 1px);
  background-size: 8px 8px;
  color: var(--text);
  line-height: 1.6;
  font-size: 11px;
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
  padding: 30px 0 60px;
}

/* Cabecera Pixel Art */
header {
  background: var(--panel);
  border: 4px solid var(--pixel-border);
  box-shadow: var(--pixel-shadow);
  padding: 24px;
  margin-bottom: 24px;
}

header h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #f7d51d;
  text-shadow: 3px 3px 0px #000000;
  line-height: 1.4;
}

header p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

/* Grid & Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 20px;
  align-items: stretch;
}

/* Cajas y Tarjetas con esquinas pixeladas */
.card {
  background: var(--panel);
  border: 4px solid var(--pixel-border);
  box-shadow: var(--pixel-shadow);
  padding: 20px;
  position: relative;
}

.featured {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.badge {
  display: inline-block;
  background: var(--accent-red);
  color: #ffffff;
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0px #000000;
  padding: 6px 8px;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.featured h2 {
  margin: 16px 0 12px;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  line-height: 1.5;
  color: #8be9fd;
}

.featured p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.7;
}

/* Botones 8-bit */
.btn-group {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: inherit;
  font-size: 0.7rem;
  border: 4px solid var(--pixel-border);
  box-shadow: 4px 4px 0px #000000;
  padding: 10px 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0px #000000;
}

.btn.primary {
  background: var(--accent-blue);
  color: #ffffff;
}

.btn.secondary {
  background: var(--accent-green);
  color: #000000;
}

/* Estadísticas */
.stats {
  display: grid;
  gap: 14px;
}

.stat {
  background: var(--panel-soft);
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0px #000000;
  padding: 14px;
}

.stat strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #f7d51d;
}

.stat span {
  color: var(--muted);
  font-size: 0.65rem;
}

/* Panel Principal y Comentarios */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.panel-title {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: #ff79c6;
}

.comment-list {
  display: grid;
  gap: 16px;
}

.comment {
  background: var(--panel);
  border: 3px solid var(--pixel-border);
  box-shadow: 3px 3px 0px #000000;
  padding: 16px;
}

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

.user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0px #000000;
  background: #bd93f9;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: #000000;
}

.username {
  font-size: 0.75rem;
}

.game-tag {
  font-size: 0.6rem;
  color: #000000;
  background: #50fa7b;
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0px #000000;
  padding: 4px 6px;
}

.comment p {
  margin: 0;
  line-height: 1.7;
  font-size: 0.7rem;
  color: #f8f8f2;
}

/* Formularios Retro */
.form-box {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.65rem;
}

input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 0.7rem;
  background: #181a1f;
  color: var(--text);
  border: 3px solid var(--pixel-border);
  box-shadow: inset 2px 2px 0px #000000;
  padding: 10px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  background: #282c34;
  border-color: #8be9fd;
}

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

/* Sidebar & Listas */
.sidebar {
  display: grid;
  gap: 20px;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.list li {
  background: var(--panel-soft);
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0px #000000;
  padding: 10px;
  font-size: 0.65rem;
  color: var(--text);
}

/* Estado del Servidor */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #000000;
  color: #50fa7b;
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0px #000000;
  padding: 6px 10px;
  font-size: 0.65rem;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #50fa7b;
  box-shadow: 1px 1px 0px #000000;
  display: block;
}

/* Responsive */
@media (max-width: 800px) {
  .hero,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(94%, 1080px);
  }
}