:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Dynamic animated background */
.background-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: pulseBg 15s ease-in-out infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

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

.logo i {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.logo h1 {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 0.9rem;
    color: var(--success);
}

.indicator.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Glass Panels */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.card:nth-child(1) .icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.card:nth-child(2) .icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.card:nth-child(3) .icon { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.card .info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.3rem;
}

.card .info p {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Table Area */
.table-container {
    padding: 2rem;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.table-header h2 {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.delete-btn:active {
    transform: scale(0.95);
}

.refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.refresh-btn:active {
    transform: scale(0.95);
}

.checkbox-col {
    width: 40px;
    text-align: center;
}
.row-checkbox {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.player-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
}
.status-badge.online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-badge.offline {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}
.status-badge i {
    font-size: 0.4rem;
}

.player-avatar {
    width: 30px;
    height: 30px;
    background: #334155;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

.coins-val {
    color: #fcd34d;
    font-weight: 600;
}

.items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.item-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.time-val {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.loading-state, .empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
