:root {
    --bg: #e9edf4;
    --surface: rgba(245, 248, 252, 0.92);
    --text: #17212f;
    --muted: #4a5566;
    --accent: #2f6edb;
    --accent-dark: #1748a0;
    --border: #b8c3d5;
}

body {
    --accent: #3b82f6;
    --accent-dark: #1d4ed8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.wrapper {
    transform-origin: top center;
    animation: zoomOut 0.5s ease-out forwards;
    transform: scale(1); 
}

@keyframes zoomOut {
    from {
        transform: scale(2);
    }

    to {
        transform: scale(1);
    }
}

.header {
    position: relative;
    width: 100%;
    height: 360px;
    background-image: linear-gradient(rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.18)), url('/images/header.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    box-shadow: inset 0 -80px 120px rgba(0, 0, 0, 0.22);
    /* overflow: hidden; */
}

.header-container {
    width: min(92%, 980px);
    margin: 0 auto;
    position: relative;
    height: 100%;
}

.wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 40px;
    display: block;
    fill: var(--bg);
}

.wave path {
    fill: var(--bg);
}

.Server {
    position: absolute;
    top: 16px;
    left: 0;
    width: fit-content;
    z-index: 2;
    background-color: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.Server code {
    font-family: monospace;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.Server:hover {
    background-color: var(--accent-dark);
}

nav {
    position: relative;
    top: -50px;
    z-index: 10;
    display: inline-flex;
    justify-content: center;
    left: 50%;
    transform: translateX(-50%);
    margin: 0 auto 24px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    backdrop-filter: blur(12px);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0;
    /* border: 1px solid var(--border); */
    border-radius: 12px;
    background: transparent;
    transition: all 0.2s ease-in-out;
}

nav ul li:hover {
    background: #007bff79;
}

nav ul li a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 12px;
}

.page-shell {
    width: min(92%, 980px);
    margin: 0 auto;
    padding: 0 0 40px;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(0);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.hero-card,
.info-card,
.rules-preview,
.map-card {
    background: rgba(243, 247, 252, 0.94);
    border: 2px solid var(--border);
    border-radius: 22px;
}

body.subpage .page-shell {
    width: min(92%, 820px);
}

body.about-page {
    --accent: #6d5ef6;
    --accent-dark: #4c3ed6;
}

body.rules-page {
    --accent: #0f9d8b;
    --accent-dark: #0a756a;
}

body.contact-page {
    --accent: #e16b4f;
    --accent-dark: #b84d31;
}

body.about-page .hero-card,
body.rules-page .hero-card,
body.contact-page .hero-card {
    grid-template-columns: 1fr;
}

body.about-page .hero-side,
body.rules-page .hero-side,
body.contact-page .hero-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.rules-page .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.contact-page .info-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

body.about-page .info-card,
body.rules-page .info-card,
body.contact-page .info-card {
    background: #fbfdff;
}

.hero-card {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 24px;
    padding: 28px;
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-dark);
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.hero-text {
    margin: 0 0 20px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
}

.hero-side {
    display: grid;
    gap: 12px;
}

.stat-card {
    padding: 18px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: #f8fbff;
}

.stat-uptime {
    background: #dff4e6;
}

.stat-version {
    background: #dfeeff;
}

.stat-online {
    background: #fbe9d7;
}

.stat-card strong {
    display: block;
    font-size: 1.4rem;
}

.stat-card span {
    color: #f8fbff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.info-card {
    padding: 22px;
}

.info-card h2,
.rules-preview h2,
.map-card h2 {
    margin-top: 0;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 16px;
}

.rules-preview,
.map-card {
    padding: 22px;
}

.rules-preview ul {
    margin: 0;
    padding-left: 20px;
}

.map-card iframe {
    width: 100%;
    height: 320px;
    border: 0;
    border-radius: 12px;
}

.site-footer {
    margin-top: 24px;
    padding: 24px 0 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(231, 237, 246, 0.95));
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr 0.9fr;
    gap: 20px;
    align-items: start;
}

.footer-brand h3,
.footer-links,
.footer-meta {
    margin: 0;
}

.footer-brand h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.footer-brand p,
.footer-meta p {
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--accent-dark);
}

.playPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(245, 248, 252, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    height: 60%;
    width: 40%;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.playPopup h1 {
    margin: 0 0 8px;
    font-size: 2.25rem;
    font-weight: 600;
}

.playPopup p {
    margin: 8px 0;
    font-size: 1.2rem;
    line-height: 1.5;
}

.playPopup code {
    font-family: ui-monospace, monospace;
    background-color: rgba(40, 40, 40, 0.85);
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    border: 1px solid var(--border);
}

.playPopup button {
    margin-top: auto;
    align-self: flex-end;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background-color: var(--accent);
    color: white;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.playPopup button:hover {
    filter: brightness(1.1);
}
@media (max-width: 820px) {

    .hero-card,
    .info-grid,
    .bottom-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    body.about-page .hero-side,
    body.rules-page .hero-side,
    body.contact-page .hero-side,
    body.rules-page .info-grid,
    body.contact-page .info-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px 14px;
        width: fit-content;
        display: flex;
        gap: 12px;
        flex-direction: column;
    }

    .hero-side {
        gap: 8px;
        display: flex;
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .header {
        height: 260px;
    }

    nav {
        top: -50px;
        margin-top: 0;
    }

    nav ul {
        gap: 6px;
    }

    nav ul li a {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .hero-card,
    .info-card,
    .rules-preview,
    .map-card {
        border-radius: 18px;
    }

    .hero-card {
        padding: 20px;
    }

    .stat-card {
        padding: 14px 14px;
        width: fit-content;
        display: flex;
        gap: 12px;
        flex-direction: column;
    }

    .hero-side {
        gap: 8px;
        display: flex;
        flex-direction: row;
    }
}

.bottom-blur {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: none;
    z-index: 999;
    /* Stronger, faster fade-out gradient */
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 70%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 70%);
}