/* --- MODERN HACKER THEME (Glass & Space) --- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@400;700&display=swap');



:root {

    /* Color Palette - Deep Blue/Gray instead of Black */

    --bg-body: #0f172a;       /* Very dark blue */

    --bg-panel: #1e293b;      /* Lighter blue-gray */

    --bg-sidebar: #020617;    /* Almost black */

    

    /* Accents - Softer Neons */

    --accent-cyan: #38bdf8;

    --accent-green: #4ade80;

    --accent-red: #f87171;

    --accent-gold: #fbbf24;

    

    /* Text */

    --text-main: #e2e8f0;

    --text-muted: #94a3b8;

    

    /* Spacing */

    --sidebar-width: 280px;

    --gap: 25px;

}



* { box-sizing: border-box; }



body {

    margin: 0;

    font-family: 'Inter', sans-serif; /* Clean, modern font */

    background-color: var(--bg-body);

    color: var(--text-main);

    display: flex;

    min-height: 100vh;

    font-size: 15px; /* Slightly larger text */

}



/* --- SIDEBAR --- */

.sidebar {

    width: var(--sidebar-width);

    background-color: var(--bg-sidebar);

    display: flex;

    flex-direction: column;

    padding: 30px;

    border-right: 1px solid #334155;

    position: fixed;

    height: 100vh;

    overflow-y: auto;

}



.sidebar h2 {

    color: var(--accent-cyan);

    font-family: 'JetBrains Mono', monospace;

    font-size: 1.4em;

    margin-bottom: 40px;

    letter-spacing: 1px;

    text-align: center;

}



.sidebar a {

    text-decoration: none;

    color: var(--text-muted);

    padding: 15px 20px;

    margin-bottom: 10px;

    border-radius: 12px; /* Rounded corners */

    transition: all 0.2s ease;

    display: flex;

    align-items: center;

    gap: 15px;

    font-weight: 500;

}



.sidebar a:hover, .sidebar a.active {

    background: rgba(56, 189, 248, 0.1); /* Subtle blue tint */

    color: var(--accent-cyan);

    transform: translateX(5px);

}



.sidebar a i { width: 20px; text-align: center; }



/* --- MAIN CONTENT AREA --- */

.main-content {

    margin-left: var(--sidebar-width);

    flex: 1;

    padding: 40px; /* Big spacing around the edges */

    max-width: 1400px; /* Prevents stretching too wide on huge screens */

}



/* --- PANELS (The "Glass" Look) --- */

.panel {

    background: var(--bg-panel);

    border-radius: 16px; /* Soft corners */

    padding: 30px;       /* Lots of breathing room inside */

    margin-bottom: var(--gap);

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    border: 1px solid #334155; /* Subtle border */

    position: relative;

}



/* Headings inside panels */

.panel h2, .panel h3, .panel h4 {

    margin-top: 0;

    color: white;

    font-weight: 600;

    margin-bottom: 20px;

}



/* --- FORMS & INPUTS --- */

/* ADDED input[type="email"] TO THIS LIST */

input[type="text"], input[type="number"], input[type="password"], input[type="email"] {

    background: #0f172a;

    border: 1px solid #475569;

    color: white;

    padding: 12px 15px;

    border-radius: 8px;

    width: 100%; /* This fixes the short width */

    font-family: 'JetBrains Mono', monospace;

    outline: none;

    transition: border-color 0.2s;

}



input:focus { border-color: var(--accent-cyan); }



button {

    background: var(--accent-cyan);

    color: #0f172a; /* Dark text on bright button for contrast */

    border: none;

    padding: 12px 20px;

    border-radius: 8px;

    font-weight: 700;

    cursor: pointer;

    transition: opacity 0.2s;

    text-transform: uppercase;

    letter-spacing: 0.5px;

}



button:hover { opacity: 0.9; transform: translateY(-1px); }



/* --- TABLES --- */

table {

    width: 100%;

    border-collapse: separate; /* Allows border radius on rows */

    border-spacing: 0 8px;     /* Space between rows */

}



th {

    text-align: left;

    color: var(--text-muted);

    font-weight: 600;

    padding: 10px 20px;

    text-transform: uppercase;

    font-size: 0.85em;

}



td {

    background: rgba(255, 255, 255, 0.03);

    padding: 15px 20px; /* More padding in cells */

    color: var(--text-main);

}



tr td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }

tr td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }



