:root {
    --bg-top: #eef3ff;
    --bg-bottom: #f8fbff;
    --card: rgba(255,255,255,0.88);
    --card-strong: rgba(255,255,255,0.96);
    --text: #182033;
    --muted: #5f6b85;
    --accent: #5a6bff;
    --accent-2: #ff9e2c;
    --accent-3: #de5d27;
    --border: rgba(24, 32, 51, 0.08);
    --shadow: 0 20px 55px rgba(31, 43, 73, 0.12);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(90,107,255,0.12), transparent 28%), radial-gradient(circle at top right, rgba(255,158,44,0.10), transparent 24%), url('/images/websitebackground.png') center top / cover fixed no-repeat, linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
    min-height: 100vh;
}

    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(245, 248, 255, 0.78);
        backdrop-filter: blur(4px);
        z-index: -1;
    }

.banner {
    display: block;
    width: min(1400px, calc(100% - 32px));
    margin: 20px auto 18px;
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.footer-disclaimer {
    max-width: 850px;
    margin: 8px auto;
    font-size: 0.8rem;
    line-height: 1.5;
    opacity: 0.7;
}

.tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.tabs-label {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255,158,44,0.12);
    color: #d47d00;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.tab, .ext-tab {
    flex: 1 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(24,32,51,0.06);
    background: rgba(255,255,255,0.78);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}

    .tab:hover, .ext-tab:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(31,43,73,0.10);
    }

    .tab.active {
        background: linear-gradient(135deg, rgba(90,107,255,0.94), rgba(110,121,255,0.94));
        color: #fff;
    }

/* Top navigation feature buttons */
.servers-list-tab,
.sandbox-tab {
    position: relative;
    overflow: hidden;
    gap: 8px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 10px 24px rgba(31,43,73,0.10);
}

.servers-list-tab {
    background: linear-gradient(135deg, rgba(25,135,84,0.96), rgba(31,166,112,0.96));
}

.sandbox-tab {
    background: linear-gradient(135deg, rgba(124,58,237,0.96), rgba(90,107,255,0.96));
}

.support-tab {
    position: relative;
    overflow: hidden;
    gap: 8px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.42);
    background: linear-gradient(135deg, rgba(255,158,44,0.98), rgba(255,83,38,0.98), rgba(37,167,96,0.98));
    background-size: 220% 220%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22), 0 12px 30px rgba(255,109,14,0.24);
    animation: supportButtonGlow 2.4s ease-in-out infinite;
}

.support-tab::before {
    content: '';
    position: absolute;
    inset: -40% auto -40% -70%;
    width: 58%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.58), rgba(255,255,255,0));
    transform: skewX(-18deg);
    animation: supportButtonSweep 3s ease-in-out infinite;
    pointer-events: none;
}

.support-tab::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(255,158,44,0.44);
    animation: supportButtonRing 2.4s ease-out infinite;
    pointer-events: none;
}

.support-tab span {
    position: relative;
    z-index: 1;
}

.support-tab:hover {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28), 0 16px 36px rgba(255,109,14,0.32);
}

.servers-list-tab::before,
.sandbox-tab::before {
    content: '';
    position: absolute;
    inset: -40% auto -40% -70%;
    width: 55%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.42), rgba(255,255,255,0));
    transform: skewX(-18deg);
    transition: left .55s ease;
    pointer-events: none;
}

.servers-list-tab:hover::before,
.sandbox-tab:hover::before {
    left: 120%;
}

.servers-list-tab span,
.sandbox-tab span {
    position: relative;
    z-index: 1;
}

@keyframes supportButtonGlow {
    0%, 100% {
        background-position: 0% 50%;
        transform: translateY(0) scale(1);
    }

    50% {
        background-position: 100% 50%;
        transform: translateY(-1px) scale(1.025);
    }
}

@keyframes supportButtonSweep {
    0%, 18% {
        left: -70%;
        opacity: 0;
    }

    28% {
        opacity: 1;
    }

    62% {
        left: 122%;
        opacity: 1;
    }

    78%, 100% {
        left: 122%;
        opacity: 0;
    }
}

