/* Admin Panel Styles */
body {
    font-family: 'Courier New', Courier, monospace;
    background: url('background.png') no-repeat center center fixed, radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    background-size: cover;
    background-attachment: fixed;
    color: #ddd;
    margin: 0;
    padding: 0;
    height: 100vh;
}

.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid #333;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

input, select {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    background: #222;
    border: 1px solid #333;
    color: white;
}

button {
    padding: 10px 20px;
    background: #444;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #555;
}

#logout-btn {
    background-color: #d9534f;
}

#logout-btn:hover {
    background-color: #c9302c;
}

#create-user-btn {
    background-color: #5cb85c;
}

#create-user-btn:hover {
    background-color: #449d44;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
    padding: 0;
}

.dashboard-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.95);
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: -250px; /* Hide by default */
    transition: left 0.3s ease;
    z-index: 1000;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    border-bottom: 1px solid #333;
    text-align: center;
    color: #00BFFF;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    padding: 15px 20px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-menu li:hover, .sidebar-menu li.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

.content {
    padding: 20px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(3px);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    background: rgba(34, 34, 34, 0.8);
    color: #00BFFF;
    cursor: pointer;
    user-select: none;
}

.btn-edit {
    background: #f0ad4e;
    padding: 5px 10px;
    font-size: 0.8em;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #ec971f;
}

.btn-ban {
    background: #d9534f;
    padding: 5px 10px;
    font-size: 0.8em;
}

.btn-unban {
    background: #5cb85c;
    padding: 5px 10px;
    font-size: 0.8em;
}

.btn-toggle-online {
    background: #00BFFF;
    padding: 5px 10px;
    font-size: 0.8em;
    margin-right: 5px;
}

.btn-toggle-online:hover {
    background: #009ACD;
}

.btn-delete {
    background: #333;
    border: 1px solid #d9534f;
    color: #d9534f;
    margin-left: 5px;
    padding: 5px 10px;
    font-size: 0.8em;
}

.error {
    color: #d9534f;
}

.dashboard-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.dashboard-tile {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.dashboard-tile:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.8);
    border-color: #00BFFF;
}

.dashboard-tile h3 {
    color: #00BFFF;
    margin-bottom: 10px;
}

.dashboard-tile p {
    color: #aaa;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.status-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.1);
}

.chart-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.1);
    height: 250px;
}

.status-item {
    font-size: 1.2em;
    margin: 15px 0;
    color: #ddd;
}

.status-value {
    font-size: 2em;
    color: #00FF00;
    margin: 20px 0;
}

.uptime-value {
    color: #aaa;
    font-size: 0.9em;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #222;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #444;
    width: 400px;
    border-radius: 8px;
    color: #ddd;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: white;
    text-decoration: none;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
}

.checkbox-group input {
    width: auto;
    margin: 0 5px 0 0;
}

/* Chat Styles */
.chat-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.chat-window {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 600px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    border-radius: 4px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.chat-header {
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid #333;
    font-weight: bold;
    cursor: pointer;
    color: #00BFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    height: 150px;
    overflow-y: auto;
    padding: 10px;
    color: #ddd;
    font-size: 0.9em;
}

.chat-message {
    margin-bottom: 5px;
    word-wrap: break-word;
}

.chat-user {
    font-weight: bold;
    color: #aaa;
}

.admin-message .chat-user {
    color: #ff4444;
}

.chat-input-form {
    display: flex;
    border-top: 1px solid #333;
    position: relative;
}

.chat-input-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    color: #fff;
    margin: 0;
}

.chat-input-form button {
    background: #333;
    border: none;
    color: #fff;
    padding: 0 15px;
    cursor: pointer;
    margin: 0;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    color: #aaa;
}

.tab-btn.active, .tab-btn:hover {
    background-color: #00BFFF;
    color: #fff;
    border-color: #00BFFF;
}

.emoji-btn {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid #333 !important;
    border-bottom: none !important;
    border-radius: 4px 4px 0 0;
    font-size: 1.2em;
    cursor: pointer;
    padding: 2px 15px !important;
    height: 30px;
}

.emoji-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    left: auto;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    border-radius: 4px;
    padding: 5px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    width: 100%;
    box-sizing: border-box;
}

.emoji-picker span {
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    text-align: center;
}

.emoji-picker span:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.online-users-icon {
    font-size: 1.2em;
}

.chat-user-list {
    height: 150px;
    overflow-y: auto;
    padding: 10px;
    color: #ddd;
    font-size: 0.9em;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.3);
}

.chat-user-list-item {
    padding: 5px;
    cursor: pointer;
    border-bottom: 1px solid #444;
}

.chat-user-list-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.chat-timestamp {
    color: #888;
    font-size: 0.85em;
    margin-right: 5px;
}