        /* --- GLOBAL RESET & SCROLL FIX --- */
        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html, body {
            width: 100%;
            height: 100%;
            overflow-x: hidden;
            overflow-y: auto; /* ENABLE SCROLLING */
            background-color: #050510;
            font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            color: #fff;
            scroll-behavior: smooth;
        }

        /* --- BACKGROUND ANIMATION (Starfield/Grid) --- */
        .bg-animation {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: 
                linear-gradient(rgba(5, 5, 16, 0.9), rgba(5, 5, 16, 0.9)),
                url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="%2306b6d4" opacity="0.3"/></svg>');
            background-size: cover, 50px 50px;
            z-index: -2;
            animation: bg-move 60s linear infinite;
        }

        @keyframes bg-move {
            0% { background-position: 0 0; }
            100% { background-position: 1000px 1000px; }
        }

        /* --- LOADING SCREEN --- */
        #loading-screen {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: #050510;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.8s ease, visibility 0.8s ease;
        }

        .loader-container {
            text-align: center;
            max-width: 500px;
            padding: 2rem;
        }

        .cat-ship {
            font-size: 4rem;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            animation: floatShip 3s ease-in-out infinite;
        }

        .cat-ship img {
            width: 64px;
            height: 64px;
            filter: drop-shadow(0 0 15px #06b6d4);
            /* The animation is inherited from parent .cat-ship */
        }

        .cat-ship span {
            filter: drop-shadow(0 0 15px #06b6d4);
        }

        @keyframes floatShip {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-15px) rotate(2deg); }
        }

        .loading-text {
            font-family: 'Courier New', monospace;
            font-size: 1.2rem;
            color: #67e8f9;
            min-height: 1.5em;
            margin-bottom: 1rem;
            text-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
        }

        .progress-bar {
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
            overflow: hidden;
            margin-top: 1rem;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #06b6d4, #67e8f9);
            width: 0%;
            transition: width 0.1s linear;
            box-shadow: 0 0 10px #06b6d4;
        }

        /* --- MAIN DASHBOARD (Hero + Grid) --- */
        #dashboard-content {
            display: none;
            opacity: 0;
            transition: opacity 1s ease;
            min-height: 100vh;
            padding-bottom: 4rem;
        }

        /* HERO SECTION (Full Width, Immersive) */
        .hero-section {
            position: relative;
            width: 100%;
            min-height: 60vh; /* Takes up 60% of screen */
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 2rem;
            background: radial-gradient(circle at center, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
            overflow: hidden;
        }

        /* Animated Grid Lines in Hero */
        .hero-grid {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background-image: 
                linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
                linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
            background-size: 50px 50px;
            perspective: 500px;
            transform: rotateX(60deg) scale(2);
            opacity: 0.3;
            animation: grid-move 20s linear infinite;
            z-index: 0;
        }

        @keyframes grid-move {
            0% { transform: rotateX(60deg) scale(2) translateY(0); }
            100% { transform: rotateX(60deg) scale(2) translateY(50px); }
        }

        .hero-content {
            position: relative;
            z-index: 2;
            max-width: 900px;
        }

        .radar-container {
            position: relative;
            width: 100px;
            height: 100px;
            margin: 0 auto 1.5rem auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .radar-scan {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 2px solid rgba(6, 182, 212, 0.3);
            background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
            animation: radar-spin 4s linear infinite;
        }

        .radar-scan::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: 50%;
            border-top: 3px solid #06b6d4;
            border-right: 3px solid transparent;
            animation: radar-sweep 2s linear infinite;
        }

        @keyframes radar-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        @keyframes radar-sweep { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        .radar-icon {
            font-size: 2.5rem;
            color: #06b6d4;
            z-index: 2;
            filter: drop-shadow(0 0 15px #06b6d4);
        }

        .hero-title {
            font-size: 3.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 4px;
            margin-bottom: 1rem;
            color: #fff;
            text-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
        }

        .hero-title span {
            color: #06b6d4;
            text-shadow: 0 0 30px #06b6d4;
        }

        .terminal-box {
            font-family: 'Courier New', monospace;
            font-size: 1.2rem;
            color: #a5f3fc;
            background: rgba(0, 0, 0, 0.4);
            display: inline-block;
            padding: 0.75rem 1.5rem;
            border-radius: 4px;
            border-left: 4px solid #06b6d4;
            min-height: 1.8em;
            margin-top: 1rem;
            position: relative;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        }

        .cursor {
            display: inline-block;
            width: 10px;
            height: 1.2em;
            background-color: #06b6d4;
            margin-left: 5px;
            animation: blink 1s step-end infinite;
            vertical-align: middle;
        }

        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

        /* --- CONTENT GRID --- */
        .content-area {
            max-width: 1200px;
            margin: -50px auto 0 auto; /* Overlap hero slightly */
            padding: 0 1.5rem;
            position: relative;
            z-index: 3;
        }

        .server-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
        }

        .server-card {
            background: rgba(20, 30, 45, 0.7);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(6, 182, 212, 0.3);
            border-radius: 16px;
            padding: 2rem;
            text-align: center;
            text-decoration: none;
            color: #fff;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            opacity: 0; /* Hidden for animation */
            transform: translateY(30px);
        }

        .server-card.visible {
            opacity: 1;
            transform: translateY(0);
        }

        .server-card:hover {
            transform: translateY(-10px) scale(1.02);
            background: rgba(30, 50, 70, 0.9);
            border-color: #06b6d4;
            box-shadow: 0 20px 40px rgba(6, 182, 212, 0.2);
        }

        .server-card i {
            font-size: 3rem;
            color: #67e8f9;
            margin-bottom: 1rem;
            filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
        }

        .server-card h3 {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: #e0f2fe;
        }

        /* Status Indicator with Pulsing Dot - FIXED ALIGNMENT */
        .server-card small {
            font-size: 0.9rem;
            font-weight: 600;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.1);
            
            /* FLEXBOX ALIGNMENT FIX */
            display: inline-flex; 
            align-items: center;      /* Vertically centers the dot with text */
            justify-content: center;  /* Centers horizontally if needed */
            gap: 0.5rem;              /* Space between dot and text */
            line-height: 1;           /* Prevents line-height from affecting alignment */
            vertical-align: middle;   /* Fallback for inline contexts */
            transition: all 0.3s ease;
        }

        /* The Dot Icon */
        .server-card small i {
            font-size: 0.5rem; 
            display: inline-block;
            line-height: 1;          /* Ensures icon doesn't stretch */
            animation: pulse-dot 2s infinite;
            /* Reset any default icon spacing */
            margin: 0; 
        }

        /* Online Color & Pulse */
        .status-online { 
            color: #4ade80; 
        }
        .status-online i {
            color: #4ade80;
            text-shadow: 0 0 8px #4ade80;
        }

        /* Maintenance Color */
        .status-maintenance { 
            color: #fbbf24; 
        }
        .status-maintenance i {
            color: #fbbf24;
            text-shadow: 0 0 8px #fbbf24;
            animation: pulse-dot 3s infinite; 
        }

        /* Offline Color */
        .status-offline { 
            color: #f87171; 
        }
        .status-offline i {
            color: #f87171;
        }

        /* The Pulse Animation */
        @keyframes pulse-dot {
            0% {
                transform: scale(0.95);
                opacity: 0.7;
                box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
            }
            70% {
                transform: scale(1);
                opacity: 1;
                box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
            }
            100% {
                transform: scale(0.95);
                opacity: 0.7;
                box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
            }
        }

/* Player Names Row */
.player-names {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.player-names i {
    color: #06b6d4;
    font-size: 0.75rem;
    filter: none;
    margin: 0;
}

/* Offline Pulse Animation */
.status-offline i {
    animation: pulse-dot-offline 3s infinite;
}

@keyframes pulse-dot-offline {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7);
    }
    70% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(248, 113, 113, 0);
    }
    100% {
        transform: scale(0.95);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
    }
}

