:root {
    --bg: #050505;
    --nav-bg: rgba(10, 10, 10, 0.92);
    --accent: hsl(60, 26%, 93%);
    --accent2: #55ff55; /* Minecraft Green */
    --mc-gold: #ffaa00;
    --mc-aqua: #55ffff;
    --mc-dark-card: #0e110e;
    --offline: #f70606;
    --online: #0fd320;
    --text-main: #43d843;
    --text-dim: #999999;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-sans: 'Inter', sans-serif;
    --border-mc: 2px solid #224422;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
}

/* --- GLOBAL HTML & SCROLLING CONFIG --- */
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

#particles-js { 
    position: fixed; 
    width: 100%; 
    height: 100%; 
    top: 0; 
    left: 0; 
    z-index: 1; 
}

/* --- Global Font Awesome Icon Scaling --- */
i {
    font-size: 1.15em;
    vertical-align: -1px;
}

/* --- Header & Footer Navigation --- */
.top-nav {
    position: fixed; 
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    top: 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0.8rem 3rem; 
    border-bottom: 1px solid rgba(85, 255, 85, 0.15);
}

.nav-links {
    display: flex;
    gap: 12px;
}

.bottom-footer {
    position: relative; 
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 100;
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    padding: 1.2rem 3rem; 
    border-top: 1px solid rgba(85, 255, 85, 0.15);
    text-align: center;
    margin-top: auto;
}

/* --- Buttons & Minecraft Accents --- */
.mc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent2);
    background: rgba(85, 255, 85, 0.05);
    border: 1px solid var(--accent2);
    padding: 8px 16px;
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset -2px -2px 0px rgba(0,0,0,0.5);
}

.mc-btn:hover {
    background: var(--accent2);
    color: #000;
    box-shadow: 0 0 12px rgba(85, 255, 85, 0.5);
}

.mc-btn-accent {
    border-color: var(--mc-aqua);
    color: var(--mc-aqua);
}

.mc-btn-accent:hover {
    background: var(--mc-aqua);
    color: #000;
    box-shadow: 0 0 12px rgba(85, 255, 255, 0.5);
}

.block-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
}

.mc-text-green { color: var(--accent2); }

/* --- Live Status, Player Badge & Ping Badge --- */
.server-status-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}

.system-status { 
    font-family: var(--font-mono); 
    color: var(--text-dim); 
    font-size: 0.8rem; 
    display: flex;
    align-items: center;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background: var(--online);
    box-shadow: 0 0 8px var(--online);
}

.status-indicator.offline {
    background: var(--offline);
    box-shadow: 0 0 8px var(--offline);
}

.status-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gold-badge {
    color: var(--mc-gold);
    background: rgba(255, 170, 0, 0.08);
    border: 1px solid rgba(255, 170, 0, 0.25);
}

.aqua-badge {
    color: var(--mc-aqua);
    background: rgba(85, 255, 255, 0.08);
    border: 1px solid rgba(85, 255, 255, 0.25);
}

/* --- Hero Full-Width Dashboard --- */
.hero-dashboard {
    position: relative;
    z-index: 10;
    padding: 100px 3rem 60px;
    max-width: 1550px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.dashboard-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.85);
    border: var(--border-mc);
    padding: 24px 32px;
    border-radius: 4px;
    gap: 2rem;
}

.banner-left-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

/* Base Logo Container */
.server-logo-wrapper {
    width: 700px;
    height: 700px;
    max-width: 140px;
    max-height: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.server-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(85, 255, 85, 0.3));
}

.banner-title-group {
    display: flex;
    flex-direction: column;
}

.build-info {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    margin: 4px 0 8px;
    text-transform: uppercase;
}

/* Responsive adjustments for mid screens */
@media (max-width: 1050px) {
    .dashboard-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .banner-left-content {
        flex-direction: row;
    }
}

@media (max-width: 600px) {
    .banner-left-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .server-logo-wrapper {
        max-width: 100px;
        max-height: 100px;
    }
}

