:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f72585;
    --danger: #e63946;
    --dark: #1e293b;
    --light: #f8fafc;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    background: linear-gradient(180deg, var(--dark) 0%, #0f172a 100%);
    color: white;
    padding: 24px 16px;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar .logo {
    font-size: 1.4rem;
    font-weight: 700;
    padding: 12px 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .logo span { color: var(--success); }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-radius: 10px;
    margin: 4px 0;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,0.12);
    color: white;
    transform: translateX(4px);
}

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

/* Main Content */
.content {
    margin-left: var(--sidebar-width);
    padding: 24px 32px;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: rgba(67, 97, 238, 0.15); color: var(--primary); }
.stat-icon.green { background: rgba(76, 201, 240, 0.15); color: var(--success); }
.stat-icon.pink { background: rgba(247, 37, 133, 0.15); color: var(--warning); }
.stat-icon.orange { background: rgba(255, 159, 67, 0.15); color: #ff9f43; }

.stat-info h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 4px; }
.stat-info p { color: #64748b; font-size: 0.9rem; }

/* Leaderboard */
.leaderboard {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

.leaderboard h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-list {
    list-style: none;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8fafc;
}

.leaderboard-list li:last-child { border-bottom: none; }

.rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 12px;
}

.rank.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank.silver { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.rank.bronze { background: linear-gradient(135deg, #fcd34d, #d97706); }

.member-name {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    font-weight: 500;
}

.member-name .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.live-count {
    background: rgba(76, 201, 240, 0.15);
    color: #0891b2;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Table Modern */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9rem;
    background: white;
}

.filters .btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
}

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

table th {
    background: #f8fafc;
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

table tr:hover { background: #f8fafc; }

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.secondary { background: #e2e8f0; color: #475569; }
.status-badge.warning { background: #fef3c7; color: #92400e; }
.status-badge.success { background: #dcfce7; color: #166534; }
.status-badge.info { background: #dbeafe; color: #1e40af; }
.status-badge.primary { background: #e0e7ff; color: #3730a3; }
.status-badge.muted { background: #f1f5f9; color: #64748b; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--secondary); transform: translateY(-2px); }

.btn-success { background: #10b981; color: white; }
.btn-success:hover { background: #059669; transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    border: 2px solid #cbd5e1;
    color: var(--dark);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
}

.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }

/* Form Elements */
textarea {
    width: 100%;
    min-height: 200px;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

/* Account Preview */
.account-preview {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.account-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid var(--success);
}

.account-preview-item.invalid {
    border-left-color: var(--danger);
    opacity: 0.7;
}

.account-preview-item .uid {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    flex: 1;
}

.account-preview-item .status-check {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    margin-left: 10px;
}

.status-check.live { background: #dcfce7; color: #166534; }
.status-check.dead { background: #fee2e2; color: #991b1b; }

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #ef4444; }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: var(--transition); }
    .sidebar.active { transform: translateX(0); }
    .content { margin-left: 0; }
    .menu-toggle { display: block; }
}

/* Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
.hidden { display: none; }