/* styles.css - extraído de index.html */
/* NOTE: This file holds global site styles. Page-specific overrides
    (for example, ReboLand page) should live in `assets/css/reboland.css`.
    See assets/css/README.md for details. */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

@font-face {
    font-family: 'MinecraftFont';
    src: local('MinecraftFont'), local('Minecraft Font'),
        url('../../fonts/Minecrafter.Alt.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0f1720;
    --card: #0b1220;
    --muted: #9aa4b2;
    --accent: #7dd3fc;
    --accent-rgb: 125, 211, 252;
    --badge-h: 28px;
    --success: #34d399;
    --danger: #fb7185;
    --glass: rgba(255, 255, 255, 0.03);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html,
body {
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(15, 23, 32, 0.65), rgba(7, 16, 33, 0.75)),
        url('../img/page-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg);
    background-attachment: fixed;
    color: #e6eef6;
}

.container {
    max-width: 920px;
    margin: 18px auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

header,
.card,
.footer {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

header {
    padding-inline: 14px;
}

.footer {
    padding-inline: 14px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    padding: 0;
    background: none;
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.12);
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit
}

#titulo {
    font-family: 'MinecraftFont', 'Press Start 2P', monospace;
    font-size: 28px;
    /* font-size: clamp(18px, 2.6vw, 28px); */
    letter-spacing: 0.02em;
    color: rgba(222, 222, 222, 0.979);
    margin: 0;
    line-height: 1.1
}

h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.4px
}

.sub {
    color: var(--muted);
    font-size: 13px
}

.card {
    background-color: rgba(255, 255, 255, 0.03);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background-clip: padding-box;
    padding: 22px;
    border-radius: 12px;
    margin-top: 0;
    box-shadow: 0 8px 26px rgba(2, 6, 23, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    overflow: visible;
    position: relative
}

.ipbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 10px;
    margin-top: 8px;
    margin-right: 10px
}

.ipbox--visual {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.45);
    z-index: 30;
    transform: none
}

.ipbox--card {
    position: absolute;
    top: 22px;
    right: 18px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.4);
    z-index: 40;
    backdrop-filter: blur(4px)
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 2px;
    margin-right: 4px;
    font-size: 13px;
    color: var(--muted);
    position: relative
}

.status .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #6b7280;
    display: inline-block;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4)
}

.status--online .dot {
    background: #34d399;
    box-shadow: 0 6px 14px rgba(52, 211, 153, 0.08)
}

.status--offline .dot {
    background: #fb7185;
    box-shadow: 0 6px 14px rgba(251, 113, 133, 0.08)
}

.status--unknown .dot {
    background: #9aa4b2
}

.status .status-text {
    min-width: 36px;
    display: inline-block;
    text-align: left;
    font-weight: 700;
    color: var(--muted)
}

.status--online .status-text {
    color: var(--accent);
}

.status--offline .status-text {
    color: var(--muted);
}

.status--unknown .status-text {
    color: var(--muted);
}

.status .sep {
    display: none;
    margin: 0 2px 0 4px;
    color: var(--muted);
    font-weight: 600
}

.status--online .sep {
    display: inline-block
}

.status .players {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 0;
    color: var(--muted);
    font-size: 13px
}

.status--online .players {
    display: inline-flex
}

.status .players .num {
    min-width: 32px;
    display: inline-block;
    text-align: left;
    font-weight: 700;
    color: #e6eef6;
    font-size: 13px
}

.ip {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.6px
}

button.cta {
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    margin: 0 0 0 -6px;
    border: 0;
    padding: 10px 14px;
    border-radius: 10px;
    color: #04263b;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.12)
}

/* Lift effect ONLY for the button inside the ipbox (copy button). */
.ipbox--card .cta {
    /* keep default look but prepare for transform */
    transition: transform .22s cubic-bezier(.2, .9, .2, 1), box-shadow .22s cubic-bezier(.2, .9, .2, 1);
    will-change: transform, box-shadow;
    transform: translateY(0);
}

/* Apply hover lift only on non-touch pointers to avoid accidental movement on mobile */
@media (hover: hover) and (pointer: fine) {
    .ipbox--card .cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
    }

    .ipbox--card .cta:active {
        transform: translateY(-2px);
    }
}

/* Focus styling for keyboard users (visible ring, accessible) */
.ipbox--card .cta:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12), 0 10px 20px rgba(0, 0, 0, 0.16);
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {

    .ipbox--card .cta,
    .ipbox--card .cta:hover,
    .ipbox--card .cta:active {
        transition: none;
        transform: none;
    }
}

