.analytics-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    font-family: 'Fredoka', sans-serif;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.analytics-modal {
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    margin: auto;
    overflow-y: auto;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    padding: 15px 0;
}

.close-btn {
    display: none;
}

.modal-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

.search-container {
    margin-bottom: 20px;
    background: white;
    z-index: 1;
    padding: 10px 0;
}

.player-list {
    flex: 1;
    overflow-y: auto;
    border-right: none;
    padding-right: 0;
    float: none;
    position: relative;
    max-height: none;
}

.stats-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.analytics-navigation {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.player-item {
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s;
}

.player-item:hover {
    background: #f0f0f0;
}

.loading-message, .error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.error-message {
    color: #ff4444;
}

.loading {
    display: none;
}

.analytics-select-wrapper {
    flex: 1;
    max-width: 300px; /* Limit maximum width of each dropdown */
}

.analytics-select-wrapper select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    height: 40px;
}

.analytics-select-wrapper select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.analytics-details {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.stat-card {
    display: none;
}

.modal-layout {
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
    height: calc(90vh - 100px);
}

.sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
    padding-left: 20px;
}

/* Remove old class definitions */
.navigation-container,
.select-wrapper,
.details-container {
    display: none;
}

.path-section {
    margin-top: 30px;
}

.path-section h3 {
    margin: 0 0 15px 0;
}

.path-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 12px;
}

.path-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.path-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
    min-width: 80px;
    position: relative;
}

.path-expression-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.path-expression {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    min-width: 45px;
    text-align: center;
}

.path-arrow {
    position: absolute;
    right: -20px;
    color: #666;
    font-size: 20px;
    font-weight: bold;
}

.path-duration {
    font-size: 12px;
    color: #666;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.section-title {
    margin: 0 0 15px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.analytics-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.download-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 35px;
}

.download-controls select {
    height: 100%;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 150px;
}

.download-btn {
    height: 100%;
    padding: 0 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
}

.download-btn:hover {
    background: #45a049;
}

.analytics-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 5px 10px;
    background: #2f69d5;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    z-index: 2000;
    font-size: 12px;
}

.analytics-button:hover {
    background: #4d81e2;
}