.main-title { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 900; margin-bottom: 0.2rem; }
.typing-title { font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 400; color: var(--text-dim); margin-bottom: 0.8rem; }
#typewriter { border-right: 2px solid var(--accent); color: var(--accent2); font-weight: 600; padding-right: 5px; }
.tagline { color: var(--text-dim); max-width: 650px; line-height: 1.5; font-size: 0.92rem; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.dashboard-card {
    background: var(--mc-dark-card);
    border: var(--border-mc);
    padding: 20px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.version-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 2px;
}

.ip-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--mc-gold);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 6px;
}

.card-desc {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 16px;
}

.action-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Copy Menu Popups */
.copy-container { position: relative; }
.copy-menu {
    position: absolute; 
    bottom: 45px; 
    right: 0;
    left: 0;
    text-align: center;
    background: var(--nav-bg); 
    color: var(--accent2); 
    padding: 6px 10px;
    border-radius: 3px; 
    font-size: 0.75rem; 
    font-family: var(--font-mono);
    border: 1px solid var(--accent2);
    opacity: 0; 
    visibility: hidden; 
    transition: 0.2s ease; 
    z-index: 110;
}
.copy-menu.show-menu { opacity: 1; visibility: visible; bottom: 50px; }

/* Dashboard FAQ Block */
.dashboard-faq-block {
    background: rgba(10, 10, 10, 0.85);
    border: var(--border-mc);
    padding: 28px;
    border-radius: 4px;
}

.dashboard-faq-block h2 {
    font-family: var(--font-mono);
    color: var(--mc-gold);
    font-size: 1.15rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
}

