/* Complete Admin Panel CSS - Single File Solution */

/* Theme Variables */
:root {
    /* Primary Colors */
    --primary-color: #ffffff;
    --secondary-color: #e5e5e5;
    --accent-color: #ffffff;
    
    /* Background Colors */
    --dark-bg: #0a0a0a;
    --light-bg: #1a1a1a;
    --bg-color: #141414;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.08);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    
    /* Border Colors */
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Status Colors */
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Shadow Colors */
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --bg-gradient: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}

[data-theme="light"] {
    /* Primary Colors */
    --primary-color: #000000;
    --secondary-color: #2a2a2a;
    --accent-color: #000000;
    
    /* Background Colors */
    --dark-bg: #f5f5f5;
    --light-bg: #ffffff;
    --bg-color: #f0f0f0;
    --card-bg: rgba(0, 0, 0, 0.03);
    --glass-bg: rgba(255, 255, 255, 0.7);
    
    /* Text Colors */
    --text-primary: #000000;
    --text-secondary: #666666;
    
    /* Border Colors */
    --border-color: rgba(0, 0, 0, 0.1);
    
    /* Status Colors */
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Shadow Colors */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.5);
    
    /* Gradients */
    --bg-gradient: linear-gradient(135deg, #f5f5f5 0%, #ffffff 50%, #f5f5f5 100%);
}

/* Animation Keyframes */
@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Common Utility Classes */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:active {
    background: var(--text-secondary);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--dark-bg);
}

/* Base Styles */
.admin-body {
    background: var(--bg-color);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--light-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.sidebar-logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

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

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    font-size: 1.2rem;
    font-weight: bold;
}

