/* ============================================
   DOFUS RETRO FAN SITE - CSS OFICIAL
   Diseño basado en DOFUS Retro (Ankama)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Boogaloo&family=Lexend:wght@300;400;500;600;700&family=Rowdies:wght@300;400;700&display=swap');

:root {
    --color-bg: #000;
    --color-bg-alt: #030000;
    --color-red: #e15336;
    --color-red-hover: #8c3113;
    --color-red-dark: #761e01;
    --color-gold: #f7a80b;
    --color-gold-light: #fbd805;
    --color-cream: #f6eed6;
    --color-peach: #ffe1bd;
    --color-gold-text: #f5c625;
    --color-cyan: #27e5f1;
    --color-teal: #17b8bf;
    --color-olive: #6b674b;
    --color-olive-dark: #1c1b0f;
    --color-verde: #0dd106;
    --color-text: #fff;
    --color-text-muted: #b0b0b0;
    --color-brown: #1e0f0a;
    --color-dark-card: rgba(3, 0, 0, 0.85);
    --font-title: 'Rowdies', cursive;
    --font-body: 'Lexend', sans-serif;
    --font-hero: 'Abril Fatface', serif;
    --font-alt: 'Boogaloo', cursive;
    --transition: all 0.2s ease-in-out;
    --radius: 14px;
}

html {
    font-size: 14px;
}

@media (min-width: 992px) {
    html { font-size: 16px; }
}
@media (min-width: 1550px) {
    html { font-size: 18px; }
}
@media (min-width: 2300px) {
    html { font-size: 20px; }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100%;
    font-family: var(--font-body);
    background: var(--color-bg) !important;
    color: var(--color-text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    animation: pageFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: -1;
    pointer-events: none;
}

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

a {
    color: var(--color-gold-text);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--color-gold-light);
}

/* ============================================
   BACKGROUNDS: video (index) / estático (subpáginas)
   ============================================ */

/* Video background (solo index) */
.video-fondo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.video-fondo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Static background para subpáginas */
body[data-fondo-tipo="estatico"] {
    background: url('../imagenes/fondo/fondo.jpg') center / cover no-repeat fixed !important;
}

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

header {
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 2px solid var(--color-red);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.contenedor-header {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--color-red);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.logo:hover {
    color: var(--color-gold-light);
    transform: scale(1.02);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: var(--color-cream);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--font-title);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    padding: 6px 10px;
    border-radius: 6px;
}
nav a:hover {
    color: var(--color-gold-light);
    background: rgba(225, 83, 54, 0.15);
}

.seccion-cuenta {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    background: var(--color-verde);
    border: 1px solid #000;
    transition: var(--transition);
    text-shadow: none;
    font-family: var(--font-title);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.2;
    height: auto;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    letter-spacing: 0.5px;
    color: #fff;
}
.btn:hover { transition: var(--transition); }

.btn-primary {
    background: var(--color-red);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-red-hover);
    color: #fff;
}

.btn-secondary {
    background: var(--color-red-dark);
    color: #fff;
}
.btn-secondary:hover {
    filter: brightness(1.2);
    color: #fff;
}

.btn-gold {
    background: linear-gradient(45deg, var(--color-gold) 0%, var(--color-gold-light) 58%);
    color: var(--color-red-dark);
    border: none;
}
.btn-gold:hover {
    filter: contrast(1.2);
    color: var(--color-red-dark);
}

.btn-info {
    background: var(--color-olive);
    box-shadow: 0 0 0 4px var(--color-olive-dark) inset;
    color: #fff;
}
.btn-info:hover {
    background: var(--color-olive-dark);
    color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: none !important;
    transform: none !important;
}

.btn-lg {
    font-size: 1.3rem;
    padding: 0.7rem 1.4rem;
}

/* Legacy button aliases */
.btn-principal {
    background: linear-gradient(45deg, var(--color-gold) 0%, var(--color-gold-light) 58%);
    color: var(--color-red-dark);
    border: none;
    font-family: var(--font-title);
    font-weight: 400;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: var(--transition);
    font-size: 1.5rem;
    line-height: 1.7rem;
    padding: 1rem 1.2rem;
}
.btn-principal:hover {
    filter: contrast(1.2);
}

.btn-cuenta {
    background: var(--color-red);
    color: #fff;
    border: 1px solid #000;
    font-family: var(--font-title);
    font-weight: 400;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: var(--transition);
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}
.btn-cuenta:hover {
    background: var(--color-red-hover);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    overflow: hidden;
}

.contenido-hero {
    position: relative;
    z-index: 2;
    max-width: 602px;
    margin: 0 auto;
}

.contenido-hero h1 {
    font-family: var(--font-hero);
    color: var(--color-red);
    font-size: 3rem;
    line-height: 3.2rem;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
}