@keyframes supportButtonRing {
    0% {
        box-shadow: 0 0 0 0 rgba(255,158,44,0.44);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(255,158,44,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255,158,44,0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .support-tab,
    .support-tab::before,
    .support-tab::after {
        animation: none;
    }
}

.top-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255,255,255,0.20);
    font-size: 14px;
}

.discord-tab {
    background: linear-gradient(135deg, rgba(88,101,242,0.94), rgba(102,116,255,0.94));
    color: #fff;
}

.donate-tab {
    background: linear-gradient(135deg, rgba(255,153,44,0.95), rgba(255,109,14,0.95));
    color: #fff;
}

.forums-tab {
    background: linear-gradient(135deg, rgba(23,117,227,0.95), rgba(25,127,241,0.95));
    color: #fff;
}

.treetube-tab {
    background: linear-gradient(135deg, rgba(214,32,42,0.95), rgba(190,15,30,0.95));
    color: #fff;
}

.discord-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.live-map-tab {
    position: relative;
    overflow: hidden;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,244,228,0.96));
    border-color: rgba(255,158,44,0.24);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55), 0 10px 26px rgba(255,158,44,0.10);
}

    .live-map-tab::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: -38%;
        width: 34%;
        background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.72), rgba(255,255,255,0));
        transform: skewX(-18deg);
        animation: liveMapSweep 3.8s ease-in-out infinite;
        pointer-events: none;
    }

    .live-map-tab::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        box-shadow: inset 0 0 0 1px rgba(255,181,81,0.18);
        pointer-events: none;
    }

    .live-map-tab:hover {
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 16px 34px rgba(255,158,44,0.18);
    }

.live-map-tab__dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ff8c1a;
    box-shadow: 0 0 0 0 rgba(255,140,26,0.48);
    animation: liveMapPulse 2.2s ease-out infinite;
    flex: 0 0 auto;
}

.live-map-tab__text {
    position: relative;
    z-index: 1;
}

@keyframes liveMapPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,140,26,0.48);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(255,140,26,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255,140,26,0);
    }
}

@keyframes liveMapSweep {
    0%, 14% {
        left: -40%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    52% {
        left: 118%;
        opacity: 1;
    }

    68%, 100% {
        left: 118%;
        opacity: 0;
    }
}

.page-layout {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.main-content {
    min-width: 0;
}

.sidebar {
    min-width: 0;
}

.info-card, .chart-container {
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 26px;
    backdrop-filter: blur(10px);
}

.chart-container {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
}

.visible-container {
    display: block !important;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.04;
}

.highlight-title {
    margin: 0;
    font-size: clamp(26px, 2.4vw, 38px);
    line-height: 1.1;
}

.lead-text, .compact-text, p {
    color: var(--muted);
    line-height: 1.65;
}

.eyebrow, .section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,158,44,0.12);
    color: #d27f05;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.inline-link-button, .action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid transparent;
}

.primary-action {
    background: linear-gradient(135deg, var(--accent), #7180ff);
    color: #fff;
}

.secondary-action, .inline-link-button {
    background: rgba(90,107,255,0.10);
    color: var(--accent);
    border-color: rgba(90,107,255,0.18);
}


.server-status-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.support-mini-card strong {
    display: block;
}

.mini-stat-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(90,107,255,0.10);
    color: var(--accent);
    border: 1px solid rgba(90,107,255,0.18);
    text-decoration: none;
    font-weight: 800;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
    gap: 20px;
    margin-bottom: 20px;
}

.hero-copy h1 {
    margin-top: 12px;
}

.hero-actions, .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.hero-side, .home-grid, .quick-links-grid {
    display: grid;
    gap: 16px;
}

.home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 20px 0;
}

.mini-stat-card {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
}

.mini-stat-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.quick-links-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-link-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    min-height: 220px;
    justify-content: center;
}

    .quick-link-tile img {
        max-width: 180px;
        width: 100%;
        height: auto;
    }

    .quick-link-tile span {
        font-weight: 800;
        font-size: 18px;
    }