.user-info {
    display: flex;
    flex-direction: column;
    position: relative;
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.settings-icon {
    position: absolute;
    right: 0;
    top: 0;
    color: white;
    font-size: 1.1rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.settings-icon:hover {
    color: white;
    opacity: 0.8;
}

.settings-icon.active {
    color: white;
    opacity: 1;
}

.sidebar-logout {
    width: 100%;
    padding: 0.75rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ========================================
   USER MANAGEMENT STYLES
   ======================================== */

.user-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

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

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    background: rgba(26, 26, 46, 0.6);
    border: 2px solid rgba(42, 42, 62, 0.8);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(26, 26, 46, 0.8);
}

.permissions-section {
    margin-top: 24px;
    padding: 24px;
    background: rgba(26, 26, 46, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(42, 42, 62, 0.6);
}

.permissions-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.permission-category {
    background: rgba(42, 42, 62, 0.4);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.permission-category h5 {
    color: #ffd700;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.permission-item:hover {
    color: var(--text-primary);
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ffd700;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell i {
    color: #ffd700;
    font-size: 1.25rem;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.role-moderator {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.role-viewer {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.role-custom {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--success-color);
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 400px;
    width: auto;
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: var(--error-color);
}

.toast.info {
    background: var(--primary-color);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    overflow-y: auto;
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: rgba(26, 26, 46, 0.98);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin: auto;
    position: relative;
    box-sizing: border-box;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(42, 42, 62, 0.6);
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: #ffd700;
}

.modal-body {
    padding: 24px;
}

/* Admin Main Content */
.admin-main {
    margin-left: 260px;
    padding: 2rem;
    flex: 1;
    overflow-x: hidden;
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dashboard-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--dark-bg);
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--dark-bg);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--dark-bg);
    color: var(--primary-color);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--dark-bg);
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
}

.event-form input,
.event-form select,
.event-form textarea {
width: 100%;
max-width: 100%;
padding: 0.75rem 1rem;
background: var(--dark-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
color: var(--text-primary);
font-size: 0.9rem;
transition: border-color 0.2s ease;
box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
outline: none;
border-color: var(--primary-color);
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: var(--primary-color);
}

.empty-state p {
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

/* BeamMP Specific Styles */
.beammp-container {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.beammp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    gap: 20px;
    flex-wrap: wrap;
}

.server-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 250px;
}

.server-selector label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.server-select {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 200px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.connection-status.connected {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 2px solid #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
    font-weight: 600;
    animation: pulse-green 2s infinite;
}

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 2px solid #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    font-weight: 600;
    animation: pulse-red 2s infinite;
}

/* BeamMP Tabs */
.beammp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--dark-bg);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.beammp-tab {
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
}

.beammp-tab:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--text-primary);
}

.beammp-tab.active {
    background: var(--primary-color);
    color: var(--dark-bg);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.beammp-tab i {
    margin-right: 8px;
    font-size: 1rem;
}

/* BeamMP Content Sections */
.beammp-content {
    display: none;
    padding: 1rem 0;
}

.beammp-content.active {
    display: block;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.section-header .btn {
    white-space: nowrap;
}

/* Players and Bans Tables */
.players-table-wrapper,
.bans-table-wrapper {
    background: #1e1e2e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    margin-bottom: 2rem;
}

.players-table,
.bans-table {
    width: 100%;
    border-collapse: collapse;
}

.players-table th,
.bans-table th {
    background: #2a2a3e;
    color: #ffffff;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #333;
}

.players-table td,
.bans-table td {
    padding: 16px;
    border-bottom: 1px solid #333;
    color: #a1a1aa;
    background: transparent;
}

.players-table tbody tr:hover,
.bans-table tbody tr:hover {
    background: #2a2a3e;
}

/* Player and Ban Specific Styles */
.player-id {
    font-family: 'Monaco', 'Consolas', monospace;
    color: var(--primary-color);
    font-weight: 600;
}

.player-name,
.ban-name {
    color: var(--text-primary);
    font-weight: 500;
}

.player-name i,
.ban-name i {
    margin-right: 8px;
}

.player-name i {
    color: var(--primary-color);
}

.ban-name i {
    color: #ef4444;
}

.player-actions,
.ban-actions {
    display: flex;
    gap: 8px;
}

/* Action Buttons */
.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-kick {
    background: #f59e0b;
    color: white;
}

.btn-kick:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.btn-ban {
    background: #ef4444;
    color: white;
}

.btn-ban:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-unban {
    background: #22c55e;
    color: white;
}

.btn-unban:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.btn-message {
    background: #3b82f6;
    color: white;
}

.btn-message:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Ban Specific Styles */
.ban-reason {
    color: var(--text-secondary);
    font-style: italic;
}

.ban-server,
.ban-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Broadcast Section */
.broadcast-card {
    background: rgba(42, 42, 62, 0.4);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 2rem;
}

.broadcast-card h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.broadcast-card h3 i {
    color: #ffd700;
}

.broadcast-form .form-group {
    margin-bottom: 20px;
}

.broadcast-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.broadcast-form .form-textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    box-sizing: border-box;
}

.broadcast-form .form-textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.broadcast-form .form-select {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.broadcast-form .form-select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.broadcast-form .btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.broadcast-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.form-actions {
    margin-top: 20px;
}

/* Admin Section Content */
.admin-section-content {
    display: none;
    padding: 1rem 0;
}

.admin-section-content.active {
    display: block;
}

/* Gallery Specific Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-item-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.gallery-item-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.gallery-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.gallery-item-actions {
    display: flex;
    gap: 0.5rem;
}

.gallery-item-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.btn-approve {
    background: var(--success-color);
    color: white;
}

.btn-approve:hover {
    background: #16a34a;
}

.btn-reject {
    background: var(--error-color);
    color: white;
}

.btn-reject:hover {
    background: #dc2626;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Upload Section */
.upload-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--light-bg) 100%);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.upload-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: block;
    padding: 1rem;
    background: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input-label:hover {
    background: var(--dark-bg);
    border-color: var(--primary-color);
}

/* Events Specific Styles */
.events-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
}

