* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: #f3f4f6;
    color: #111827;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.header {
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 8px;
}
.header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.header .sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

#container {
    width: min(800px, 90vh);
    height: min(800px, 90vh);
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15,23,42,0.12);
    overflow: hidden;
    position: relative;
    border: 1px solid #e5e7eb;
}

#viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
    background: #000;
}

#map {
    width: 1008px;
    height: 1008px;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
}

#zones-svg,
#path-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 1008px;
    height: 1008px;
    pointer-events: none;
}

.kill-dot {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.controls {
    margin-top: 12px;
    padding: 10px 12px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn:hover {
    background: #e5e7eb;
}

.timeline {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.timeline input[type=range] {
    width: 100%;
}
.time-label {
    font-variant-numeric: tabular-nums;
    color: #4b5563;
}

.killfeed {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(15,23,42,0.08);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    height: min(800px, 90vh);
}
.killfeed h2 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
}
.killfeed-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}
.killfeed-item {
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px dashed #e5e7eb;
    opacity: 0;
    transform: translateY(4px);
    animation: fadeIn 0.25s forwards;
}
.killfeed-item:last-child {
    border-bottom: none;
}
.killfeed-time {
    color: #9ca3af;
    margin-right: 4px;
}
.killfeed-main {
    font-weight: 500;
    color: #111827;
}
.killfeed-weapon {
    color: #6b7280;
    font-size: 12px;
    margin-left: 4px;
}

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

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .killfeed {
        height: auto;
        max-height: 300px;
    }
}

/* Блок выбора игрока */
.team-selector {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    border-radius: 10px;
    margin: 16px auto;
    max-width: 800px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.team-selector h3 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

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

/* Кнопка игрока */
.team-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.team-btn:hover {
    background: #e5e7eb;
}

/* Активная кнопка */
.team-btn.active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: white;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.3);
}
.team-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
#player-path {
    transition: opacity 0.25s ease;
}

.path-hidden {
    opacity: 0;
}