.discord-widget-card iframe {
    width: 100%;
    min-height: 520px;
    border: 0;
    border-radius: 18px;
    background: #202225;
}

.page-footer {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto 24px;
    text-align: center;
    color: var(--muted);
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 22px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

    .page-footer .treemt {
        color: var(--accent-3);
        font-weight: 800;
    }

/* Server details list */
.details-list-card {
    padding: 0;
    overflow: hidden;
}

.details-list {
    display: block;
}

.detail-row {
    display: grid;
    grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(24,32,51,0.06);
}

    .detail-row:last-child {
        border-bottom: 0;
    }

.detail-key {
    font-weight: 800;
    font-size: 19px;
    color: var(--text);
}

.detail-value {
    color: var(--muted);
    font-size: 17px;
    word-break: break-word;
}

.detail-sublist {
    display: grid;
    gap: 10px;
}

.detail-subrow {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 14px;
    padding: 12px 14px;
    background: rgba(90,107,255,0.05);
    border-radius: 14px;
}

.detail-subkey {
    font-weight: 700;
    color: var(--text);
}

.detail-subvalue {
    color: var(--muted);
}

/* Graph page */
.graph-shell-card {
    padding: 26px;
}

.players-chart-container.graph-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
    gap: 20px;
    margin-top: 18px;
}

.graph-card-fixed {
    min-height: 520px;
    height: 520px;
}

    .graph-card-fixed canvas {
        width: 100% !important;
        height: 100% !important;
    }

.graph-history-card {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    max-height: 520px;
    overflow-y: auto;
}

    .graph-history-card h3, #serverInfoColumn h3 {
        margin: 0 0 16px;
        color: var(--text);
        text-align: left !important;
        font-size: 24px;
    }

#serverInfoList {
    list-style: none;
    padding: 0;
    margin: 0;
}

    #serverInfoList li {
        color: var(--text) !important;
        padding: 12px 0;
        border-bottom: 1px solid rgba(24,32,51,0.08);
        font-size: 16px;
    }

        #serverInfoList li:last-child {
            border-bottom: 0;
        }

/* All players */
#allPlayersContainer .total-count {
    color: var(--text) !important;
    font-weight: 700;
}

#allPlayersContainer #playerSearch {
    background: rgba(255,255,255,0.90) !important;
    border: 1px solid rgba(24,32,51,0.12) !important;
    color: var(--text) !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
}

#allPlayersContainer table {
    color: var(--text) !important;
    background: rgba(255,255,255,0.72);
    border-radius: 18px;
    overflow: hidden;
}

#allPlayersContainer th, #allPlayersContainer td {
    border-color: rgba(24,32,51,0.08) !important;
    color: var(--text) !important;
    background: transparent;
}

#allPlayersContainer th {
    background: rgba(90,107,255,0.10) !important;
}

#allPlayersContainer .player-name a {
    color: var(--accent) !important;
}

#allPlayersContainer .lastseen, #allPlayersContainer .playtime, #allPlayersContainer .status, #allPlayersContainer .ping {
    color: var(--muted) !important;
}

#allPlayersContainer .table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(90,107,255,0.65) !important;
}

