html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000000; 
    color: #f4f4f4; 
    padding-bottom: 20px; 
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    max-width: 100%;
}

header {
    background: linear-gradient(115deg, #4a0010 0%, #7a0019 35%, #a80026 65%, #d60033 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 -12px 24px -18px rgba(0, 0, 0, 0.9) inset;
    position: sticky;
    top: 0;
    z-index: 10;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    max-width: 100%;
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, 0.16) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 100%, rgba(0, 0, 0, 0.25) 0%, transparent 55%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -18px;
    height: 18px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
    pointer-events: none;
}

header h1 {
    margin: 0;
    font-size: 24px; 
}

.header-logo {
    height: 40px;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #f4f4f4;
}

.logo-main-text {
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.logo-sub-text {
    font-size: 0.8em;
    color: #ffffff;
    line-height: 1;
    margin-top: 9px;
}

header .logo {

    height: 90px; /* Aumentar un poco más la altura */
    margin-right: 20px;
    display: flex;
    align-items: center;
    margin-left: 40px; /* Mover un poco más a la derecha */
}

header .logo img {
    display: block; 
    max-height: 100%; 
    width: auto; 
}

nav ul {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: flex;
    align-items: center;
    margin: 0 8px;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 1.08em;
    font-weight: 600;
    color: #f4f4f4;
    text-decoration: none;
    background: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
    overflow: hidden;
}

.nav-link .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-link .nav-text {
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-link:hover, .nav-link:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.nav-link::after {
    content: '';
    display: block;
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, #ffffff 0%, #ffd700 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

.nav-link:hover::after, .nav-link:focus::after {
    transform: scaleX(1);
}

.nav-separator {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.08) 100%);
    margin: 0 2px;
    border-radius: 1px;
}

main {
    padding: 20px;
    padding-bottom: 30px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    max-width: 100%;
}

section {

    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.resource-list,
.updates-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    padding: 0 10px;
}

.resource-item {
    border: 1px solid #333;
    border-radius: 8px; 
    background-color: #1a1a1a; 
    text-align: left;
    color: #f4f4f4;
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
}

.resource-item img {
    width: 100%; 
    height: 220px;
    object-fit: cover; 
    border-top-left-radius: 8px; 
    border-top-right-radius: 8px;
}

.resource-item .info {
    padding: 15px; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
}

.resource-item h3 {
    margin-top: 0;
    color: #f4f4f4; 
    margin-bottom: 10px;
}

.resource-item p {
    margin-bottom: 15px;
    color: #cccccc; 
    font-size: 0.9em;
}

.resource-item a {
    display: block; 
    margin-top: auto; 
    padding: 10px;
    background-color: #ffffff; 
    color: #121212; 
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; /* Transiciones suaves */
    border: none;
    cursor: pointer;
    text-align: center; 
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); 
}

.resource-item a:hover {
    background-color: #007bff;
    color: #ffffff; 
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.coin-shop {
    max-width: 480px;
    margin: 0 auto;
    border: none;
    border-radius: 18px;
    background-color: #000000;
    box-shadow: 0 0 24px 4px #00b0ff55, 0 0 6px 1px #00b0ff33;
}

.coin-shop .info {
    padding: 28px 30px;
}

.coin-shop h3 {
    color: #ff5c7a;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.coin-label {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin: 16px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coin-select {
    width: 100%;
    padding: 12px 14px;
    background: #0f0f0f;
    color: #f4f4f4;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #ff5c7a 50%), linear-gradient(135deg, #ff5c7a 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

.coin-select:hover {
    border-color: #ff5c7a;
}

.coin-select:focus {
    outline: none;
    border-color: #ff2d55;
    box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.2);
}

.coin-input {
    width: 100%;
    padding: 12px 14px;
    background: #0f0f0f;
    color: #f4f4f4;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
}

.coin-input::placeholder {
    color: #666;
}

.coin-input:hover {
    border-color: #ff5c7a;
}

.coin-input:focus {
    outline: none;
    border-color: #ff2d55;
    box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.2);
}

.coin-shop .coin-price {
    font-size: 1.4em !important;
    font-weight: 800;
    color: #ff5c7a !important;
    margin: 14px 0 18px;
}

