:root {
    --accent-kills: #ef4444;
    --accent-revives: #10b981;
    --accent-deaths: #a1a1aa;
    --accent-saved: #6366f1;
}

body {
    overflow: hidden;
}

.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    padding-top: 73px;
}

.sidebar {
    width: 320px;
    background-color: var(--bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.search-container {
    padding: 1.5rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-container i {
    position: absolute;
    left: 2.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-container input {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px 12px 40px;
    color: var(--text-primary);
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.player-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

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

.player-item {
    padding: 12px 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.player-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.player-item.active {
    background-color: rgba(239, 68, 68, 0.1);
    border-left-color: var(--accent-red);
}

.player-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.player-name {
    font-weight: 600;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--bg-dark);
}

.total-players-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.total-players-badge span {
    color: var(--text-primary);
    font-weight: 800;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #130303 0%, var(--bg-dark) 100%);
}

.top-nav-dashboard {
    height: 70px;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(12px);
    z-index: 5;
}

.nav-title h1 {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.content-wrapper {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
    position: relative;
}

.state-indicator {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 420px;
}

.icon-container {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.icon-container.is-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 24px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.state-indicator h3 {
    font-size: 1.6rem;
    font-weight: 800;
}

.state-indicator p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.05rem;
}

.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.hidden {
    display: none !important;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 380px;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.1);
}

.card-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.card-kills .card-header::before { background-color: var(--accent-kills); }
.card-revives .card-header::before { background-color: var(--accent-revives); }
.card-deaths .card-header::before { background-color: var(--accent-deaths); }
.card-revived-by .card-header::before { background-color: var(--accent-saved); }

.header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.card-kills .header-icon { background: rgba(239, 68, 68, 0.15); color: var(--accent-kills); }
.card-revives .header-icon { background: rgba(16, 185, 129, 0.15); color: var(--accent-revives); }
.card-deaths .header-icon { background: rgba(161, 161, 170, 0.15); color: var(--accent-deaths); }
.card-revived-by .header-icon { background: rgba(99, 102, 241, 0.15); color: var(--accent-saved); }

.header-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
}

.header-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-body h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
}

.detail-item {
    background-color: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.detail-item .count-badge {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
}

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

.stats-dashboard {
    animation: fadeIn 0.5s ease-out forwards;
}