@media (max-width: 1100px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .home-grid, .quick-links-grid, .players-chart-container.graph-page-layout, .hero-card {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

@media (max-width: 800px) {
    .banner, .tabs, .page-layout, .page-footer {
        width: calc(100% - 20px);
    }

    .info-card, .chart-container {
        padding: 20px;
        border-radius: 22px;
    }

    .detail-row, .detail-subrow {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
    }
}

.latest-activity-card {
    margin-top: 14px;
}

.latest-activity-header-row {
    align-items: flex-start;
    margin-bottom: 10px;
}

.latest-activity-title {
    margin-top: 10px;
}

.latest-activity-open-link {
    flex: 0 0 auto;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.25;
}

    .latest-activity-open-link:hover {
        text-decoration: underline;
    }

.latest-activity-intro {
    margin: 0 0 14px;
}

.latest-activity-list {
    display: grid;
    gap: 8px;
    min-width: 0;
    max-height: 248px;
    overflow-y: auto;
    padding-right: 4px;
}

    .latest-activity-list::-webkit-scrollbar {
        width: 8px;
    }

    .latest-activity-list::-webkit-scrollbar-thumb {
        background: rgba(24,32,51,0.18);
        border-radius: 999px;
    }

    .latest-activity-list::-webkit-scrollbar-track {
        background: rgba(24,32,51,0.05);
        border-radius: 999px;
    }

.latest-activity-loading,
.latest-activity-empty {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.latest-activity-item {
    display: block;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    background: var(--card-strong);
    border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
}

    .latest-activity-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(31,43,73,0.10);
        border-color: rgba(90,107,255,0.20);
    }

.latest-activity-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.latest-activity-item-title {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.latest-activity-item-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.latest-activity-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.latest-activity-badge-forum {
    background: rgba(90,107,255,0.10);
    color: var(--accent);
}

.latest-activity-badge-news {
    background: rgba(255,158,44,0.14);
    color: #c67500;
}

@media (max-width: 800px) {
    .latest-activity-list {
        max-height: 248px;
    }

    .latest-activity-item-top {
        flex-direction: column;
    }

    .latest-activity-badge {
        align-self: flex-start;
    }
}

.latest-voters-card {
    margin-top: 14px;
}

.last-voters-list {
    display: grid;
    gap: 8px;
    min-width: 0;
    max-height: 430px;
    overflow-y: auto;
    padding-right: 4px;
}

    .last-voters-list::-webkit-scrollbar {
        width: 8px;
    }

    .last-voters-list::-webkit-scrollbar-thumb {
        background: rgba(24,32,51,0.18);
        border-radius: 999px;
    }

    .last-voters-list::-webkit-scrollbar-track {
        background: rgba(24,32,51,0.05);
        border-radius: 999px;
    }

.last-voter-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--card-strong);
    border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .last-voter-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(31,43,73,0.10);
        border-color: rgba(90,107,255,0.20);
    }

.last-voter-icon-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(90,107,255,0.08);
    overflow: hidden;
}

.last-voter-icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.last-voter-content {
    min-width: 0;
}

.last-voter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.last-voter-name {
    color: var(--text);
    font-weight: 800;
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.last-voter-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.last-voter-status-online {
    color: #1f8f4d;
    background: rgba(43, 185, 90, 0.14);
    border: 1px solid rgba(43, 185, 90, 0.22);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.status-dot-online {
    background: #2bb95a;
    box-shadow: 0 0 0 rgba(43, 185, 90, 0.45);
    animation: statusPulse 1.8s ease-out infinite;
}

.last-voter-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(43, 185, 90, 0.40);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(43, 185, 90, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(43, 185, 90, 0);
    }
}

@media (max-width: 800px) {
    .last-voters-list {
        max-height: 360px;
    }
}

.footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-link-button {
    appearance: none;
    border: 1px solid rgba(90,107,255,0.18);
    background: rgba(90,107,255,0.10);
    color: var(--accent);
    font-weight: 800;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

    .footer-link-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(31,43,73,0.10);
        background: rgba(90,107,255,0.16);
    }

body.modal-open {
    overflow: hidden;
}

.site-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 20px;
}

    .site-modal.is-open {
        display: flex;
    }

.site-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 18, 33, 0.55);
    backdrop-filter: blur(4px);
}

.site-modal__dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(80vh, 760px);
    overflow-y: auto;
    background: rgba(255,255,255,0.97);
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(12, 22, 46, 0.25);
    padding: 26px;
    z-index: 1;
}

.site-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(24,32,51,0.08);
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.site-modal__title {
    margin: 12px 0 16px;
    font-size: clamp(28px, 3vw, 40px);
}

.site-modal__content p {
    margin: 0 0 14px;
}