.coin-shop a {
    background: linear-gradient(180deg, #ff4d6d 0%, #d60033 55%, #a80026 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.coin-shop a:hover {
    background: linear-gradient(180deg, #ff6b85 0%, #ff2d55 55%, #c4002f 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(214, 0, 51, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#coins h2 {
    color: #ff5c7a;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin-bottom: 25px;
}

footer {
    text-align: center;
    padding: 20px;
    color: #f4f4f4;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    bottom: 0;
    margin-top: 20px;
}

footer a {
    color: #00b0ff;
}

#hero {
    position: relative;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    overflow: hidden;
    padding: 60px 20px;
    z-index: 1;
}

.hero-container {
    display: flex;
    align-items: flex-start; 
    justify-content: center;
    max-width: 1350px;
    width: 100%;
    margin: 0 auto; 
    gap: 40px; 
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.hero-left-text {
    flex: 1;
    text-align: left; 
    max-width: 500px;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: 0 0 24px 4px #00b0ff55, 0 0 6px 1px #00b0ff33;
    border-radius: 18px;
    position: relative;
    z-index: 2;
    padding: 32px 36px 32px 36px;
}

.hero-left-text h2 {
    color: #00b0ff; 
    font-size: 2.2em;
    margin-bottom: 15px;
}

.hero-left-text h4 {
    text-align: center; 
    margin-top: 70px; 
}

.hero-right-content {
     display: flex; 
     align-items: center; 
     gap: 20px; 
     flex: 2; 
     max-width: 700px;
     min-width: 0;
     width: 100%;
     justify-content: flex-start;
     min-height: 400px;
}

.hero-text {
    position: relative; 
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    background-color: transparent;
    padding: 0;
    max-width: 100%;
    margin: 0; 
    text-align: left; 
}

.hero-text h2 {
    margin-top: 0;
    color: #f4f4f4; 
    font-size: 2.5em; 
    margin-bottom: 15px;
}

.hero-text p {
    margin-bottom: 0;
    font-size: 1.2em; 
    line-height: 1.6;
    color: #cccccc; 
}

.hero-text img {
    display: block; 
    margin-left: 100px;
    margin-right: 0px;
    max-width: 900px;
    min-width: 400px;
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    margin-top: 0;
    border-radius: 24px;
    z-index: 2;
}

.hero-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    margin: 0 0 0 0;
    z-index: 2;
    /* Puedes ajustar el margin para separar más el rayo del texto o la imagen */
}

@media (max-width: 768px) {
    header {
        flex-direction: column; 
        align-items: center; 
        padding: 10px; 
    }

    header .logo {
        margin-left: 0; 
        margin-right: 0; 
        margin-bottom: 10px; 
    }

    .logo-container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-left: 0; /* Eliminar el margen izquierdo fijo */
        width: 100%; /* Asegurar que la navegación ocupe el ancho completo */
        text-align: center; /* Centrar los enlaces de navegación */
    }

    nav ul {
        flex-direction: column; /* Apila los elementos de la lista verticalmente */
        gap: 0;
    }

    nav ul li {
        margin: 0;
    }

    #hero {
        padding: 40px 15px; /* Reducir padding en móviles */
    }

    .hero-container { /* Cambiar a disposición vertical en móviles */
        flex-direction: column;
        gap: 20px;
        align-items: center; /* Asegurar que los elementos hijos estén centrados horizontalmente */
    }

    .hero-left-text,
    .hero-right-content {
        max-width: 100%;
        width: 100%;
        text-align: center;
        align-items: center; /* Asegurar que los elementos dentro también se centren si usan flex */
        justify-content: center; 
        min-height: 0;
    }

    .hero-left-text {
        padding: 32px 20px;
    }

    .hero-right-content {
        display: none;
    }

    .hero-text {
         text-align: center;
         width: 100%;
    }

    .hero-text img {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        top: 0;
    }

    .hero-text h2 {
        font-size: 2em; 
    }

    .hero-text p {
        font-size: 1em; 
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
        border-radius: 0;
        padding: 12px 20px;
    }

    .nav-separator {
        width: 80%;
        height: 1px;
        margin: 0 auto;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.08) 100%);
    }
}

@media (max-width: 900px) {
  .hero-container {
    flex-direction: column;
    align-items: center;
  }
  .hero-connector {
    display: none;
  }
  .hero-left-text,
  .hero-right-content {
    max-width: 100%;
    width: 100%;
  }
  .hero-text img {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

main {
    padding-bottom: 30px; 
}

.server-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-servidor {
    max-width: 180px;
    margin-bottom: 20px; 
}

.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.server-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #ff3333;
}

.player-count {
    color: #cccccc;
    font-size: 1em;
    font-weight: 600;
    margin-top: 8px; 
}

.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #00ff00;
    box-shadow: 0 0 10px 2px #00ff00, 0 0 20px 4px #00ff00;
    animation: blink 1s infinite alternate;
    display: inline-block;
}

.status-indicator.offline {
    background: #ff3333;
    box-shadow: 0 0 10px 2px #ff3333;
    animation: none;
}