/* Card Hover Glow for Status */
.server-card:hover .status-online i {
    text-shadow: 0 0 15px #4ade80;
}

.server-card:hover .status-offline i {
    text-shadow: 0 0 15px #f87171;
}

/* ══════════════════════════════════════
   Server Card Background Images
   ══════════════════════════════════════ */

.server-card.card-bg {
    position: relative;
    overflow: hidden;
    background-color: transparent; /* clear any solid bg so image shows */
}

/* Per-card background images */
#card-minecraft.card-bg {
    background-image: url('../_img/card-minecraft.png');
    background-size: cover;
    background-position: center;
}

#card-vintagestory.card-bg {
    background-image: url('../_img/card-vintagestory.png');
    background-size: cover;
    background-position: center;
}

/* Dark gradient overlay — keeps text readable */
.card-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.60) 100%
    );
    z-index: 1;
    border-radius: inherit;
    pointer-events: none; /* clicks pass through to the <a> */
    transition: background 0.3s ease;
}

/* Hover: lighten overlay slightly for interactivity feel */
.server-card.card-bg:hover .card-bg-overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.45) 100%
    );
}

/* Content sits above the overlay */
.card-content {
    position: relative;
    z-index: 2;
}

/* Extra text shadow for contrast over busy backgrounds */
.card-bg h3 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.card-bg small,
.card-bg .player-names {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

        /* CLAN CARD SPECIAL */
        .clan-card {
            background: linear-gradient(135deg, rgba(20, 5, 10, 0.9), rgba(40, 10, 20, 0.85));
            border: 1px solid rgba(220, 38, 38, 0.5);
            /* REMOVED: grid-column: 1 / -1 and span 2 */
            /* Now fits naturally in the grid like other cards */
        }

        .clan-card:hover {
            border-color: #dc2626;
            box-shadow: 0 20px 40px rgba(220, 38, 38, 0.3);
        }

        .clan-card i {
            color: #dc2626;
            filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.6));
        }

        .clan-card h3 { color: #fecaca; }
        .clan-card small { color: #fca5a5; border-color: rgba(220, 38, 38, 0.3); }

        .clan-badge {
            margin-top: 1rem;
            padding: 0.5rem 1.2rem;
            background: rgba(220, 38, 38, 0.2);
            border: 1px solid #dc2626;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #fca5a5;
            transition: all 0.3s;
        }

        .clan-card:hover .clan-badge {
            background: #dc2626;
            color: #1a0505;
            box-shadow: 0 0 15px #dc2626;
        }

        .back-btn {
            display: block;
            width: 200px;
            margin: 3rem auto 0;
            padding: 1rem;
            text-align: center;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid #8b5cf6;
            color: #c4b5fd;
            text-decoration: none;
            border-radius: 8px;
            font-weight: 600;
            transition: all 0.3s;
        }

        .back-btn:hover {
            background: #8b5cf6;
            color: #fff;
            box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
        }

        /* Mobile Adjustments */
        @media (max-width: 768px) {
            .hero-title { font-size: 2.2rem; }
            .hero-section { min-height: 50vh; }
            .clan-card { grid-column: 1 / -1; }
        }