@media (max-width: 768px) {
    .site-modal__dialog {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .footer-links {
        gap: 8px;
    }

    .footer-link-button {
        padding: 9px 14px;
    }
}

.features-showcase-card {
    margin-top: 20px;
    margin-bottom: 28px;
}

.game-panel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.game-panel-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 16px;
    border: 1px solid rgba(24,32,51,0.08);
    background: rgba(255,255,255,0.84);
    color: var(--text);
    font-weight: 800;
    letter-spacing: .01em;
}

    .game-panel-tab.active {
        background: linear-gradient(135deg, rgba(90,107,255,0.94), rgba(110,121,255,0.94));
        border-color: transparent;
        color: #fff;
    }

.features-intro {
    margin: 0 0 18px;
    max-width: 900px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.feature-detail-tile {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
}

    .feature-detail-tile h3 {
        margin: 0 0 10px;
        font-size: 20px;
        line-height: 1.2;
    }

    .feature-detail-tile p {
        margin: 0;
    }

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

    .game-panel-tab {
        width: 100%;
    }
}

.commands-showcase-card {
    margin: 22px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,251,255,0.94));
}

.commands-header-row {
    align-items: center;
}

.commands-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.commands-intro {
    margin: 0 0 18px;
    max-width: 920px;
}

.commands-embed-wrap {
    width: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(242,246,255,0.88));
    border: 1px solid rgba(24, 32, 51, 0.08);
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
    overflow: hidden;
}

.commands-embed-frame {
    display: block;
    width: 100%;
    height: 720px;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

@media (max-width: 900px) {
    .commands-embed-frame {
        height: 680px;
    }
}


.commands-surface {
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(242,246,255,0.88));
    border: 1px solid rgba(24, 32, 51, 0.08);
    border-radius: 24px;
    padding: 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
    max-height: 760px;
    overflow: auto;
    padding-right: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(90,107,255,0.45) rgba(90,107,255,0.08);
}

    .commands-surface::-webkit-scrollbar {
        width: 10px;
    }

    .commands-surface::-webkit-scrollbar-track {
        background: rgba(90,107,255,0.08);
        border-radius: 999px;
    }

    .commands-surface::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, rgba(90,107,255,0.55), rgba(255,158,44,0.55));
        border-radius: 999px;
    }

    .commands-surface hr {
        border: 0;
        height: 1px;
        background: linear-gradient(90deg, rgba(90,107,255,0), rgba(90,107,255,0.28), rgba(255,158,44,0.28), rgba(90,107,255,0));
        margin: 16px 0 20px;
    }

    .commands-surface p {
        margin: 0 0 16px;
        line-height: 1.7;
    }

    .commands-surface a {
        color: #17325f;
        font-weight: 900;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

        .commands-surface a:hover {
            color: #0f2240;
        }

.commands-category {
    margin: 22px 0 14px;
}

    .commands-category span {
        display: inline-flex;
        align-items: center;
        padding: 10px 14px;
        border-radius: 999px;
        background: linear-gradient(135deg, rgba(255,158,44,0.14), rgba(90,107,255,0.10));
        color: #374151;
        font-weight: 900;
        letter-spacing: .02em;
        text-transform: none;
    }

.commands-table-wrap {
    overflow-x: auto;
    margin: 0 0 16px;
}

.commands-table {
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(24, 32, 51, 0.08);
    border-radius: 18px;
    overflow: hidden;
}

    .commands-table th,
    .commands-table td {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(24, 32, 51, 0.06);
        vertical-align: middle;
    }

    .commands-table th {
        background: linear-gradient(180deg, rgba(255,208,0,0.14), rgba(255,208,0,0.08));
        color: #5b4b1f;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .commands-table tr:last-child td {
        border-bottom: 0;
    }

    .commands-table td {
        color: #1d2840;
        font-weight: 600;
    }

        .commands-table td:first-child,
        .commands-table .command-cell,
        .commands-table .command-cell span,
        .commands-table .command-cell a {
            color: #17325f !important;
            font-weight: 900;
            text-shadow: none;
            white-space: nowrap;
        }

.commands-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(224,57,57,0.06);
    color: #a32020;
    font-weight: 700;
}

