@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@300;400;600&family=VT323&display=swap');

/* =========================================
   GLOBAL THEME: DARK MINECRAFT WARFARE
   ========================================= */
body {
    background-color: #0d0d0d;
    background-image: linear-gradient(rgba(10, 10, 10, 0.8), rgba(15, 10, 10, 0.9)), url('https://images.unsplash.com/photo-1579373903781-fd5c0c30c4cd?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-attachment: fixed;
    color: #e0e0e0;
    font-family: 'Mitr', sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    font-family: 'Mitr', sans-serif;
    color: #ff3333;
    text-transform: uppercase;
    text-shadow: 2px 2px 0px #000;
}

/* =========================================
   CONTAINERS & CARDS (Deepslate / Netherite Style)
   ========================================= */
.card {
    background: #1a1a1a !important;
    border: 4px solid #000 !important;
    box-shadow: inset 4px 4px 0 rgba(255,255,255,0.1), inset -4px -4px 0 rgba(0,0,0,0.8), 5px 5px 15px rgba(0,0,0,0.5) !important;
    border-radius: 0 !important; /* ยกเลิกขอบมน บังคับเหลี่ยมแบบเกม */
    padding: 20px;
    margin-bottom: 20px;
    color: #ccc;
    transition: transform 0.2s;
}

.card:hover {
    transform: scale(1.02);
    border-color: #ff3333 !important;
}

.server-list li {
    background: #2a2a2a;
    border: 2px solid #000;
    padding: 10px;
    margin-bottom: 8px;
    list-style: none;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.05);
}

.tag {
    background: #28a745;
    color: #fff;
    padding: 2px 8px;
    border: 2px solid #000;
    font-size: 12px;
    font-weight: bold;
}

/* =========================================
   MINECRAFT PIXEL BUTTONS
   ========================================= */
.mc-btn, .chat-btn, .mc-floating-btn, .mc-floating-btn1 {
    background: #4a4a4a !important;
    color: #ffffff !important;
    border: 4px solid #000000 !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    font-family: 'Mitr', sans-serif !important;
    font-size: 16px !important;
    font-weight: bold !important;
    box-shadow: inset -4px -4px 0 #222222, inset 4px 4px 0 #7a7a7a !important;
    margin: 4px !important;
    display: inline-block !important;
    border-radius: 0px !important;
    text-shadow: 2px 2px 0px #000000 !important;
    text-decoration: none !important;
    transition: all 0.1s;
}

.mc-btn:hover, .chat-btn:hover, .mc-floating-btn:hover {
    background: #5a5a5a !important;
    color: #fff !important;
}

.mc-btn:active, .chat-btn:active, .mc-floating-btn:active {
    transform: translateY(4px) !important;
    box-shadow: inset 4px 4px 0 #222222 !important;
}

/* ปุ่มแดง (War Theme) */
.mc-btn-red {
    background: #8b0000 !important;
    box-shadow: inset -4px -4px 0 #4a0000, inset 4px 4px 0 #d12c2c !important;
}
.mc-btn-red:hover { background: #a50000 !important; }

/* =========================================
   POPUP CHAT (In-game Chat Style)
   ========================================= */
.chat-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background-color: rgba(0, 0, 0, 0.85); /* โปร่งแสงแบบช่องแชทเกม */
    border: 4px solid #000;
    box-shadow: inset 2px 2px 0 rgba(255,255,255,0.1), 0 10px 25px rgba(0,0,0,0.8);
    z-index: 9999;
    font-family: 'Mitr', sans-serif;
}

.chat-header {
    background-color: #2b2b2b;
    border-bottom: 4px solid #000;
    color: #ff3333;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
}

