/* Body y fondo */
body {
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at top, #14141f 0%, #09090f 70%);
    background-size: cover;
    color: #f0f0f0;
}

/* Login card */
.card {
    background: rgba(25, 0, 40, 0.85);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(128, 0, 255, 0.6);
    transition: 0.3s ease-in-out;
    
    /* AÑADE ESTO: */
    height: auto;          /* Obliga a la caja a crecer con el texto */
    overflow: hidden;      /* Asegura que el fondo cubra todo el contenido */
    display: block;        /* Evita conflictos de alineación con flexbox */
}

.card:hover {
    box-shadow: 0 0 40px rgba(128, 0, 255, 0.9);
}

/* Encabezados */
h3 {
    font-weight: bold;
    text-transform: uppercase;
    color: #d1c4ff;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Inputs */
input.form-control {
    background: #2a1a3d;
    border: 1px solid #6b4fff;
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

input.form-control::placeholder {
    color: #b3a3ff;
}

input.form-control:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 8px #9b59b6;
}

/* Botones */
.btn-primary {
    background: #8e44ad;
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #9b59b6;
    box-shadow: 0 0 10px #9b59b6;
}

/* Error Messages */
.red {
    color: #ff4c4c;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
}

/* Links */
a {
    color: #b3a3ff;
    text-decoration: none;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 5px #9b59b6;
}

/* Menú RO Login */
.ro-login-menu {
    background: #2e1a3e;
    color: #fff;
    padding: 0.75rem;
    border-radius: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75rem;
    display: inline-block;
    margin: 0.25rem;
    transition: 0.3s;
}

.ro-login-menu:hover {
    background: #5e2ea8;
    box-shadow: 0 0 10px #9b59b6;
}

.ro-login-menu.ro-logout {
    background: #c0392b;
}

.ro-login-menu.ro-logout a {
    color: white;
}

/* Kafra o imagen lateral */
.kafra {
    background: url("../img/kafra.png") no-repeat;
    background-position: right bottom;
    height: 408px;
    filter: drop-shadow(0 0 10px #9b59b6);
}

/* ================================
   NEWS SECTION – MULTIVERSERO
================================ */
/* ==============================
   TOP RANKINGS SECTION
============================== */
#top-rankings {
    background: linear-gradient(180deg, #0b0b0b, #151515);
    padding: 80px 0;
    color: #fff;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

#top-rankings .rank-title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #f1f1f1;
    letter-spacing: 1px;
}

/* ==============================
   RANK BOX (GLOBAL)
============================== */
.rank-box {
    background: rgba(0, 0, 0, 0.85);
    padding: 28px 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,.6);
    transition: transform .25s ease, box-shadow .25s ease;
}

.rank-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 55px rgba(0,0,0,.8);
}

/* ==============================
   MVP / PVP COLORS
============================== */
.rank-box.mvp {
    border-top: 4px solid #f5c542;
}

.rank-box.pvp {
    border-top: 4px solid #8f3ce7;
}

/* ==============================
   TEXT STYLES
============================== */
.rank-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    margin-bottom: 10px;
}

.rank-name {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 10px 0;
    color: #ffffff;
}

.rank-score {
    font-size: 1.05rem;
    color: #ddd;
}

/* ==============================
   EMPTY STATE
============================== */
.rank-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 30px;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {
    #top-rankings {
        padding: 60px 0;
    }

    .rank-title {
        font-size: 1.4rem;
    }

    .rank-name {
        font-size: 1.3rem;
    }
}
#top-rankings {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.news-area {
    padding: 90px 0;
    background: radial-gradient(circle at top, #14141f 0%, #09090f 70%);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}


/* ================================
   HEADER
================================ */

.news-header {
    text-align: center;
    margin-bottom: 60px;
}

.news-header h2 {
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
}

.news-header h2 span {
    color: #8f4dff;
}

.news-header p {
    margin-top: 10px;
    color: #b6b6c8;
    font-size: 15px;
}

/* ================================
   GRID
================================ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 35px;
}

/* ================================
   CARD
================================ */

.news-card {
    background: linear-gradient(180deg, #161622 0%, #0f0f18 100%);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
    transition: transform .35s ease, box-shadow .35s ease;
    position: relative;
}

.news-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(143, 77, 255, 0.12),
        transparent
    );
    opacity: 0;
    transition: opacity .35s ease;
}

.news-card:hover::before {
    opacity: 1;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 65px rgba(143, 77, 255, 0.3);
}

/* === FIX IMAGEN === */
.news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    
    /* Estas líneas aseguran que el fondo NO se repita */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain; /* Usa 'contain' para ver la cara completa o 'cover' para llenar el cuadro */
}

/* Si usas una etiqueta <img> dentro del div */
.news-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cambiado de cover a contain para que no se corte el dibujo */
    display: block;
}

/* === FIX CLICK === */
.news-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

/* IMPORTANTE: que el overlay no bloquee el click */
.news-card::before {
    pointer-events: none;
}

/* ================================
   CONTENT
================================ */

.news-content {
    padding: 22px 24px 26px;
}

.news-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

/* ================================
   META
================================ */

.news-meta {
    font-size: 13px;
    color: #9c9cb3;
    margin-bottom: 14px;
}

/* ================================
   EXCERPT
================================ */

.news-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: #d3d3e2;
    margin-bottom: 18px;
}

/* ================================
   READ MORE
================================ */

.news-read {
    font-size: 14px;
    font-weight: 700;
    color: #8f4dff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-read:hover {
    text-decoration: underline;
}
/* ==============================
   COMUNIDAD – MULTIVERSE RO
============================== */

#comunidad {
    position: relative;
    background: linear-gradient(
        rgba(0, 0, 0, 0.85),
        rgba(0, 0, 0, 0.85)
    ),
    url("../img/bg/community-bg.jpg") center/cover no-repeat;
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#comunidad .donation-wrap {
    background: rgba(15, 15, 15, 0.9);
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

#comunidad .row {
    justify-content: center;
    gap: 30px;
}

/* ==============================
   TEXTO / TITULOS
============================== */

#comunidad .third-title-style h2 span {
    color: #8f4dff;
    font-weight: 900;
}

#comunidad .third-title-style h2 {
    font-size: 34px;
    color: #fff;
    margin-bottom: 10px;
}

#comunidad .inner h2 {
    font-size: 26px;
    font-weight: 700;
    color: #eaeaea;
    margin-bottom: 15px;
}

#comunidad .inner p {
    color: #bdbdbd;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* ==============================
   BOTÓN DISCORD
============================== */

#comunidad .btn-primary {
    background: linear-gradient(135deg, #5865F2, #4752C4);
    border: none;
    padding: 12px 26px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.35);
}

#comunidad .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(88, 101, 242, 0.55);
    background: linear-gradient(135deg, #6d78ff, #5865F2);
}

/* ==============================
   WIDGETS (Discord / Facebook)
============================== */

#comunidad iframe {
    border-radius: 12px;
    background: #111;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#comunidad iframe:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 991px) {
    #comunidad .donation-wrap {
        padding: 30px 20px;
    }

    #comunidad iframe {
        width: 100%;
        height: 420px;
    }

    #comunidad .third-title-style h2 {
        font-size: 28px;
    }
}

@media (max-width: 575px) {
    #comunidad {
        padding: 60px 0;
    }

    #comunidad .inner h2 {
        font-size: 22px;
    }
}
/* ================================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
    .news-header h2 {
        font-size: 30px;
    }

    .news-image img {
        height: 180px;
    }
}