.commands-search-bar {
    position: relative;
    margin: 0 0 14px;
}

.commands-search-field {
    position: relative;
    max-width: 520px;
}

.commands-search-input {
    width: 100%;
    min-height: 52px;
    padding: 14px 46px 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(24, 32, 51, 0.12);
    background: rgba(255,255,255,0.98);
    color: #182033;
    font-size: 16px;
    font-weight: 700;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

    .commands-search-input::placeholder {
        color: #7b869d;
        font-weight: 600;
    }

    .commands-search-input:focus {
        border-color: rgba(90,107,255,0.34);
        box-shadow: 0 0 0 4px rgba(90,107,255,0.08);
    }

.commands-search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(90,107,255,0.10);
    color: #5668ff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: none;
}

    .commands-search-clear.is-visible {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.commands-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(720px, 100%);
    max-height: 340px;
    overflow-y: auto;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(24, 32, 51, 0.10);
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(24,32,51,0.16);
    z-index: 15;
    padding: 8px;
}

.commands-search-item {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    text-align: left;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
}

    .commands-search-item:hover {
        background: rgba(90,107,255,0.08);
    }

.commands-search-command {
    color: #1d2b4d;
    font-weight: 900;
}

.commands-search-description {
    color: #4e5c78;
    font-weight: 600;
}

.commands-search-empty {
    padding: 14px;
    color: #5f6b85;
    font-weight: 700;
}

.command-row {
    scroll-margin-top: 120px;
}

    .command-row[hidden] {
        display: none;
    }

.command-row-focus td {
    background: rgba(255, 208, 0, 0.14);
    transition: background .25s ease;
}

@media (max-width: 900px) {
    .commands-search-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .commands-surface {
        max-height: 620px;
        padding-right: 10px;
    }
}

.tg-u {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .commands-header-row {
        align-items: flex-start;
    }

    .commands-actions {
        justify-content: flex-start;
    }

    .commands-surface {
        padding: 16px;
    }
}

.commands-lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(24,32,51,0.04), rgba(90,107,255,0.05));
    border: 1px solid rgba(24,32,51,0.08);
}

.commands-lead-title,
.commands-lead-subtitle {
    font-size: 16px;
    line-height: 1.45;
    font-weight: 800;
}

    .commands-lead-title,
    .commands-lead-title span,
    .commands-lead-title strong {
        color: #17325f !important;
    }

    .commands-lead-subtitle,
    .commands-lead-subtitle span {
        color: #6b7280 !important;
    }

.commands-category-link span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.commands-category-link a,
.commands-note-link a {
    color: #17325f !important;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

    .commands-category-link a:hover,
    .commands-note-link a:hover {
        color: #0f2240 !important;
    }

.commands-category-link {
    cursor: default;
}

    .commands-category-link span {
        padding-right: 18px;
    }

.commands-note {
    color: #5c6780;
    font-weight: 700;
}

/* contrast cleanup for forum BBCode colors injected into commands section */
.commands-surface [style*="color:#ffd000"],
.commands-surface [style*="color: #ffd000"],
.commands-surface [style*="color=#ffd000"],
.commands-surface [style*="color:#ffcc00"],
.commands-surface [style*="color: #ffcc00"],
.commands-surface [style*="color=#ffcc00"] {
    color: #374151 !important;
}

.commands-surface [style*="color:#00ff3c"],
.commands-surface [style*="color: #00ff3c"],
.commands-surface [style*="color=#00ff3c"] {
    color: #17325f !important;
    font-weight: 900 !important;
}

.bloodmoon-player-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--card-strong);
    border: 1px solid var(--border);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .bloodmoon-player-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(31,43,73,0.10);
        border-color: rgba(224,57,57,0.18);
    }

.bloodmoon-player-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    background: rgba(224,57,57,0.08);
    color: #b42318;
    font-weight: 800;
    font-size: 15px;
}

.bloodmoon-player-content {
    min-width: 0;
}