.contenido-hero p {
    color: var(--color-cream);
    font-family: var(--font-title);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.contenido-hero .btn-principal {
    margin: 24px auto;
    max-width: 290px;
    display: block;
    white-space: wrap;
    position: relative;
    overflow: hidden;
}

/* Contador de jugadores online */
.contador-online {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--color-gold);
    border-radius: var(--radius);
    white-space: nowrap;
}
.punto-online {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.8);
    animation: parpadeo-online 1.5s ease-in-out infinite;
}
.numero-online {
    font-family: var(--font-title);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-gold-text);
    line-height: 1;
}
.texto-online {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-cream);
    text-transform: uppercase;
    letter-spacing: 1px;
}
@keyframes parpadeo-online {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================
   SECTION TITLES
   ============================================ */

.titulo-seccion {
    text-align: center;
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 45px;
    color: var(--color-gold-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    position: relative;
    display: block;
    width: 100%;
}
.titulo-seccion::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--color-red);
    margin: 12px auto 0 auto;
    border-radius: 2px;
}

/* ============================================
   SECTIONS
   ============================================ */

.contenedor {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
    position: relative;
}

section:nth-of-type(even) {
    background: rgba(30, 15, 10, 0.4);
    border-top: 1px solid rgba(225, 83, 54, 0.1);
    border-bottom: 1px solid rgba(225, 83, 54, 0.1);
}

/* ============================================
   FEATURES GRID / CARDS
   ============================================ */

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card-feature {
    background: var(--color-dark-card);
    border: 1px solid rgba(225, 83, 54, 0.3);
    border-top: 3px solid var(--color-red);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.card-feature:hover {
    border-color: var(--color-gold);
    border-top-color: var(--color-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(247, 168, 11, 0.15);
    background: rgba(3, 0, 0, 0.95);
}

.card-feature h3 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--color-gold);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    transition: var(--transition);
}
.card-feature:hover h3 {
    color: var(--color-gold-light);
}

