/* Neural Network Animator Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.app-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* Animation Player */
.animation-player {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.loading, .error {
    text-align: center;
    padding: 40px;
    font-size: 18px;
}

.error {
    color: #e74c3c;
}

.error h3 {
    margin-bottom: 10px;
}

.player-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-header {
    text-align: center;
}

.player-header h2 {
    color: #34495e;
    margin-bottom: 10px;
}

.player-header .description {
    color: #7f8c8d;
    font-size: 14px;
}

/* Player Content */
.player-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.main-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-panel {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

/* Network Canvas */
.network-canvas {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-container svg {
    max-width: 100%;
    max-height: 100%;
}

.loading-network {
    color: #95a5a6;
    font-style: italic;
}

/* Info Panel */
.info-panel {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

.info-panel h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-panel p {
    margin-bottom: 8px;
    font-size: 14px;
}

.info-panel .value {
    font-weight: bold;
    color: #3498db;
}

.annotation-list {
    list-style: none;
    padding-left: 0;
}

.annotation {
    padding: 5px 0;
    font-size: 13px;
    border-bottom: 1px solid #e0e0e0;
}

/* Metrics Panel */
.metrics-panel {
    height: 100%;
}

.metrics-panel h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.metrics-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.metric-label {
    font-weight: 500;
    color: #7f8c8d;
}

.metric-value {
    font-weight: bold;
    color: #27ae60;
    font-size: 16px;
}

.examples h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

.example-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.example {
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.example.correct {
    border-left: 3px solid #27ae60;
}

.example.incorrect {
    border-left: 3px solid #e74c3c;
}

.example-idx {
    font-weight: bold;
    color: #7f8c8d;
    min-width: 20px;
}

.example-status {
    margin-left: auto;
    font-size: 14px;
}

/* Player Controls */
.player-controls {
    background: #34495e;
    border-radius: 6px;
    padding: 15px;
    color: white;
}

/* Timeline */
.timeline-component {
    margin-bottom: 15px;
}

.timeline-info {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 14px;
}

.timeline-bar {
    position: relative;
    height: 30px;
    background: #2c3e50;
    border-radius: 15px;
    overflow: hidden;
}

.timeline-slider {
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.timeline-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    pointer-events: none;
    z-index: 1;
}

/* DVR Controls */
.dvr-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group {
    display: flex;
    gap: 10px;
}

.control-btn {
    background: #3498db;
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.control-btn:hover {
    background: #2980b9;
}

.control-btn:active {
    background: #21618c;
}

.control-btn.play-pause {
    background: #27ae60;
    min-width: 60px;
}

.control-btn.play-pause:hover {
    background: #229954;
}

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

.speed-btn {
    padding: 8px 15px;
    font-size: 14px;
}

.speed-display {
    font-weight: bold;
    font-size: 18px;
    min-width: 50px;
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .player-content {
        grid-template-columns: 1fr;
    }

    .dvr-controls {
        flex-direction: column;
        gap: 15px;
    }
}
