/* =====================================================
   BASE CARD
===================================================== */

.sc-unit-card {
  width: 900px;
  min-height: 680px;
  margin: 30px auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.8);
  font-family: 'Arial Narrow', Arial, sans-serif;
  color: #f8faff;
  position: relative;
  border: 4px solid;
  background: #000814;
}

/* =====================================================
   VARIABLES BASE (TERRAN DEFAULT)
===================================================== */

.sc-unit-card {
  --primary: #1e4a9c;
  --primary-dark: #0f2a5c;
  --accent: #4a90ff;
  --accent-soft: #3a78e0;
  --header-text: #a0c8ff;

  --table-bg: #0f2550;
  --table-bg-alt: #132c5f;
  --panel-bg: #0b1c3d;
}

.sc-unit-card.terran {
  border-color: var(--accent);
}

/* =====================================================
   ZERG (AHORA LILA / BIOLÓGICO)
===================================================== */

.sc-unit-card.zerg {
  --primary: #5b2a86;
  --primary-dark: #2d1447;
  --accent: #a65cff;
  --accent-soft: #8a3fe0;
  --header-text: #e0c8ff;

  --table-bg: #2a1340;
  --table-bg-alt: #341a52;
  --panel-bg: #160b24;

  border-color: var(--accent);
}

/* =====================================================
   PROTOSS (DORADO / ARENA / BRONCE APAGADO)
===================================================== */

.sc-unit-card.protoss {
  --primary: #9c7a2b;
  --primary-dark: #4a3a16;
  --accent: #d4b45f;
  --accent-soft: #b8963e;
  --header-text: #f3e6b5;

  --table-bg: #3a2c12;
  --table-bg-alt: #473616;
  --panel-bg: #1f1709;

  border-color: var(--accent);
}

/* =====================================================
   HEADER
===================================================== */

.sc-unit-card .header {
  padding: 10px 14px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
  border-bottom: 3px solid var(--accent);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.sc-unit-card .role {
  font-size: 1.7em;
  letter-spacing: 1px;
}

.sc-unit-card .subtitle {
  font-size: 0.95em;
  color: var(--header-text);
}

/* =====================================================
   PATRÓN DIAGONAL SOLO EN ZONAS OSCURAS
===================================================== */

.sc-unit-card .stats-bar,
.sc-unit-card .phase-content,
.sc-unit-card .weapon-table td,
.sc-unit-card .footer,
.right-supply-table {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 2px,
    transparent 2px,
    transparent 8px
  );
  background-blend-mode: overlay;
}

/* =====================================================
   TABLA DERECHA (SUMINISTROS)
===================================================== */

.right-supply-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 140px;
  background-color: var(--panel-bg);
  border: 2px solid var(--accent);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.85em;
}

.right-supply-table th,
.right-supply-table td {
  border: 1px solid var(--accent);
  padding: 4px 6px;
  text-align: center;
  font-weight: bold;
}

.right-supply-table th {
  background: var(--primary-dark);
  color: var(--header-text);
}

.right-supply-table td {
  background-color: var(--table-bg);
  color: #ffdd99;
}

.pts-row td {
  background-color: var(--panel-bg);
  color: #ffffff;
  font-size: 0.95em;
  padding: 6px;
  border-top: 2px solid var(--accent);
}

/* =====================================================
   STATS BAR
===================================================== */

.sc-unit-card .stats-bar {
  display: flex;
  padding: 8px 0;
  border-bottom: 2px solid var(--accent-soft);
}

.sc-unit-card .stat {
  flex: 1;
  text-align: center;
}

.sc-unit-card .stat .value {
  font-size: 1.25em;
  font-weight: bold;
}

.sc-unit-card .stat .label {
  font-size: 0.7em;
  color: var(--header-text);
}

/* =====================================================
   FASES
===================================================== */

.sc-unit-card .phase {
  border-top: 2px solid var(--accent-soft);
}

.sc-unit-card .phase-title {
  background: var(--primary-dark);
  color: var(--header-text);
  padding: 6px 10px;
  font-weight: bold;
  font-size: 0.9em;
  border-bottom: 1px solid var(--accent-soft);
}

.sc-unit-card .phase-content {
  padding: 8px 10px 12px 10px;
}

/* =====================================================
   TABLAS DE ARMAS (TEXTO MÁS PEQUEÑO)
===================================================== */

.sc-unit-card .weapon-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 0.75em;
  table-layout: fixed;
}