/* --- PROGRESS BARS --- */

.progress-container {

    background: #334155;

    border-radius: 10px;

    overflow: hidden;

    height: 8px;

}

.progress-bar {

    height: 100%;

    border-radius: 10px;

    transition: width 0.5s ease;

}



/* --- ALERTS --- */

.success { color: var(--accent-green); background: rgba(74, 222, 128, 0.1); padding: 15px; border-radius: 8px; border: 1px solid var(--accent-green); }

.error { color: var(--accent-red); background: rgba(248, 113, 113, 0.1); padding: 15px; border-radius: 8px; border: 1px solid var(--accent-red); }



/* --- UTILITIES --- */

.mono { font-family: 'JetBrains Mono', monospace; }

.text-cyan { color: var(--accent-cyan); }

.text-gold { color: var(--accent-gold); }

.text-red { color: var(--accent-red); }



/* --- SCROLLBAR --- */

::-webkit-scrollbar { width: 8px; }

::-webkit-scrollbar-track { background: var(--bg-body); }

::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }

::-webkit-scrollbar-thumb:hover { background: #64748b; }



/* --- CHATBOX STYLES --- */

/* --- FIXED CHAT LAYOUT --- */

#chat-container {

    height: 300px;

    overflow-y: auto;

    background: rgba(0, 0, 0, 0.3);

    border: 1px solid #334155;

    border-radius: 8px;

    display: flex;

    flex-direction: column;

}



.chat-msg {

    display: flex;              /* Flexbox Mode */

    justify-content: space-between; /* Pushes Text left, Buttons right */

    align-items: center;        /* Vertically centers everything */

    padding: 6px 10px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

    width: 100%;

}



.chat-left {

    display: flex;

    align-items: baseline;

    gap: 8px; /* Space between Name and Message */

    flex-grow: 1;

}



.chat-right {

    display: flex;

    gap: 5px; /* Space between buttons */

    margin-left: 10px;

}



.msg-text { 

    color: #e2e8f0; 

    word-break: break-word; /* Prevents long words breaking layout */

}



/* --- FORCE COLORS (High Priority) --- */

.role-admin  { color: #ff4d4d !important; font-weight: bold; text-shadow: 0 0 8px rgba(255, 0, 0, 0.6); }

.role-mod    { color: #00e676 !important; font-weight: bold; }

.role-vip    { color: #ffd700 !important; font-weight: bold; }

.role-user   { color: #00b0ff !important; font-weight: bold; }

.role-system { color: #888888 !important; font-style: italic; }



/* Button Styling */

.mod-btn {

    background: transparent;

    border: 1px solid #444;

    color: #888;

    cursor: pointer;

    border-radius: 4px;

    padding: 4px 6px;

    font-size: 11px;

    transition: all 0.2s;

}

.mod-btn:hover { border-color: white; color: white; }



/* --- LOGIN PAGE SPECIFIC STYLES --- */

body.login-page {

    display: flex;

    justify-content: center;

    align-items: center;

    height: 100vh;

    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);

}



.login-container {

    width: 400px;

    background: rgba(30, 41, 59, 0.7); /* Glass effect */

    padding: 40px;

    border-radius: 16px;

    border: 1px solid #334155;

    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);

    backdrop-filter: blur(10px);

    text-align: center;

    position: relative;

    overflow: hidden;

}



/* Cool neon glow line at the top */

.login-container::before {

    content: '';

    position: absolute;

    top: 0; left: 0; right: 0;

    height: 3px;

    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));

    box-shadow: 0 0 15px var(--accent-cyan);

}



.login-logo {

    font-family: 'JetBrains Mono', monospace;

    font-size: 2em;

    color: var(--accent-cyan);

    margin-bottom: 30px;

    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);

}



.login-btn {

    width: 100%;

    margin-top: 20px;

    padding: 15px;

    font-size: 1.1em;

    background: rgba(56, 189, 248, 0.1);

    border: 1px solid var(--accent-cyan);

    color: var(--accent-cyan);

    transition: all 0.3s ease;

}



.login-btn:hover {

    background: var(--accent-cyan);

    color: #000;

    box-shadow: 0 0 20px var(--accent-cyan);

}



/* =========================================

   MOBILE RESPONSIVENESS (FORCE FIX)

   ========================================= */