.event-form-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    min-width: 0;
    overflow: hidden;
}

.event-form-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-list-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.event-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.event-list-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.event-list-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.event-list-detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.event-list-detail i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.event-list-actions {
    display: flex;
    gap: 0.5rem;
}

.event-list-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Event Type Badges */
.event-type-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.event-type-badge.community {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.event-type-badge.competition {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.event-type-badge.training {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.event-type-badge.showcase {
    background: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.event-source-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.event-source-badge.discord {
    background: #5865F2;
    color: white;
}

.event-source-badge.local {
    background: var(--primary-color);
    color: white;
}

.event-list-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Leaderboard Specific Styles */
.leaderboard-admin-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
}

.leaderboard-form-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
}

.leaderboard-form-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-table-wrapper {
    overflow-x: auto;
}

.admin-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-leaderboard-table thead {
    background: var(--bg-color);
}

.admin-leaderboard-table th {
    padding: 0.75rem;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.admin-leaderboard-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.admin-leaderboard-table tbody tr:hover {
    background: var(--dark-bg);
}

.admin-leaderboard-table td {
    padding: 0.75rem;
    color: var(--text-primary);
}

.admin-leaderboard-table .rank-cell {
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    width: 60px;
}

.admin-leaderboard-table .player-cell {
    font-weight: 500;
}

.admin-leaderboard-table .score-cell {
    font-weight: 600;
    color: var(--success-color);
    text-align: center;
    font-family: 'Monaco', 'Consolas', monospace;
}

.admin-leaderboard-table .date-cell {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.admin-leaderboard-table .actions-cell {
    text-align: center;
    width: 200px;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.admin-leaderboard-table .empty-row td {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Leaderboard Settings */
.leaderboard-settings {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.leaderboard-settings h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.settings-group {
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
}

/* Duplicate toast definition removed - using single definition above */

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-content {
    flex: 1;
}

.activity-text {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
}

.activity-time {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-tab {
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-tab:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.gallery-tab.active {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* Gallery Content */
.gallery-content {
    display: none;
}

.gallery-content.active {
    display: block;
}

.tab-count {
    background: var(--error-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Events Tabs */
.events-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.events-tab {
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.events-tab:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.events-tab.active {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* Events Filters */
.events-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-select {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Status Badges */
.status-upcoming {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-ongoing {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.status-past {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

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

.login-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-input {
    padding-left: 3rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-text {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Duplicate toast definition removed - using single definition above */

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .events-layout,
    .leaderboard-admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Sidebar Mobile */
    .admin-sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
    }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 101;
        background: var(--primary-color);
        color: var(--dark-bg);
        border: none;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        cursor: pointer;
        font-size: 1.25rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    /* Quick Actions */
    .quick-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .quick-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* BeamMP Header */
    .beammp-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .server-selector {
        width: 100%;
    }
    
    .server-select {
        width: 100%;
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    /* BeamMP Tabs */
    .beammp-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .beammp-tab {
        flex: 1;
        min-width: 100px;
        text-align: center;
        padding: 0.875rem 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Tables - Make Scrollable */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
        border-radius: 8px;
    }
    
    table {
        min-width: 600px;
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Horizontal scroll indicator */
    .table-container::after {
        content: '← Scroll →';
        position: absolute;
        bottom: 0;
        right: 1rem;
        background: rgba(255, 215, 0, 0.9);
        color: var(--dark-bg);
        padding: 0.25rem 0.75rem;
        border-radius: 4px 4px 0 0;
        font-size: 0.75rem;
        font-weight: 600;
        pointer-events: none;
        opacity: 0.8;
    }
    
    .table-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
    
    .table-container::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }
    
    /* Player/Ban Actions - Hide on mobile */
    .players-table th:last-child,
    .players-table td:last-child,
    .bans-table th:last-child,
    .bans-table td:last-child {
        display: none;
    }
    
    .player-actions,
    .ban-actions {
        display: none;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.875rem;
        min-height: 44px;
    }
    
    /* Modals */
    .modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    .modal.show {
        padding: 0.75rem !important;
        padding-right: 1.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
        padding-bottom: 1.5rem;
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
    
    /* Player Detail Modal */
    .player-detail-modal {
        max-width: 95%;
    }
    
    .player-detail-info {
        flex-direction: column;
        text-align: center;
    }
    
    .player-detail-avatar {
        margin: 0 auto 1rem;
    }
    
    .player-detail-stats {
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 1rem;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .stat-label {
        min-width: auto;
        flex: 1;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .player-detail-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .player-detail-actions .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery-item-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gallery-item-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Events */
    .event-card {
        padding: 1.25rem;
    }
    
    .event-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-actions .btn {
        width: 100%;
    }
    
    /* Users Table */
    .users-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Whitelist */
    .whitelist-controls {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .whitelist-controls .btn {
        flex: 1;
        justify-content: center;
    }
    
    .whitelist-status {
        padding: 1.25rem;
        flex-direction: column;
        text-align: center;
    }
    
    /* Toast Notifications */
    .toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        max-width: calc(100% - 20px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    /* Login */
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        max-width: 100%;
        padding: 1.5rem;
    }
    
    /* Broadcast Form */
    .broadcast-form {
        padding: 1.25rem;
    }
    
    /* Chat Messages */
    .chat-container {
        max-height: 50vh;
    }
    
    .chat-message {
        padding: 1rem;
    }
    
    /* Settings Page */
    .settings-container {
        padding: 0;
    }
    
    .settings-card {
        margin-bottom: 1rem;
    }
    
    .settings-header {
        padding: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .settings-body {
        padding: 1.25rem;
    }
    
    /* Leaderboard */
    .leaderboard-table {
        font-size: 0.875rem;
    }
    
    .leaderboard-rank {
        font-size: 1.25rem;
    }
    
    /* Touch-Friendly Buttons */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn i {
        font-size: 1.1rem;
    }
    
    /* Active/Touch States */
    .btn:active {
        transform: scale(0.98);
    }
    
    .sidebar-link:active {
        transform: translateX(4px);
    }
    
    /* Improve tap targets for icons */
    .stat-card {
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .stat-card:active {
        transform: scale(0.98);
    }
    
    /* Better spacing for touch */
    .beammp-tabs {
        margin-bottom: 1.5rem;
    }
    
    /* Improve modal close button */
    .modal-close {
        -webkit-tap-highlight-color: transparent;
    }
    
    .modal-close:active {
        transform: scale(0.9);
    }
    
    /* Sticky header for tables */
    .table-container {
        position: relative;
    }
    
    table thead {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--card-bg);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }
    
    /* Better form labels on mobile */
    .form-group label {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* Improve select dropdowns */
    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFD700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        padding-right: 2.5rem;
    }
}

/* Mobile Overlay Backdrop */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.show {
    display: block;
    opacity: 1;
}

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
}

/* Extra Small Devices (Phones in Portrait) */
@media (max-width: 480px) {
    /* Reduce padding further */
    .admin-main {
        padding: 0.75rem;
    }
    
    .sidebar-toggle {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.625rem 0.875rem;
        font-size: 1.1rem;
    }
    
    /* Smaller modals */
    .modal.show {
        padding: 0.5rem !important;
    }
    
    .modal-content {
        width: 98%;
        max-width: 98%;
        margin: 0;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    /* Compact stats */
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Smaller tabs */
    .beammp-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
        min-width: 90px;
    }
    
    /* Compact table */
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.625rem 0.375rem;
    }
    
    /* Smaller buttons */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        min-height: 42px;
    }
    
    .btn-action {
        padding: 0.625rem;
        font-size: 0.85rem;
    }
    
    /* Gallery grid tighter */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    /* Form inputs */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
    }
    
    /* Settings cards */
    .settings-header {
        padding: 1rem;
    }
    
    .settings-body {
        padding: 1rem;
    }
    
    .settings-header h2 {
        font-size: 1.25rem;
    }
    
    /* Player detail modal */
    .player-detail-stats {
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.875rem;
    }
    
    /* Toast smaller */
    .toast {
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
    }
    
    /* Sidebar narrower */
    .admin-sidebar {
        width: 260px;
    }
    
    .sidebar-nav a {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    /* Hide scroll indicator on very small screens */
    .table-container::after {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Compact event cards */
    .event-card {
        padding: 1rem;
    }
    
    .event-card h3 {
        font-size: 1.1rem;
    }
    
    /* Whitelist status more compact */
    .whitelist-status {
        padding: 1rem;
        gap: 12px;
    }
    
    .whitelist-status i {
        font-size: 1.5rem;
    }
    
    /* Compact broadcast form */
    .broadcast-form {
        padding: 1rem;
    }
    
    /* Better modal spacing */
    .player-detail-actions {
        gap: 0.5rem;
    }
    
    .player-detail-actions .btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
    
    /* Improve page header */
    .admin-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }
    
    .admin-header h1 {
        font-size: 1.5rem;
    }
    
    /* Card layouts */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Better empty states */
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
    
    .empty-state p {
        font-size: 0.9rem;
    }
}

/* ========================================
   WHITELIST SPECIFIC STYLES
   ======================================== */

.whitelist-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.whitelist-controls .btn {
    min-width: 120px;
}

.whitelist-status {
    padding: 28px 32px;
    border-radius: 16px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 2px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.whitelist-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    transition: all 0.3s ease;
}

.whitelist-status.enabled {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-color: #22c55e;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.15);
}

.whitelist-status.enabled::before {
    background: #22c55e;
}

.whitelist-status.disabled {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.whitelist-status.disabled::before {
    background: #ef4444;
}

.whitelist-status i {
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.whitelist-status.enabled i {
    color: #22c55e;
    animation: pulse-green 2s infinite;
}

.whitelist-status.disabled i {
    color: #ef4444;
}

.whitelist-status > div {
    flex: 1;
}

.whitelist-status span {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.whitelist-status strong {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.whitelist-status.enabled strong {
    color: #22c55e;
}

.whitelist-status.disabled strong {
    color: #ef4444;
}

.whitelist-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.whitelist-add-form {
    background: linear-gradient(135deg, rgba(42, 42, 62, 0.6) 0%, rgba(30, 30, 46, 0.8) 100%);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.whitelist-add-form h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

.whitelist-add-form h4 i {
    color: #ffd700;
    font-size: 1.25rem;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.inline-form {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.whitelist-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .whitelist-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .whitelist-form-grid button {
        width: 100%;
    }
}

.inline-form input[type="text"],
.whitelist-form-grid input[type="text"] {
    flex: 1;
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 52px;
}

.inline-form input[type="text"]:focus,
.whitelist-form-grid input[type="text"]:focus {
    outline: none;
    border-color: #ffd700;
    background: #0f0f1e;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 12px rgba(255, 215, 0, 0.2);
    transform: translateY(-1px);
}

.inline-form input[type="text"]::placeholder,
.whitelist-form-grid input[type="text"]::placeholder {
    color: #6b7280;
    font-weight: 400;
}

.whitelist-tag-select {
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 52px;
    cursor: pointer;
}

.whitelist-tag-select:focus {
    outline: none;
    border-color: #ffd700;
    background: #0f0f1e;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), 0 4px 12px rgba(255, 215, 0, 0.2);
}

.whitelist-tag-select option {
    background: #1a1a2e;
    color: var(--text-primary);
    padding: 12px;
}

.whitelist-table-wrapper {
    background: linear-gradient(135deg, #1e1e2e 0%, #181825 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 0, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-top: 8px;
}

.whitelist-table {
    width: 100%;
    border-collapse: collapse;
}

.whitelist-table th {
    background: linear-gradient(135deg, #2a2a3e 0%, #252538 100%);
    color: #ffd700;
    padding: 20px 24px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.whitelist-table td {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
    color: #a1a1aa;
    transition: all 0.2s ease;
}

.whitelist-table tbody tr {
    transition: all 0.2s ease;
}

.whitelist-table tbody tr:hover {
    background: rgba(42, 42, 62, 0.5);
    transform: translateX(4px);
}

.whitelist-table td:first-child {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
}

.whitelist-table td:first-child strong {
    color: #ffd700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.whitelist-table td:first-child strong::before {
    content: '●';
    color: #22c55e;
    font-size: 0.75rem;
}

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #1e1e2e 0%, #181825 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 650px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h3 i {
    color: #ffd700;
}

.modal-close {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
}

.modal-body {
    padding: 28px;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.modal-actions .btn {
    min-width: 120px;
}

/* Player Detail Modal Specific */
.player-detail-info {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
    padding: 24px;
    background: rgba(42, 42, 62, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.player-detail-avatar {
    flex-shrink: 0;
}

.player-detail-avatar i {
    font-size: 4rem;
    color: #ffd700;
}

.player-detail-main {
    flex: 1;
}

.player-detail-main h4 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.player-detail-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(20, 20, 30, 0.6);
    border-radius: 8px;
}

.stat-item i {
    color: #ffd700;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 100px;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 700;
    margin-left: auto;
    font-family: 'Courier New', monospace;
    text-align: right;
    word-break: break-all;
}

.player-detail-actions {
    padding: 20px;
    background: rgba(42, 42, 62, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.player-detail-actions h5 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-buttons .btn {
    padding: 12px 16px;
    font-size: 0.9rem;
}

/* Override btn-primary color for Send Message in player modal */
.player-detail-actions .btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    outline: none;
    transition: background 0.15s ease;
}

.player-detail-actions .btn-primary:hover {
    background: #2563eb;
}

.player-detail-actions .btn-primary:focus {
    outline: none;
    box-shadow: none;
}

.btn-warning {
    background: #f59e0b;
    color: white;
    transition: background 0.15s ease;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-success {
    background: #22c55e;
    color: white;
    transition: background 0.15s ease;
}

.btn-success:hover {
    background: #16a34a;
}

/* ========================================
   CHAT VIEWER STYLES
   ======================================== */

.chat-viewer {
    margin-top: 32px;
    background: linear-gradient(135deg, #1e1e2e 0%, #181825 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.15);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-viewer .section-header {
    padding: 20px 24px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    background: linear-gradient(135deg, #2a2a3e 0%, #252538 100%);
}

.chat-controls {
    display: flex;
    gap: 8px;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(10, 10, 20, 0.5);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(20, 20, 30, 0.5);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:active {
    background: rgba(255, 215, 0, 0.5);
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.chat-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.chat-empty p {
    margin: 0;
    font-size: 1rem;
}

.chat-message {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(42, 42, 62, 0.4);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
    animation: slideInRight 0.3s ease;
}

.chat-message.admin-message {
    background: rgba(59, 130, 246, 0.2);
    border-left: 3px solid #3b82f6;
}

.chat-message.admin-message .chat-message-player {
    color: #3b82f6;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.chat-message-player {
    color: #ffd700;
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-message-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-left: auto;
}

.chat-message-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Clickable player names in table */
.player-name {
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-name:hover {
    color: #ffd700 !important;
    transform: translateX(4px);
}

/* Whitelist Tag Badges */
.whitelist-tag-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
}

.whitelist-tag-badge.tag-staff {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    border-color: #ef4444;
    color: #ef4444;
}

.whitelist-tag-badge.tag-friend {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
    border-color: #22c55e;
    color: #22c55e;
}

.whitelist-tag-badge.tag-whitelist {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
    border-color: #3b82f6;
    color: #3b82f6;
}
