/* Anti-Raid - Modern Dark Design */
.antiraid-page {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

/* Hero Header */
.ar-hero {
    position: relative;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.ar-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.ar-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.ar-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ar-shield-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #5865f2 0%, #7c3aed 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.3);
}

.ar-shield-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.ar-hero-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.ar-hero-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.ar-server-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 20px;
    color: #fff;
    font-size: 14px;
    min-width: 240px;
    cursor: pointer;
    transition: all 0.2s;
}

.ar-server-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.ar-server-select:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

/* Main Layout */
.ar-main {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    flex: 1;
}

/* Sidebar */
.ar-sidebar {
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.ar-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.ar-nav-item.active {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(124, 58, 237, 0.15) 100%);
    color: #fff;
    border: 1px solid rgba(88, 101, 242, 0.3);
}

/* Stats Cards */
.ar-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ar-stats-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.ar-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.ar-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.ar-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #5865f2;
}

/* Content Area */
.ar-content {
    padding: 32px;
    overflow-y: auto;
}

.ar-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.ar-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ar-section-header {
    margin-bottom: 32px;
}

.ar-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.ar-section-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Cards */
.ar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.ar-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ar-card-title svg {
    width: 20px;
    height: 20px;
    color: #5865f2;
}

/* Master Toggle */
.ar-master-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, rgba(124, 58, 237, 0.08) 100%);
    border: 1px solid rgba(88, 101, 242, 0.2);
    border-radius: 16px;
    margin-bottom: 24px;
}

.ar-toggle-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
}

.ar-toggle-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Toggle Switch */
.ar-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.ar-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ar-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    transition: 0.3s;
}

.ar-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.ar-switch input:checked + .ar-slider {
    background: linear-gradient(135deg, #5865f2 0%, #7c3aed 100%);
}

.ar-switch input:checked + .ar-slider::before {
    transform: translateX(24px);
}

/* Options Grid */
.ar-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ar-option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ar-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fff;
}

.ar-option-header svg {
    width: 18px;
    height: 18px;
    color: #5865f2;
}

.ar-option-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    line-height: 1.5;
}

/* Thresholds */
.ar-thresholds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.ar-threshold {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ar-threshold label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.ar-threshold-input {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ar-threshold-input button {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.ar-threshold-input button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ar-threshold-input input {
    flex: 1;
    height: 40px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    -moz-appearance: textfield;
}

.ar-threshold-input input::-webkit-outer-spin-button,
.ar-threshold-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Selects */
.ar-select-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.ar-select-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ar-select-item label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.ar-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.ar-select:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.ar-select:focus {
    outline: none;
    border-color: #5865f2;
}

/* Actions */
.ar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ar-btn svg {
    width: 18px;
    height: 18px;
}

.ar-btn-primary {
    background: linear-gradient(135deg, #5865f2 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
}

.ar-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.4);
}

.ar-config-status {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-left: auto;
}

/* List Items */
.ar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ar-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.2s;
}

.ar-list-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.ar-list-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ar-list-item-name {
    font-weight: 600;
    color: #fff;
}

.ar-list-item-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

.ar-list-item-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
}

.ar-list-item-reason {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.ar-btn-remove {
    padding: 8px 16px;
    background: rgba(240, 71, 71, 0.1);
    border: 1px solid rgba(240, 71, 71, 0.2);
    border-radius: 8px;
    color: #f04747;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ar-btn-remove:hover {
    background: rgba(240, 71, 71, 0.2);
}

.ar-empty {
    padding: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

/* Form Groups */
.ar-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.ar-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ar-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.ar-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.ar-input:focus {
    outline: none;
    border-color: #5865f2;
}

.ar-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ar-btn-add {
    padding: 12px 24px;
    background: rgba(67, 181, 129, 0.1);
    border: 1px solid rgba(67, 181, 129, 0.2);
    border-radius: 10px;
    color: #43b581;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
}

.ar-btn-add:hover {
    background: rgba(67, 181, 129, 0.2);
}

/* Bot Cards */
.ar-bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.ar-bot-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.ar-bot-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(88, 101, 242, 0.3);
    transform: translateY(-2px);
}

.ar-bot-card.whitelisted {
    border-color: rgba(67, 181, 129, 0.3);
    background: rgba(67, 181, 129, 0.05);
}

.ar-bot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.ar-bot-info {
    flex: 1;
    min-width: 0;
}

.ar-bot-name {
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-bot-id {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

/* Role Items */
.ar-role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.ar-role-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ar-role-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.ar-role-name {
    font-weight: 500;
    color: #fff;
}

.ar-role-perms {
    display: flex;
    gap: 8px;
}

.ar-perm-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.ar-perm-admin {
    background: rgba(240, 71, 71, 0.1);
    color: #f04747;
    border: 1px solid rgba(240, 71, 71, 0.2);
}

.ar-perm-ban {
    background: rgba(250, 166, 26, 0.1);
    color: #faa61a;
    border: 1px solid rgba(250, 166, 26, 0.2);
}

.ar-perm-kick {
    background: rgba(88, 101, 242, 0.1);
    color: #5865f2;
    border: 1px solid rgba(88, 101, 242, 0.2);
}

/* Incidents */
.ar-incident {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
}

.ar-incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ar-incident-type {
    font-weight: 600;
    color: #f04747;
}

.ar-incident-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.ar-incident-details {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.ar-incident-action {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.ar-action-deranked { background: rgba(240, 71, 71, 0.1); color: #f04747; }
.ar-action-kicked { background: rgba(250, 166, 26, 0.1); color: #faa61a; }
.ar-action-banned { background: rgba(240, 71, 71, 0.15); color: #f04747; }
.ar-action-notified { background: rgba(88, 101, 242, 0.1); color: #5865f2; }
.ar-action-bot_kicked { background: rgba(250, 166, 26, 0.1); color: #faa61a; }

/* Context Menu */
.ar-context-menu {
    position: fixed;
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
}

.ar-context-menu.visible {
    display: block;
}

.ar-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.15s;
}

.ar-context-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ar-context-item svg {
    width: 16px;
    height: 16px;
}

.ar-context-item.danger {
    color: #f04747;
}

.ar-context-item.danger:hover {
    background: rgba(240, 71, 71, 0.1);
}

/* Toast */
.ar-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 10000;
}

.ar-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.ar-toast.success {
    background: linear-gradient(135deg, #43b581 0%, #3ca374 100%);
    color: #fff;
}

.ar-toast.error {
    background: linear-gradient(135deg, #f04747 0%, #d63939 100%);
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .ar-main {
        grid-template-columns: 1fr;
    }

    .ar-sidebar {
        display: none;
    }

    .ar-hero-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .ar-hero-left {
        flex-direction: column;
    }
}