.card-feature p {
    color: var(--color-peach);
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-feature .btn {
    margin-top: 15px;
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */

.formulario {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.grupo-formulario {
    display: flex;
    flex-direction: column;
}

.grupo-formulario label {
    color: var(--color-gold);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: var(--font-title);
    font-weight: 300;
}

.grupo-formulario input,
.grupo-formulario select,
.grupo-formulario textarea {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(225, 83, 54, 0.4);
    color: var(--color-cream);
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    transition: var(--transition);
}
.grupo-formulario input:focus,
.grupo-formulario select:focus,
.grupo-formulario textarea:focus {
    outline: none;
    border-color: var(--color-red);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 10px rgba(225, 83, 54, 0.3);
}

.grupo-formulario input::placeholder {
    color: #615a4e;
}

.grupo-formulario input[type="checkbox"],
.grupo-formulario input[type="radio"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--color-red);
}

.error-campo {
    color: var(--color-red);
    font-size: 0.8rem;
    margin-top: 5px;
}

/* ============================================
   ALERTS
   ============================================ */

.alertas-contenedor {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.alerta {
    padding: 14px 20px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    animation: alertaSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes alertaSlideIn {
    from { opacity: 0; transform: translateY(-25px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.alerta-fade-out {
    opacity: 0;
    transform: translateY(-12px) scale(0.95);
    pointer-events: none;
}

.alerta-exito {
    background: rgba(26, 38, 28, 0.95);
    border-left: 4px solid #4caf50;
    color: #a4e5a6;
}
.alerta-error {
    background: rgba(43, 23, 25, 0.95);
    border-left: 4px solid var(--color-red);
    color: #ffb3b8;
}
.alerta-advertencia {
    background: rgba(38, 33, 22, 0.95);
    border-left: 4px solid var(--color-gold);
    color: #ffd880;
}
.alerta-info {
    background: rgba(22, 31, 38, 0.95);
    border-left: 4px solid var(--color-cyan);
    color: #a2d2ff;
}

.alerta-texto {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-right: 15px;
}

.alerta-cerrar {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: var(--transition);
}
.alerta-cerrar:hover {
    color: var(--color-text);
    transform: scale(1.15);
}

/* ============================================
   TABS
   ============================================ */

.pestanas {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(225, 83, 54, 0.3);
}

.pestana {
    padding: 10px 18px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    position: relative;
    bottom: -1px;
    font-family: var(--font-title);
    font-weight: 300;
    font-size: 0.85rem;
}
.pestana:hover {
    color: var(--color-text);
}
.pestana.activa {
    color: var(--color-gold);
    border-bottom-color: var(--color-gold);
}

.contenido-pestana {
    display: none;
}
.contenido-pestana.activo {
    display: block;
}

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

footer {
    background: linear-gradient(to bottom, #000 0%, var(--color-red-dark) 100%);
    border-top: 3px solid var(--color-red);
    padding: 50px 0 30px 0;
    margin-top: 60px;
}

.contenedor-footer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 35px;
}

.seccion-footer h3 {
    color: var(--color-gold);
    margin-bottom: 20px;
    font-size: 1rem;
    font-family: var(--font-title);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 8px;
}
.seccion-footer h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--color-red);
    position: absolute;
    bottom: 0;
    left: 0;
}

.seccion-footer p,
.seccion-footer a {
    color: var(--color-peach);
    font-size: 0.8rem;
    line-height: 1.8;
    text-decoration: none;
    transition: var(--transition);
}
.seccion-footer a:hover {
    color: var(--color-gold-light);
    padding-left: 3px;
}

.seccion-footer ul {
    list-style: none;
}
.seccion-footer ul li {
    margin-bottom: 8px;
}

.derechos {
    text-align: center;
    padding-top: 25px;
    margin-top: 35px;
    border-top: 1px solid rgba(255, 215, 0, 0.15);
    color: var(--color-peach);
    font-size: 0.75rem;
}

/* ============================================
   UTILITIES
   ============================================ */

.texto-centro { text-align: center; }
.margen-top { margin-top: 30px; }
.margen-bottom { margin-bottom: 30px; }
.oculto { display: none !important; }
.visible { display: block !important; }

.cargando {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* ============================================
   RESPONSIVE - TABLETS (768px)
   ============================================ */

@media (max-width: 768px) {
    .contenedor {
        padding: 0 15px !important;
    }
    nav ul {
        gap: 12px;
    }
    nav a {
        font-size: 0.75rem;
    }
    .contenido-hero h1 {
        font-size: 2rem;
        line-height: 2.2rem;
    }
    .contenido-hero p {
        font-size: 1.1rem;
    }
    .titulo-seccion {
        font-size: 1.4rem;
    }
    .grid-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .seccion-cuenta {
        gap: 8px;
        flex-wrap: wrap;
    }
    .btn-cuenta {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    .contador-online {
        padding: 8px 14px;
    }
    .numero-online {
        font-size: 1.2rem;
    }
    .texto-online {
        font-size: 0.75rem;
    }
}

/* ============================================
   RESPONSIVE - MÓVILES (480px)
   ============================================ */

@media (max-width: 480px) {
    .contenedor-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px !important;
    }
    .logo {
        font-size: 1.3rem;
        text-align: center;
        width: 100%;
        justify-content: center;
    }
    nav {
        width: 100%;
    }
    nav ul {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }
    nav a {
        font-size: 0.75rem;
        display: block;
        padding: 8px;
        background: rgba(225, 83, 54, 0.08);
        border-radius: 6px;
        text-align: center;
        border: 1px solid rgba(225, 83, 54, 0.15);
    }
    nav a:hover {
        background: rgba(225, 83, 54, 0.15);
    }
    .seccion-cuenta {
        width: 100%;
        gap: 8px;
        flex-direction: column;
    }
    .btn-cuenta {
        width: 100%;
        padding: 8px;
        font-size: 0.8rem;
    }
    .hero {
        min-height: 300px;
        padding: 40px 15px;
    }
    .contenido-hero h1 {
        font-size: 1.6rem;
        line-height: 1.8rem;
    }
    .contenido-hero p {
        font-size: 1rem;
    }
    .btn-gold, .btn-principal {
        font-size: 1.2rem;
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: center;
    }
    .contador-online {
        padding: 6px 12px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .numero-online {
        font-size: 1rem;
    }
    .texto-online {
        font-size: 0.7rem;
    }
    .titulo-seccion {
        font-size: 1.2rem;
    }
    .formulario {
        padding: 20px !important;
    }
    .alertas-contenedor {
        width: 95%;
        top: 15px;
    }
}

/* ============================================
   RESPONSIVE - MÓVILES MUY PEQUEÑOS (360px)
   ============================================ */

@media (max-width: 360px) {
    .logo {
        font-size: 1.1rem;
    }
    .contenido-hero h1 {
        font-size: 1.3rem;
        line-height: 1.5rem;
    }
    .contenido-hero p {
        font-size: 0.85rem;
    }
    .contador-online {
        padding: 4px 10px;
        gap: 4px;
    }
    .numero-online {
        font-size: 0.85rem;
    }
    .texto-online {
        font-size: 0.6rem;
    }
    .punto-online {
        width: 8px;
        height: 8px;
    }
    .pestana {
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    .g-recaptcha {
        transform: scale(0.78);
        transform-origin: 0 0;
    }
}
