/* ==========================================================================
   📁 1. LOCAL FONT ACCESSIBILITY ENGINE
   ========================================================================== */
@font-face {
    font-family: 'Monocraft';
    src: url('Monocraft.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================================================
   🎨 2. CORE THEME VARIABLE REGISTRY
   ========================================================================== */
:root {
    --mc-bg: #2c2c2c;
    --mc-panel: #4c4c4c;
    --mc-border-light: #8f8f8f;
    --mc-border-dark: #373737;
    --mc-text-shadow: 2px 2px 0px #151515;
    
    --mc-green: #55ff55;
    --mc-red: #ff5555;
    --mc-yellow: #ffff55;
    --mc-purple: #aa00aa;
}

/* ==========================================================================
   🧱 3. BASE STYLES & LAYOUT (Desktop & Mobile Unified Framework)
   ========================================================================== */
body {
    font-family: 'Monocraft', monospace;
    font-size: 16px;
    
    /* Dark tiled bedrock/stone texture */
    background-color: #1a1a1a;
    background-image: radial-gradient(circle, #2e2e2e 10%, transparent 11%), radial-gradient(circle, #242424 10%, transparent 11%);
    background-size: 32px 32px;
    background-position: 0 0, 16px 12px;
    color: #ffffff;
    text-align: center;
    padding: 30px 10px; /* Fluid compact padding for all screens */
    margin: 0;
    image-rendering: pixelated;
}

.card {
    background: #2e2e2e;
    padding: 30px 20px;
    display: inline-block;
    max-width: 450px;
    width: 100%;
    box-sizing: border-box;
    
    /* 🌟 FIX: Restored the full internal 3D pixel chiseled border style */
    border: 4px solid #000000;
    box-shadow: 
        inset 4px 4px 0px var(--mc-border-light),
        inset -4px -4px 0px var(--mc-border-dark),
        0px 12px 0px rgba(0,0,0,0.5);
}

h1 {
    color: var(--mc-yellow);
    text-shadow: var(--mc-text-shadow);
    margin: 0 0 5px 0;
    font-size: 2.4rem;
    letter-spacing: 2px;
}

.domain {
    color: #aaa;
    font-size: 1.1rem;
    margin-bottom: 35px;
    text-shadow: var(--mc-text-shadow);
}

.stat-line {
    font-size: 1.2rem;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: var(--mc-text-shadow);
    gap: 10px; /* Built-in grid spacing protection */
}

/* 🟢 Status Indicators */
.online { color: var(--mc-green); font-weight: normal; }
.offline { color: var(--mc-red); font-weight: normal; }
.count { color: #ffffff; }

/* 🧪 Experience Bar Progress Meters */
.perf-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    justify-content: flex-end;
    max-width: 65%; /* Restricts the bar wrapper from invading the text label width */
}

.progress-container {
    width: 100%; /* 🌟 FIX: Swapped to fully fluid width to shrink dynamically on mobile */
    max-width: 180px; /* Caps desktop container limits perfectly */
    background: #000000;
    border: 3px solid #555555;
    height: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 2px 2px 0px #000;
    flex-grow: 1;
}

.progress-bar {
    background: var(--mc-green);
    width: 0%;
    height: 100%;
    box-shadow: inset 0px 2px 0px rgba(255,255,255,0.4);
    transition: width 0.4s steps(10);
}

#ram-bar { background: #bd2bf1; }

.progress-text {
    font-size: 1.1rem;
    min-width: 60px;
    text-align: right;
    color: var(--mc-green);
}
#ram-text { color: #e07bf7; }

/* 🕹️ Item Slot Bot Subsystem Panel */
.bot-controls {
    border-top: 4px solid #1a1a1a;
    margin-top: 30px;
    padding-top: 25px;
    text-align: left;
}
.bot-title {
    color: var(--mc-yellow);
    font-size: 1.1rem;
    text-shadow: var(--mc-text-shadow);
    margin-bottom: 15px;
    text-align: center;
}
.bot-label {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 6px;
    text-shadow: var(--mc-text-shadow);
}
.btn-group {
    display: flex;
    gap: 12px;
}

/* 🔳 Standard 3D In-Game Button Styling */
.btn {
    flex: 1;
    padding: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    color: #e0e0e0;
    background: #767676;
    cursor: pointer;
    text-shadow: var(--mc-text-shadow);
    border: 3px solid #000000;
    box-shadow: 
        inset 3px 3px 0px #b0b0b0,
        inset -3px -3px 0px #4a4a4a;
}
.btn:hover {
    background: #8c90c7;
    color: #fffbbf;
    box-shadow: 
        inset 3px 3px 0px #bcbee5,
        inset -3px -3px 0px #535677;
}
.btn:active {
    box-shadow: 
        inset 3px 3px 0px #313131,
        inset -3px -3px 0px #a1a1a1;
    padding-top: 14px;
    padding-bottom: 10px;
}

.bot-status {
    font-size: 1rem;
    color: #aaa;
    margin-top: 15px;
    text-align: center;
    text-shadow: var(--mc-text-shadow);
}

/* 📝 Tab List Player Grid Styles */
.player-list {
    text-align: left;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    margin-top: 30px;
    border: 3px solid #1a1a1a;
    display: none;
}
.player-title {
    color: var(--mc-yellow);
    margin-bottom: 15px;
    border-bottom: 3px solid #1a1a1a;
    padding-bottom: 8px;
    font-size: 1.1rem;
    text-shadow: var(--mc-text-shadow);
}
.player-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.player-name {
    color: #ffffff;
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border: 2px solid #000;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: var(--mc-text-shadow);
}

/* ==========================================================================
   📱 4. CONDENSED MOBILE RESPONSIVENESS OVERRIDES
   ========================================================================== */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .card {
        padding: 20px 12px;
    }
    h1 {
        font-size: 2rem;
    }
    .domain {
        margin-bottom: 20px;
    }
    .stat-line {
        font-size: 1.1rem;
    }
    .btn {
        padding: 10px;
        font-size: 1rem;
    }
    .player-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 360px) {
    /* Safe stack option ONLY for ultra-narrow viewport screens */
    .btn-group {
        flex-direction: column;
    }
}

/* ==========================================================================
   ⏳ 5. COOLDOWN STATE (Prevent Spam)
   ========================================================================== */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn.cooldown {
    filter: grayscale(100%);
    background-color: #333;
    border-color: #555;
    /* Matches the 3D look but makes it appear pressed in/deactivated */
    box-shadow: 
        inset 3px 3px 0px #222, 
        inset -3px -3px 0px #444; 
    color: #888;
    transition: all 0.3s ease;
}