.sc-unit-card .weapon-table th {
  background: var(--primary-dark);
  color: var(--header-text);
  padding: 5px 3px;
  border: 1px solid var(--accent-soft);
  text-align: center;
  font-weight: bold;
  font-size: 0.75em;
}

.sc-unit-card .weapon-table td {
  background-color: var(--table-bg);
  padding: 4px 3px;
  border: 1px solid var(--accent-soft);
  text-align: center;
}

.sc-unit-card .weapon-table tbody tr:nth-child(even) td {
  background-color: var(--table-bg-alt);
}

.sc-unit-card .weapon-name {
  text-align: left;
  padding-left: 6px;
  font-weight: bold;
  color: #ffffff;
}

/* =====================================================
   FOOTER
===================================================== */

.sc-unit-card .footer {
  padding: 10px;
  border-top: 2px solid var(--accent-soft);
  font-size: 0.75em;
  color: var(--header-text);
  position: relative;
}

.sc-unit-card .faction-label {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.8em;
  color: #ffffff;
}

/* =====================================================
   RESPONSIVE MÓVIL
===================================================== */

@media (max-width: 768px) {

  .sc-unit-card {
    width: 100%;
    margin: 20px 0;
    border-radius: 0;
  }

  /* Header más compacto */
  .sc-unit-card .header {
    flex-direction: column;
    gap: 8px;
  }

  .right-supply-table {
    width: 100%;
    max-width: 200px;
  }

  /* Stats más compactos */
  .sc-unit-card .stat .value {
    font-size: 1.1em;
  }

  .sc-unit-card .stat .label {
    font-size: 0.65em;
  }

  /* TABLA DE ARMAS: scroll horizontal elegante */
  .sc-unit-card .weapon-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Reducimos un poco más el tamaño en móvil */
  .sc-unit-card .weapon-table,
  .sc-unit-card .weapon-table th {
    font-size: 0.7em;
  }

}




/* =============================================
   WARHAMMER 40K HERO SECTION
   ============================================= */
.wh40k-hero-section {
    background: #0a0a0a;
    padding: 120px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 5px solid #4a2c0f;
    box-shadow: 0 0 60px rgba(201, 162, 39, 0.25);
    margin: 40px auto;
    max-width: 1400px;
}

.wh40k-hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(10,10,10,0.85), rgba(10,10,10,0.9)),
                url('https://images5.alphacoders.com/111/thumb-1920-1111153.jpg') center/cover;
    filter: brightness(0.7) contrast(1.1);
    z-index: 1;
    border-radius: 23px; /* ligeramente menor que el padre para que no se corte */
}

.wh40k-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.wh40k-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 80px;
    text-shadow: 0 0 30px rgba(201, 162, 39, 0.6);
}

/* =============================================
   WARHAMMER UNIVERSE SECTION
   ============================================= */
.wh-universe-section {
    background: #0a0a0a;
    padding: 140px 20px 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 5px solid #3a2a1f;
    box-shadow: 0 0 60px rgba(107, 78, 42, 0.3);
    margin: 40px auto;
    max-width: 1400px;
}

.wh-universe-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(10,10,10,0.78), rgba(10,10,10,0.88)),
                url('https://images2.alphacoders.com/526/thumb-1920-526283.jpg') center/cover;
    filter: brightness(0.65) contrast(1.05);
    z-index: 1;
    border-radius: 23px;
}

.wh-container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
}

.wh-main-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 5.2rem;
    font-weight: 700;
    color: #c9a227;
    text-transform: uppercase;
    letter-spacing: 10px;
    margin-bottom: 12px;
    text-shadow: 0 0 40px rgba(201, 162, 39, 0.7);
}

.wh-subtitle {
    font-size: 1.35rem;
    color: #bbbbbb;
    margin-bottom: 80px;
    letter-spacing: 2px;
}

/* =============================================
   STARCRAFT SECTION
   ============================================= */
.starcraft-section {
    background: #0a0f14;
    padding: 130px 20px 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 5px solid #1a3a5c;
    box-shadow: 0 0 60px rgba(0, 204, 255, 0.25);
    margin: 40px auto;
    max-width: 1400px;
}

.starcraft-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(10,15,20,0.85), rgba(10,15,20,0.92)),
                url('https://wallpapers.com/images/hd/4k-starcraft-xlg4td4l3n3k4389.jpg') center/cover;
    filter: brightness(0.72) contrast(1.12);
    z-index: 1;
    border-radius: 23px;
}