.status-indicator.maintenance {
    background: #ffd000;
    box-shadow: 0 0 10px 2px #ffd000;
    animation: none;
}

.coin-price {
    font-size: 1.15em !important;
    font-weight: 700;
    color: #f4f4f4 !important;
}

.server-tagline {
    color: #bbbbbb;
    margin: 0 0 18px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    gap: 12px;
    width: min(720px, 100%);
}

.status-card {
    background: #000000;
    border: none;
    border-radius: 18px;
    padding: 14px;
    text-align: left;
    box-shadow: 0 0 24px 4px #00b0ff55, 0 0 6px 1px #00b0ff33;
}

.status-card-wide {
    grid-column: 1 / -1;
}

.status-label {
    display: block;
    color: #888;
    font-size: 0.85em;
    margin-bottom: 6px;
}

.status-value {
    display: block;
    font-size: 1.25em;
    font-weight: 700;
    color: #f4f4f4;
}

.status-updated {
    margin-top: 16px;
    color: #888;
    font-size: 0.9em;
}

.connect-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 9px 18px;
    background: linear-gradient(180deg, #ff4d6d 0%, #d60033 55%, #a80026 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.connect-btn:hover {
    background: linear-gradient(180deg, #ff6b85 0%, #ff2d55 55%, #c4002f 100%);
    box-shadow: 0 4px 14px rgba(214, 0, 51, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
}

@media (max-width: 700px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes blink {
    0% { opacity: 1; box-shadow: 0 0 10px 2px #00ff00, 0 0 20px 4px #00ff00; }
    100% { opacity: 0.5; box-shadow: 0 0 5px 1px #00ff00, 0 0 10px 2px #00ff00; }
}

.status-text {
    color: #00ff00;
    font-size: 1em;
    font-weight: 600;
}

#fire-sparks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    pointer-events: none; 
    z-index: 0; 
}

.logo-servidor {
    animation: logoGlow 2s infinite alternate;
    box-shadow: 0 0 30px 0 #ffae34, 0 0 60px 0 #ffd700;
    border-radius: 16px;
}

@keyframes logoGlow {
    from {
        box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700;
    }
    to {
        box-shadow: 0 0 20px #ffae34, 0 0 30px #ffae34;
    }
}

.intro-text {
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1.4;
    color: #f5f5f5;
    margin-bottom: 25px;
}

.events-container {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    grid-column: 1 / -1; 
}

.events-container h3 {
    margin-top: 0;
    color: #00b0ff;
    border-bottom: 2px solid #00b0ff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.events-list li {
    background-color: #222;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 4px solid #ffd700;
    font-size: 1em;
    color: #f4f4f4;
}

.events-list li:last-child {
    margin-bottom: 0;
}

.countdown-timer {
    display: block;
    font-size: 0.9em;
    font-weight: bold;
    color: #ffd700;
    margin-top: 8px;
}

.hero-left-text .discord-btn {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
}

.discord-btn {
    background: linear-gradient(180deg, #5865f2 0%, #4752c4 55%, #3c45a5 100%);
    font-size: 1.05em;
    padding: 12px 28px;
}

.discord-btn:hover {
    background: linear-gradient(180deg, #7289da 0%, #5865f2 55%, #4752c4 100%);
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.discord-hint {
    color: #999;
    font-size: 0.9em;
    text-align: center;
    margin-top: 10px;
}

/* --- Páginas legales (estilo modal) --- */
.legal-overlay {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 40px 16px;
    box-sizing: border-box;
}

.legal-card {
    position: relative;
    background: #ffffff;
    color: #333333;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    padding: 36px 32px 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    font-family: 'Segoe UI', Arial, sans-serif;
    animation: legalFadeIn 0.3s ease;
}

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

.legal-card .legal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2rem;
    line-height: 1;
    color: #888;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.legal-card .legal-close:hover {
    color: #d32f2f;
}

.legal-card h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #183a6d;
}

.legal-card h2 {
    margin: 22px 0 8px;
    font-size: 1.1rem;
    color: #183a6d;
}

.legal-card p {
    margin: 0 0 12px;
    font-size: 0.98rem;
    color: #333;
    line-height: 1.55;
}

.legal-card a {
    color: #1a73e8;
}

.legal-card .legal-back {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 22px;
    background: linear-gradient(180deg, #ff4d6d 0%, #d60033 55%, #a80026 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.legal-card .legal-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(214, 0, 51, 0.45);
    color: #ffffff;
}

@media (max-width: 600px) {
    .legal-card {
        padding: 28px 20px 22px;
    }
}
