body.login-page {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    animation: fadeIn 1s ease-in;
}

.login-container {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
    text-align: center;
    width: 300px;
    animation: floatUp 1s ease-in-out;
}

input, select {
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: white;
}

input, select, textarea {
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #222;
    color: white;
    font-size: 14px;
    resize: vertical;
}


button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #00d4ff;
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #00aaff;
}

.error {
    background: rgba(255, 0, 0, 0.4);
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes floatUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

body.dashboard-page {
    margin: 0;
    display: flex;
    background-color: #111;
    color: white;
    font-family: 'Segoe UI', sans-serif;
}

.sidebar {
    width: 220px;
    background-color: #1c1c1c;
    height: 100vh;
    padding: 20px;
    box-shadow: 4px 0 20px rgba(0, 255, 255, 0.1);
}

.sidebar h2 {
    margin-top: 0;
    color: #00d4ff;
    font-size: 24px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.sidebar li, .sidebar a {
    padding: 12px;
    margin-bottom: 10px;
    background-color: #2b2b2b;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    color: white;
    transition: background 0.3s;
    display: block;
}

.sidebar li:hover, .sidebar a:hover {
    background-color: #00d4ff;
    color: black;
}

.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.demo-warning {
    background-color: rgba(255, 0, 0, 0.2);
    border-left: 4px solid red;
    padding: 10px;
    margin-top: 20px;
    border-radius: 8px;
    font-weight: bold;
    color: #ff6666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,255,255,0.1);
}

.users-table th, .users-table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.users-table th {
    background-color: #222;
    color: #00d4ff;
}

.users-table tr:hover {
    background-color: #2a2a2a;
}

.users-table button {
    background: #00d4ff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
}

.users-table button:hover {
    background: #00aaff;
}

.alert {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: #1f1f1f;
    color: #00ff88;
    border-radius: 10px;
    padding: 12px 20px;
    box-shadow: 0 0 20px rgba(0, 255, 128, 0.4);
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
    z-index: 999;
}

.alert.show {
    opacity: 1;
    top: 50px;
    pointer-events: auto;
}

.alert.hidden {
    opacity: 0;
}

#broadcast-section {
    margin-top: 20px;
    max-width: 600px;
}

#broadcastText {
    width: 100%;
    background: #222;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin: 12px 0;
    resize: vertical;
}

#broadcastSend {
    background: #00d4ff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#broadcastSend:hover {
    background: #00aaff;
}

#broadcastStatus {
    margin-top: 15px;
    font-size: 14px;
    color: #00ff88;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-card {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,255,255,0.1);
    min-width: 240px;
    flex: 1;
}

.stat-card h3 {
    margin-top: 0;
    color: #00d4ff;
}

#total-users {
    font-size: 36px;
    font-weight: bold;
    color: white;
}

.chart-card canvas {
    margin-top: 10px;
}

.bot-link-button {
    display: inline-block;
    background-color: #00d4ff;
    color: #000;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.bot-link-button:hover {
    background-color: #00aaff;
}

#themeToggle {
    position: absolute;
    top: 20px;
    right: 60px;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s;
}

#themeToggle:hover {
    transform: rotate(15deg);
}

body.light-mode {
    background-color: #f4f4f4;
    color: #111;
}

body.light-mode .sidebar {
    background-color: #ddd;
}

body.light-mode .section {
    background-color: #fff;
}

body.light-mode .stat-card,
body.light-mode .users-table,
body.light-mode .demo-warning {
    background: #f9f9f9;
    color: #111;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

body.light-mode button {
    background-color: #111;
    color: white;
}

body.light-mode #themeToggle {
    color: #000;
}

body.light-mode #total-users {
    color: #111;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        padding: 10px;
        position: static;
    }

    .sidebar img,
    .sidebar h2,
    .sidebar hr,
    .sidebar .logout-btn {
        display: none;
    }

    .section {
        padding: 15px;
    }

    button, .bot-link-button {
        width: 100%;
        box-sizing: border-box;
        margin-top: 10px;
    }

    table.users-table {
        font-size: 14px;
    }

    #themeToggle {
        top: 10px;
        right: 10px;
        font-size: 20px;
    }
}

#hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 26px;
    background: #00d4ff;
    color: #000;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    #hamburger {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -240px;
        width: 220px;
        height: 100%;
        background-color: #111;
        transition: left 0.3s ease;
        z-index: 1000;
        padding-top: 60px;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 60px;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 900;
    }

    .overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .login-container {
        width: 90%;
        padding: 20px;
    }

    .login-form {
        width: 100%;
    }

    .login-form input[type="text"],
    .login-form input[type="password"] {
        width: 100%;
        font-size: 16px;
        padding: 10px;
    }

    .login-form button {
        width: 100%;
        font-size: 16px;
        padding: 10px;
        margin-top: 10px;
    }

    .role-selection {
        flex-direction: column;
        gap: 10px;
    }

    .role-selection label {
        font-size: 15px;
    }

    .error-message {
        font-size: 14px;
    }
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: none;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-inline input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #00d4ff;
    cursor: pointer;
}

.checkbox-inline label {
    font-size: 15px;
    cursor: pointer;
}