.chat-body {
    height: 320px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar สำหรับแชท */
.chat-body::-webkit-scrollbar { width: 8px; }
.chat-body::-webkit-scrollbar-track { background: #111; border-left: 2px solid #000; }
.chat-body::-webkit-scrollbar-thumb { background: #444; border: 1px solid #000; }

.chat-footer {
    padding: 10px;
    display: flex;
    background: #1a1a1a;
    border-top: 4px solid #000;
}

.chat-footer input {
    flex: 1;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 2px solid #444;
    outline: none;
    font-family: 'Mitr', sans-serif;
}
.chat-footer input:focus { border-color: #ff3333; }

.chat-footer button {
    margin-left: 8px;
    padding: 5px 15px;
    background: #aa0000;
    color: white;
    border: 3px solid #000;
    box-shadow: inset -2px -2px 0 #550000, inset 2px 2px 0 #ff5555;
    cursor: pointer;
    font-family: 'Mitr', sans-serif;
    font-weight: bold;
}
.chat-footer button:active { box-shadow: inset 2px 2px 0 #550000; }

/* ข้อความแชท */
.msg {
    margin-bottom: 12px;
    padding: 8px 12px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
    border: 2px solid #000;
}
.msg.sent {
    background: #2b2b2b;
    color: #fff;
    margin-left: auto;
    border-left: 4px solid #00BFFF; /* สีฝั่งผู้เล่น */
}
.msg.received {
    background: #4a0000;
    color: #fff;
    margin-right: auto;
    border-left: 4px solid #ff3333; /* สีฝั่งแอดมิน */
}
.msg .time { font-size: 10px; margin-top: 4px; opacity: 0.6; }

/* แจ้งเตือน */
.chat-btn-container { position: fixed; bottom: 120px; right: 20px; z-index: 999; }
.notification-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff0000;
    color: white;
    border: 3px solid #000;
    padding: 2px 6px;
    display: none;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
    box-shadow: inset 2px 2px 0 #ff6666;
}

/* =========================================
   OVERLAY & WINDOWS (Minecraft Inventory Style)
   ========================================= */
.mc-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 10000;
    display: none; justify-content: center; align-items: center;
}

.mc-window {
    background: #333333;
    border: 4px solid #000;
    width: 420px;
    box-shadow: inset 4px 4px 0 #555, inset -4px -4px 0 #111, 0 0 20px rgba(255,0,0,0.2);
}
.mc-header {
    background: #1a1a1a;
    color: #fff;
    padding: 10px 15px;
    border-bottom: 4px solid #000;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: bold;
    text-shadow: 1px 1px 0px #000;
}
.mc-close-x {
    background: #aa0000;
    border: 3px solid #000;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    padding: 2px 8px;
    box-shadow: inset -2px -2px 0 #550000, inset 2px 2px 0 #ff5555;
}
.mc-close-x:active { box-shadow: inset 2px 2px 0 #550000; }
.mc-body { padding: 15px; display: flex; justify-content: center; background: #222; }
/* =========================================
   WARFARE HUD: TOP & BOTTOM NAVIGATION
   ========================================= */
.navbar-default {
    background: rgba(20, 20, 20, 0.95) !important; /* พื้นหลังมืดสนิทแบบกระจกโปร่งแสง */
    border: none !important;
    padding: 8px 0 !important;
}

/* แถบบน: เพิ่มเส้นขอบเหลี่ยมสีดำขอบล่าง และเงาสีแดงสไตล์เรดสโตน */
.navbar-fixed-top {
    border-bottom: 4px solid #000000 !important;
    box-shadow: 0 4px 0 #8b0000, 0 8px 20px rgba(0, 0, 0, 0.7) !important;
}

/* แถบล่าง: เพิ่มเส้นขอบเหลี่ยมสีดำขอบบน และเงาสีแดง */
.navbar-fixed-bottom {
    border-top: 4px solid #000000 !important;
    box-shadow: 0 -4px 0 #8b0000, 0 -8px 20px rgba(0, 0, 0, 0.7) !important;
}

/* ปรับแต่งตัวอักษรของชื่อเซิร์ฟเวอร์ในเมนู */
.navbar-brand {
    color: #ffffff !important;
    text-shadow: 2px 2px 0px #000000 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Mitr', sans-serif !important;
}

.navbar-brand:hover {
    color: #ff3333 !important;
}

/* ไอคอนเกมหมุนหรือมีลูกเล่นแนวต่อสู้ */
.icon_stx {
    image-rendering: pixelated; /* ปรับภาพให้คมชัดแบบพิกเซล */
    filter: drop-shadow(2px 2px 0px #000);
}