.faq-item h4 {
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item h4 i { color: var(--mc-gold); }
.faq-item p { color: var(--text-dim); font-size: 0.85rem; line-height: 1.4; }
.faq-item code { font-family: var(--font-mono); color: var(--accent2); }

/* --- WIKI PAGE SPECIFIC STYLES --- */
.wiki-hero {
    position: relative;
    z-index: 10;
    padding: 110px 3rem 60px;
    max-width: 1350px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

.wiki-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wiki-header-block {
    background: rgba(10, 10, 10, 0.85);
    border: var(--border-mc);
    padding: 24px;
    border-radius: 4px;
}

.wiki-header-block h1 {
    font-family: var(--font-mono);
    color: var(--mc-gold);
    font-size: 1.4rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wiki-header-block p {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.tablet-feature-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    background: rgba(85, 255, 255, 0.05);
    border: 1px solid rgba(85, 255, 255, 0.25);
    padding: 22px;
    border-radius: 4px;
}

.banner-icon i {
    color: var(--mc-aqua);
}

.banner-text p {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 4px;
}

.wiki-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-block {
    background: rgba(10, 10, 10, 0.85);
    border: var(--border-mc);
    padding: 24px;
    border-radius: 4px;
}

.info-block h2 {
    font-family: var(--font-mono);
    color: var(--accent2);
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.command-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.command-item code {
    font-family: var(--font-mono);
    color: var(--accent2);
    background: #000;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid rgba(85,255,85,0.2);
    width: fit-content;
    font-size: 0.85rem;
}

.command-item span {
    color: #ccc;
    font-size: 0.82rem;
    line-height: 1.4;
}

/* Logo & Footer Utils */
.logo-glitch { font-size: 1.4rem; font-weight: 900; color: var(--accent2); letter-spacing: 2px; text-decoration: none;}
.system-id { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); opacity: 0.8; }
.footer-nav { margin-bottom: 0.5rem; display: flex; gap: 1.5rem; }
.footer-nav a { color: var(--accent2); text-decoration: none; font-size: 0.8rem; font-family: var(--font-mono); font-weight: bold; opacity: 0.8; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-left { font-size: 0.65rem; color: #555; font-family: var(--font-mono); }

/* Responsive Adjustments */
@media (max-width: 1050px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-banner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .server-status-container { align-items: flex-start; }
    .wiki-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
    .top-nav { padding: 0.8rem 1.2rem; }
    .hero-dashboard, .wiki-hero { padding-left: 1.2rem; padding-right: 1.2rem; }
    .faq-grid { grid-template-columns: 1fr; }
}


/* --- LIVE MAP PAGE SPECIFIC STYLES --- */
body.map-page-body {
    height: 100vh;
    overflow: hidden !important;
}

.map-wrapper {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: #000;
    z-index: 10;
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Dynamic Map Mobile Fixes */
@media (max-width: 800px) {
    .map-wrapper {
        top: 105px;
        height: calc(100vh - 105px);
    }
}

:root {
color-scheme: dark;
}

iframe {
color-scheme: dark;
background-color: #050505;
}

/* --- MAP OVERLAY COVER --- */
.map-footer-cover {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 8px;
    pointer-events: auto;
}

/* Link Button Overlay */
.cover-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-right: 2px;
    background: #0a0a0a;
    border: 1px solid var(--accent2);
    border-radius: 6px;
    color: var(--accent2);
    text-decoration: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
    transition: all 0.2s ease;
}

.cover-link-btn:hover {
    background: var(--accent2);
    color: #000;
    box-shadow: 0 0 10px rgba(85, 255, 85, 0.6);
}

.cover-link-btn i {
    font-size: 1.35rem;
    margin-top: 6px;
}

/* Copyright / Node Tag Overlay */
.map-copyright-cover,
.cover-node-tag {
    background: #0a0a0a;
    border: 1px solid rgba(85, 255, 85, 0.4);
    margin-top: 0px;
    color: var(--accent2);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 3px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}


/* ==========================================
   MOBILE RESPONSIVE OVERRIDES (max-width: 768px)
   ========================================== */

@media (max-width: 768px) {
    /* --- Navigation Bar --- */
    .top-nav {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .logo-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .system-id {
        font-size: 0.65rem;
    }

    .nav-links {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .nav-links .mc-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.78rem;
    }

    /* --- Hero Section & Spacing --- */
    .hero-dashboard, 
    .wiki-hero {
        padding: 120px 1rem 40px;
        gap: 1.25rem;
    }

    /* --- Dashboard Banner --- */
    .dashboard-banner {
        padding: 18px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .banner-left-content {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .server-logo-wrapper {
        max-width: 72px;
        max-height: 72px;
    }

    .main-title {
        font-size: 1.6rem;
    }

    .typing-title {
        font-size: 0.9rem;
    }

    .tagline {
        font-size: 0.8rem;
    }

    /* --- Server Health & Status --- */
    .server-status-container {
        align-items: stretch;
        width: 100%;
        border-top: 1px dashed rgba(85, 255, 85, 0.2);
        padding-top: 12px;
    }

    .status-badges {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .status-badge {
        flex: 1;
        justify-content: center;
        font-size: 0.7rem;
        padding: 8px 6px;
    }

    /* --- Grid Systems --- */
    .dashboard-grid,
    .faq-grid,
    .wiki-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-card {
        padding: 16px;
    }

    .ip-value {
        font-size: 0.95rem;
        word-break: break-all;
    }

    .dashboard-faq-block {
        padding: 18px 16px;
    }

    /* --- Wiki Components --- */
    .tablet-feature-banner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
        gap: 12px;
    }

    .banner-icon i {
        font-size: 2.2rem;
    }

    /* --- Map Page Mobile Adjustments --- */
    .map-footer-cover {
        padding: 4px;
        gap: 4px;
    }

    .cover-link-btn {
        width: 42px;
        height: 42px;
    }

    .cover-node-tag {
        font-size: 0.62rem;
        padding: 4px 6px;
    }

    /* --- Footer --- */
    .bottom-footer {
        padding: 1rem;
    }

    .footer-nav {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}