.bloodmoon-player-name {
    color: var(--text);
    font-weight: 800;
    font-size: 14px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.bloodmoon-player-kills {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

/* Home page: spacing around the Community Images block when it is placed under the welcome card. */
.home-community-images-section {
    display: block;
    clear: both;
    margin: 0 0 28px;
}

.home-community-images-section > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.home-community-images-section + .server-status-card {
    margin-top: 0;
}

/* Keep the Community Videos card visually separated from Community Images on the home page. */
.home-community-images-section > .community-videos-card {
    margin-top: 32px !important;
}


@media (max-width: 800px) {
    .tabs {
        gap: 10px;
        padding: 10px;
        border-radius: 22px;
    }

    .primary-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        overflow: visible;
    }

    .primary-tabs .tab {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 12px 10px;
        border-radius: 18px;
        font-size: 15px;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    .primary-tabs .tab.active,
    .primary-tabs .discord-tab {
        grid-column: 1 / -1;
    }

    .servers-list-tab,
    .sandbox-tab {
        gap: 6px;
    }

    .top-link-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
        flex: 0 0 auto;
    }

    .discord-tab {
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .primary-tabs .tab {
        font-size: 14px;
        padding: 11px 8px;
    }

    .primary-tabs .servers-list-tab span:last-child {
        max-width: 105px;
    }
}

/* Strong Support Us button override - visible even if earlier rules are overridden. */
.support-us-pulse,
.primary-tabs .support-us-pulse,
a.tab.support-tab.support-us-pulse {
    position: relative !important;
    overflow: hidden !important;
    gap: 8px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ff8a00, #ff2d55, #22c55e, #ff8a00) !important;
    background-size: 300% 300% !important;
    border: 1px solid rgba(255,255,255,0.55) !important;
    box-shadow: 0 0 0 0 rgba(255,138,0,0.65), 0 14px 34px rgba(255,45,85,0.34), inset 0 0 0 1px rgba(255,255,255,0.20) !important;
    animation: supportUsPulse 1.45s ease-in-out infinite, supportUsGradient 3.2s ease-in-out infinite !important;
}

.support-us-pulse::before,
.primary-tabs .support-us-pulse::before,
a.tab.support-tab.support-us-pulse::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    bottom: -50% !important;
    left: -75% !important;
    width: 48% !important;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.72), rgba(255,255,255,0)) !important;
    transform: skewX(-18deg) !important;
    animation: supportUsShine 2.2s ease-in-out infinite !important;
    pointer-events: none !important;
}

.support-us-pulse::after,
.primary-tabs .support-us-pulse::after,
a.tab.support-tab.support-us-pulse::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    box-shadow: 0 0 0 0 rgba(255,138,0,0.45) !important;
    animation: supportUsRing 1.8s ease-out infinite !important;
    pointer-events: none !important;
}

.support-us-pulse span,
.primary-tabs .support-us-pulse span,
a.tab.support-tab.support-us-pulse span {
    position: relative !important;
    z-index: 1 !important;
    color: #ffffff !important;
    text-shadow: 0 1px 10px rgba(0,0,0,0.20) !important;
}

.support-us-pulse:hover,
.primary-tabs .support-us-pulse:hover,
a.tab.support-tab.support-us-pulse:hover {
    transform: translateY(-3px) scale(1.045) !important;
    box-shadow: 0 0 0 10px rgba(255,138,0,0), 0 22px 50px rgba(255,45,85,0.52), inset 0 0 0 1px rgba(255,255,255,0.30) !important;
}

@keyframes supportUsPulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 0 rgba(255,138,0,0.65), 0 14px 34px rgba(255,45,85,0.34), inset 0 0 0 1px rgba(255,255,255,0.20);
    }
    50% {
        transform: translateY(-2px) scale(1.035);
        box-shadow: 0 0 0 9px rgba(255,138,0,0), 0 18px 42px rgba(255,45,85,0.46), inset 0 0 0 1px rgba(255,255,255,0.28);
    }
}

@keyframes supportUsGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes supportUsShine {
    0%, 20% { left: -75%; opacity: 0; }
    35% { opacity: 1; }
    75%, 100% { left: 125%; opacity: 0; }
}