.servers {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
    align-items: stretch
}

.server {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 12px 24px;
    border-radius: 10px;
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.25);
    overflow: hidden;
    position: relative;
}

.server__private {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.35);
    z-index: 12
}

.server--hero .server__private {
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
    position: absolute;
    top: calc(((0px + (100% - (var(--badge-h) + 8px))) / 2));
    left: 50%;
    transform: translateX(-50%) translateY(-50%) scale(.98);
    font-size: 11px;
    padding: 6px 10px;
    max-width: 78%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.18);
    color: var(--accent);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    z-index: 14
}

.server--hero:hover .server__private {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1)
}

.server__private svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: currentColor
}

.server__public {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.35);
    z-index: 12
}

.server__public svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: currentColor
}

.server__photo {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    transform: scale(.98);
    transition: opacity .45s ease, transform .45s cubic-bezier(.2, .9, .2, 1), filter .45s ease;
    filter: blur(3px);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.25);
    z-index: 2
}

.server--visual:hover .server__photo {
    opacity: 0.6;
    transform: scale(1);
    filter: blur(0)
}

/* CLASE ORIGINAL MANTENIENDO TODOS LOS ESTILOS */
.servers--up {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
    margin-top: 6px;
}

/* NUEVO: Estilos para servidores online */
.server--online {
    background: rgba(52, 211, 153, 0.15) !important;
    box-shadow: 0 6px 14px rgba(52, 211, 153, 0.2) !important;
    border: 1px solid rgba(52, 211, 153, 0.2) !important;
    transition: all 0.5s ease;
}

.server .s-title,
.server .s-desc {
    transition: transform .28s ease, opacity .28s ease;
    will-change: transform, opacity
}

.server__center {
    position: absolute;
    top: 0;
    bottom: calc(var(--badge-h) + 8px);
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(.98);
    transition: opacity .28s ease, transform .28s ease;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0.6px;
    z-index: 10
}

.server--visual:hover .server__center,
.server--hero:hover .server__center {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1)
}

.server__center .server__public,
.server__center .server__private {
    position: static;
    transform: none;
    margin: 0 auto
}

.server:hover .s-title {
    transform: translateY(-10px);
    opacity: 0
}

.server:hover .s-desc {
    transform: translateY(10px);
    opacity: 0
}

@media (max-width:900px){
    .servers--up { 
        grid-template-columns: 1fr;
        margin-top: 12px; /* ✅ Más espacio en móvil */
    }
}

.server--full {
    grid-column: 1 / -1
}

.server .s-title {
    font-weight: 800;
    color: var(--accent);
    font-size: 16px;
    margin-bottom: 6px
}

.server .s-desc {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.15
}

.links {
    display: flex;
    gap: 10px;
    margin-top: 10px
}

.links--center {
    width: 100%;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 10px;
    grid-column: 1 / -1
}

a.link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform .12s ease, opacity .12s ease
}

a.link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
    display: block
}

a.link img {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: block;
    object-fit: contain
}

a.link:hover {
    opacity: .95;
    transform: translateY(-2px)
}

.footer {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.small {
    font-size: 12px;
    color: var(--muted)
}

@media (max-width:900px) {

    html,
    body {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    html,
    body {
        height: auto;
        min-height: 100dvh;
        background: linear-gradient(180deg, rgba(4, 38, 59, 0.95), rgba(4, 38, 59, 0.98));
        background-color: #04263b;
        background-image: none;
        overscroll-behavior-y: contain;
    }

    .card.hero {
        background: linear-gradient(180deg, rgba(15, 23, 32, 0.55), rgba(7, 16, 33, 0.55)), url('../img/page-bg.webp') center top / cover no-repeat;
        background-clip: padding-box;
    }

    #titulo {
        text-align: center;
        width: 100%;
        font-size: min(28px, 4.5vw);
    }

    .info .sub {
        text-align: center;
        width: 100%;
    }

    .copy-suffix {
        display: none !important;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
    }

    .servers {
        grid-template-columns: repeat(2, 1fr)
    }

    .server--full {
        grid-column: 1 / -1
    }

    sol .section-features-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .ipbox--card {
        position: static;
        margin: 8px auto;
        box-shadow: none;
        display: inline-flex;
    }

    .info {
        text-align: center;
    }

    .ipbox--card {
        transform: translateY(-6px);
        margin-bottom: 14px;
    }

    .rebo-wrap.top-servers {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .servers {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width:380px) {
    #copy-btn {
        display: none;
    }
}