@media screen and (max-width: 768px) {



    /* 1. FORCE VERTICAL LAYOUT (Stack elements) */

    body {

        flex-direction: column !important;

        display: flex !important;

        min-height: 100vh;

    }



    /* 2. SIDEBAR BECOMES TOP SCROLL MENU */

    .sidebar {

        width: 100% !important;   /* Full width */

        height: auto !important;  /* Auto height based on content */

        position: static !important; /* Unstick from left side */

        

        display: flex !important;

        flex-direction: row !important; /* Items go sideways */

        align-items: center;

        overflow-x: auto !important; /* Scrollable horizontally */

        

        padding: 10px !important;

        border-right: none !important;

        border-bottom: 2px solid var(--accent-cyan);

        background: var(--bg-sidebar);

        z-index: 999;

    }



    /* HIDE THE BIG LOGO TEXT ON MOBILE */

    .sidebar h2 { display: none !important; }



    /* MAKE LINKS LOOK LIKE BUTTONS */

    .sidebar a {

        flex: 0 0 auto; /* Don't shrink */

        padding: 8px 12px !important;

        margin-right: 10px !important;

        margin-bottom: 0 !important;

        background: rgba(255,255,255,0.05);

        border: 1px solid #444;

        border-radius: 5px;

        font-size: 0.8em;

    }



    /* 3. MAIN CONTENT FIX */

    .main-content {

        margin-left: 0 !important;

        padding: 10px !important;

        width: 100% !important;

        max-width: 100vw !important; /* Prevent horizontal scroll on body */

        overflow-x: hidden;

    }



    /* 4. FIX TABLES (Allow internal scrolling) */

    .panel {

        overflow-x: auto !important; /* Scroll if table is too big */

        padding: 15px !important;

        margin-bottom: 15px !important;

    }



    table {

        min-width: 500px; /* Force table to be wide enough to read */

    }



    /* 5. LOGIN/REGISTER BOX */

    .login-container {

        width: 95% !important;

        padding: 20px !important;

    }

}

/* Update this in your style.css or a <style> block */

.stats-grid {

    display: grid;

    /* This allows the grid to create as many 300px columns as possible to fill the width */

    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 

    gap: 20px;

    width: 100%;

}



/* --- ULTIMATE FOOTER ALIGNMENT --- */

.footer-wrapper {

    margin-left: var(--sidebar-width); /* Stays out of the sidebar's way */

    width: calc(100% - var(--sidebar-width));

    display: flex;

    justify-content: center; /* This is the "magic" for centering */

    padding: 40px 0;

}



footer {

    width: 100%;

    max-width: 1400px; /* Matches your main content width */

    text-align: center;

    color: var(--text-muted);

    border-top: 1px solid #334155;

    font-family: 'JetBrains Mono', monospace;

    font-size: 0.85em;

    padding-top: 20px;

}



/* Mobile Fix */

@media screen and (max-width: 768px) {

    .footer-wrapper {

        margin-left: 0 !important;

        width: 100% !important;

    }

    footer {

        max-width: 90%;

        padding: 20px;

    }

}

.online-tag {

    display: inline-block;

    padding: 2px 8px;

    background: rgba(56, 189, 248, 0.1);

    border: 1px solid rgba(56, 189, 248, 0.3);

    border-radius: 4px;

    font-size: 0.85em;

    margin: 2px;

}
/* Chat Names & Glows */
.chat-name { font-weight: bold; }
.chat-name.system { color: #10b981; text-shadow: 0 0 10px rgba(16, 185, 129, 0.7); }
.chat-name.admin { color: #ef4444; text-shadow: 0 0 10px rgba(239, 68, 68, 0.7); }
.chat-name.vip { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.7); }
.chat-name.mod { color: #a855f7; text-shadow: 0 0 10px rgba(168, 85, 247, 0.7); }
.chat-name.user { color: #3b82f6; } /* Standard blue, no glow */

/* Role Badges */
.chat-badge {
    font-size: 0.65em;
    padding: 2px 5px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 5px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.chat-badge.admin-badge { border: 1px solid #ef4444; color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.chat-badge.vip-badge { border: 1px solid #fbbf24; color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.chat-badge.mod-badge { border: 1px solid #a855f7; color: #a855f7; background: rgba(168, 85, 247, 0.1); }

/* System Messages Formatting */
.system-msg {
    color: #10b981;
    font-style: italic;
    font-weight: 500;
}

/* Make sure mentions glow a bit too */
.mention {
    color: #22d3ee;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}