/* Replay Livelox+ Modern Dark Glassmorphism Styling */

.replay-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #12131a;
    color: #f1f2f6;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.replay-map-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
}

.replay-top-bar {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 20, 32, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 4px 12px;
    min-height: 46px;
    max-height: 46px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: visible;
}

.replay-top-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.replay-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #00d2d3;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.replay-title-text {
    max-width: 170px;
}

.replay-select {
    width: auto;
    max-width: 165px;
    font-size: 0.8rem;
}

.replay-top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.replay-tools-popover {
    position: absolute;
    top: 58px;
    right: 12px;
    z-index: 35;
    width: 320px;
    background: rgba(18, 20, 32, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
}

.btn-xs {
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.replay-bottom-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: min(94%, 860px);
    background: rgba(18, 20, 32, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.replay-timeline-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.replay-scrub-slider {
    flex: 1;
    accent-color: #00d2d3;
    cursor: pointer;
}

.replay-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.replay-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.replay-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.replay-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #00d2d3;
}

.replay-btn.active {
    background: #00d2d3;
    color: #12131a;
    font-weight: 700;
}

.replay-side-panel {
    position: absolute;
    top: 60px;
    bottom: 80px;
    z-index: 9;
    width: 290px;
    background: rgba(18, 20, 32, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    overflow-y: auto;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.replay-athletes-panel {
    left: 12px;
}

.replay-splits-panel {
    right: 12px;
}

.athlete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.athlete-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.athlete-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.athlete-color-picker {
    width: 18px;
    height: 18px;
    padding: 0;
    margin-right: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.athlete-color-picker:hover {
    transform: scale(1.18);
    border-color: #00d2d3;
    box-shadow: 0 0 6px rgba(0, 210, 211, 0.6);
}

.athlete-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

.athlete-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.athlete-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.pip-video-container {
    position: absolute;
    top: 70px;
    right: 16px;
    width: 320px;
    height: 180px;
    z-index: 11;
    background: #000;
    border: 2px solid #00d2d3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.pip-video-container video, .pip-video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.replay-chart-panel {
    height: 120px;
    width: 100%;
    margin-top: 6px;
}

/* Unified Organized Sidebar / Dock */
.replay-unified-sidebar {
    position: absolute;
    top: 58px;
    right: 12px;
    bottom: 80px;
    width: 420px;
    max-width: calc(100vw - 24px);
    z-index: 25;
    background: rgba(18, 20, 32, 0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    padding: 0;
}

.replay-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(26, 30, 48, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.replay-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Floating Glassmorphic Map Navigation & Follow Controls */
.replay-map-floating-controls {
    position: absolute;
    top: 60px;
    left: 16px;
    z-index: 15;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.replay-floating-group {
    display: flex;
    flex-direction: column;
    background: rgba(18, 20, 32, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.replay-floating-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.14);
    margin: 2px 4px;
}

.replay-floating-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #f1f2f6;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.replay-floating-btn:last-child {
    border-bottom: none;
}

.replay-floating-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #00d2d3;
}

.replay-floating-btn.active {
    background: #00d2d3;
    color: #12131a;
    font-weight: bold;
}

.replay-floating-zoom-badge {
    width: 36px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #00d2d3;
    background: rgba(0, 0, 0, 0.45);
    user-select: none;
    font-family: monospace;
}

.replay-follow-status-badge {
    position: absolute;
    top: 60px;
    left: 62px;
    z-index: 15;
    background: rgba(18, 20, 32, 0.94);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 210, 211, 0.45);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: #00d2d3;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.replay-follow-status-badge:hover {
    background: rgba(0, 210, 211, 0.15);
    border-color: #00d2d3;
}

.replay-follow-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #00d2d3;
    box-shadow: 0 0 8px #00d2d3;
    animation: pulseFollow 1.8s infinite;
}

@keyframes pulseFollow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 210, 211, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(0, 210, 211, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 210, 211, 0); }
}

/* Display & Visuals Popover Menu */
.replay-display-popover {
    position: absolute;
    bottom: 42px;
    right: 0;
    width: 290px;
    background: rgba(18, 20, 32, 0.97);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
    z-index: 40;
    animation: popoverFadeIn 0.15s ease-out;
}

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

/* Responsive Rules */
@media (max-width: 992px) {
    .replay-top-bar {
        padding: 4px 8px;
    }
    .replay-title-text {
        max-width: 130px;
    }
}

@media (max-width: 768px) {
    .replay-title-text {
        max-width: 100px;
    }
    .replay-select {
        max-width: 120px;
    }
    .replay-bottom-controls {
        width: calc(100% - 16px);
        padding: 6px 10px;
    }
}

/* Tam Ekran (Fullscreen) Modu */
.replay-container.replay-fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