.sc-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.sc-main-title {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    font-size: 5.2rem;
    font-weight: 700;
    color: #00ccff;
    text-transform: uppercase;
    letter-spacing: 12px;
    margin-bottom: 8px;
    text-shadow: 0 0 45px rgba(0, 204, 255, 0.75);
}

.sc-subtitle {
    font-size: 1.45rem;
    color: #a0d8ff;
    margin-bottom: 75px;
    letter-spacing: 5px;
    text-transform: uppercase;
}

/* =============================================
   ESTILOS COMUNES (sin cambios)
   ============================================= */

.wh40k-menu-grid,
.wh-universe-grid,
.sc-grid {
    display: grid;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.wh40k-menu-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.wh-universe-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.sc-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 35px;
}

/* Resto de estilos originales sin modificar */
.wh40k-card, .wh-universe-card, .sc-card {
    /* ... mantengo todos tus estilos originales ... */
}

/* Copio el resto tal cual para que no se pierda nada */

.wh40k-card {
    background: rgba(26, 26, 26, 0.95);
    border: 3px solid #4a2c0f;
    border-radius: 12px;
    padding: 40px 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.wh40k-card:hover {
    transform: translateY(-15px);
    border-color: #c9a227;
    box-shadow: 0 20px 40px rgba(201, 162, 39, 0.25);
}

.wh40k-card-inner { position: relative; z-index: 2; }

.wh40k-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.wh40k-card h2 {
    color: #e0e0e0;
    font-size: 2.1rem;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.wh40k-card p {
    color: #aaaaaa;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Efecto de brillo dorado */
.wh40k-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 40%;
    height: 300%;
    background: linear-gradient(transparent, rgba(201,162,39,0.15), transparent);
    transform: rotate(30deg);
    transition: all 0.6s;
    opacity: 0;
}

.wh40k-card:hover::after {
    opacity: 1;
    left: 120%;
}

/* Universe Cards */
.wh-universe-card {
    position: relative;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    border: 3px solid #3a2a1f;
    transition: all 0.5s ease;
    background-size: cover;
    background-position: center;
}

.wh-universe-card:hover {
    transform: scale(1.05) translateY(-15px);
    border-color: #c9a227;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.85);
}

.wh-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.95), rgba(25,20,15,0.75), transparent);
    transition: all 0.4s ease;
}

.wh-universe-card:hover .wh-card-overlay {
    background: linear-gradient(to top, rgba(10,10,10,0.98), rgba(40,25,15,0.8));
}

.wh-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 35px;
    z-index: 2;
    text-align: center;
}

.wh-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    transition: transform 0.4s ease;
}

.wh-universe-card:hover .wh-icon {
    transform: scale(1.15) rotate(8deg);
}

.wh-universe-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 14px 0;
}

.wh-universe-card p {
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.wh-btn {
    display: inline-block;
    padding: 12px 34px;
    border: 2px solid #c9a227;
    color: #c9a227;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.wh-universe-card:hover .wh-btn {
    background: #c9a227;
    color: #0f0f0f;
    font-weight: 600;
}

/* StarCraft Cards */
.sc-card {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    border: 3px solid #1a3a5c;
    transition: all 0.45s ease;
    background-size: cover;
    background-position: center;
}

.sc-card:hover {
    transform: scale(1.05) translateY(-15px);
    border-color: #00ccff;
    box-shadow: 0 25px 50px rgba(0, 204, 255, 0.35);
}

.sc-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8,14,24,0.96), rgba(25,45,70,0.78), transparent);
    transition: all 0.4s ease;
}

.sc-card:hover .sc-overlay {
    background: linear-gradient(to top, rgba(5,10,20,0.98), rgba(35,60,90,0.82));
}

.sc-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 42px 32px 38px;
    z-index: 2;
    text-align: center;
}

.sc-icon {
    font-size: 4.3rem;
    margin-bottom: 20px;
    transition: transform 0.4s ease;
}

.sc-card:hover .sc-icon {
    transform: scale(1.25);
}

.sc-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.35rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0 0 16px 0;
}

.sc-card p {
    color: #b0d0ff;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.sc-btn {
    display: inline-block;
    padding: 13px 38px;
    border: 2px solid #00ccff;
    color: #00ccff;
    text-transform: uppercase;
    font-size: 0.97rem;
    letter-spacing: 2.5px;
    transition: all 0.35s ease;
}

.sc-card:hover .sc-btn {
    background: #00ccff;
    color: #0a0f14;
    font-weight: 600;
}