/* ===== ADMIN PANEL STYLES ===== */

.admin-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
}

.admin-sidebar {
    width: 250px;
    background: rgba(5, 8, 18, 0.95);
    border-right: 2px solid var(--primary-blue);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar h3 {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    color: var(--neon-blue);
    font-size: 1.2rem;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin: 0;
}

.admin-sidebar a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 600;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(30, 144, 255, 0.15);
    color: var(--neon-blue);
    border-left-color: var(--neon-blue);
}

.admin-content {
    margin-left: 250px;
    flex: 1;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-header h1 {
    font-size: 2rem;
    text-shadow: 0 0 15px rgba(30, 144, 255, 0.5);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 2px solid #ff4444;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 68, 68, 0.4);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(30, 144, 255, 0.1);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: rgba(30, 144, 255, 0.2);
    box-shadow: 0 0 15px rgba(30, 144, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== BUTTON STYLES ===== */
.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-save {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: 2px solid var(--neon-blue);
    padding: 0.8rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.btn-delete {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border: 2px solid #ff4444;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-delete:hover {
    background: rgba(255, 68, 68, 0.4);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.btn-add {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: #000;
    border: 2px solid #00ff00;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-add:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
}

/* ===== PANEL SECTIONS ===== */
.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.panel-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.panel-card h2 {
    margin-top: 0;
    color: var(--neon-blue);
    margin-bottom: 1.5rem;
}

/* ===== STATUS DISPLAY ===== */
.status-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-box {
    background: rgba(30, 144, 255, 0.15);
    border: 2px solid var(--neon-blue);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.status-box h3 {
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.status-box .value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* ===== RULES TABLE ===== */
.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.rules-table thead {
    background: rgba(30, 144, 255, 0.2);
    border-bottom: 2px solid var(--neon-blue);
}

.rules-table th {
    padding: 1rem;
    text-align: left;
    color: var(--neon-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.rules-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.rules-table tr:hover {
    background: rgba(30, 144, 255, 0.1);
}

.rules-table .actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-remove {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-edit {
    background: rgba(0, 212, 255, 0.3);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

.btn-edit:hover {
    background: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.btn-remove {
    background: rgba(255, 68, 68, 0.3);
    color: #ff4444;
    border: 1px solid #ff4444;
}

.btn-remove:hover {
    background: rgba(255, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: none;
}

.alert.show {
    display: block;
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background: rgba(0, 255, 0, 0.15);
    border: 2px solid #00ff00;
    color: #00ff00;
}

.alert-error {
    background: rgba(255, 68, 68, 0.15);
    border: 2px solid #ff4444;
    color: #ff4444;
}

.alert-info {
    background: rgba(30, 144, 255, 0.15);
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
}

/* ===== LOGIN PAGE ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    max-width: 400px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.login-box .form-group {
    margin-bottom: 1.5rem;
}

.login-box .btn-save {
    width: 100%;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close:hover {
    color: var(--neon-blue);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 2px solid var(--primary-blue);
        padding: 1rem 0;
    }

    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-sidebar ul {
        display: flex;
        flex-wrap: wrap;
    }

    .admin-sidebar li {
        flex: 1;
        min-width: 150px;
    }

    .admin-sidebar a {
        padding: 0.8rem;
        text-align: center;
    }

    .status-display {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-save, .btn-delete, .btn-add {
        width: 100%;
    }

    .rules-table {
        font-size: 0.9rem;
    }

    .rules-table th,
    .rules-table td {
        padding: 0.7rem;
    }
}

@media (max-width: 480px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-header h1 {
        font-size: 1.5rem;
    }

    .status-display {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 2rem;
    }

    .modal-content {
        width: 95%;
    }
}
