/**
 * TSI ASCE Expert Playback Analysis Styles
 * Chess-style post-hunt review UI
 * Version: 1.0.0
 */

/* ========================================
   PLAYBACK ANALYSIS CONTAINER
   ======================================== */

.playback-analysis {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    color: #ffffff;
    padding: 20px;
    border-radius: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   HEADER
   ======================================== */

.playback-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 102, 0, 0.3);
}

.playback-header h2 {
    font-size: 2em;
    margin: 0 0 10px 0;
    color: #FF6600;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
}

.scenario-context {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.animal-badge {
    background: linear-gradient(135deg, #FF6600, #FF0000);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 0.9em;
    letter-spacing: 2px;
}

.scenario-name {
    font-size: 1.2em;
    color: #00FF00;
}

.scenario-details {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   OVERALL ASSESSMENT
   ======================================== */

.overall-assessment {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.overall-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #FF0000, #FFaa00, #00FF00);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.overall-score-circle::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: #1a1a2e;
    border-radius: 50%;
}

.overall-score-circle .score-value {
    position: relative;
    font-size: 2.5em;
    font-weight: bold;
    color: #ffffff;
}

.overall-score-circle .score-label {
    position: relative;
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.rating-badge {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.3em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rating-badge.master {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.rating-badge.expert {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #000;
}

.rating-badge.proficient {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.rating-badge.intermediate {
    background: linear-gradient(135deg, #00FF00, #008000);
}

.rating-badge.developing {
    background: linear-gradient(135deg, #00BFFF, #1E90FF);
}

.rating-badge.beginner {
    background: linear-gradient(135deg, #FF6B6B, #EE5A5A);
}

.breakdown-bars {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.breakdown-label {
    width: 120px;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
}

.breakdown-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin: 0 10px;
}

.breakdown-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6600, #00FF00);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.breakdown-value {
    width: 45px;
    text-align: right;
    font-weight: bold;
    color: #00FF00;
}

.strengths, .weaknesses {
    margin-top: 15px;
}

.strengths h4, .weaknesses h4 {
    font-size: 0.9em;
    margin: 0 0 8px 0;
    color: #00FF00;
}

.weaknesses h4 {
    color: #FFaa00;
}

.strengths ul, .weaknesses ul {
    margin: 0;
    padding-left: 20px;
}

.strengths li, .weaknesses li {
    font-size: 0.85em;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   TIMELINE
   ======================================== */

.playback-timeline {
    margin-bottom: 30px;
}

.timeline-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.timeline-btn {
    background: rgba(255, 102, 0, 0.2);
    border: 2px solid #FF6600;
    color: #FF6600;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.timeline-btn:hover {
    background: #FF6600;
    color: #000;
}

.frame-counter {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.timeline-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    flex-wrap: wrap;
}

.timeline-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.timeline-marker:hover {
    transform: scale(1.2);
}

.timeline-marker.active {
    transform: scale(1.3);
    box-shadow: 0 0 15px currentColor;
}

.timeline-marker.excellent {
    background: #00FF00;
    border-color: #00FF00;
}

.timeline-marker.good {
    background: #90EE90;
    border-color: #90EE90;
}

.timeline-marker.acceptable {
    background: #FFaa00;
    border-color: #FFaa00;
}

.timeline-marker.mixed {
    background: #FF8C00;
    border-color: #FF8C00;
}

.timeline-marker.needs-work {
    background: #FF6347;
    border-color: #FF6347;
}

.timeline-marker.wrong {
    background: #FF0000;
    border-color: #FF0000;
}

/* ========================================
   FRAME CARDS
   ======================================== */

.frame-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.frame-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.frame-card.active {
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.frame-card.excellent {
    border-color: #00FF00;
}

.frame-card.good {
    border-color: #90EE90;
}

.frame-card.acceptable {
    border-color: #FFaa00;
}

.frame-card.mixed {
    border-color: #FF8C00;
}

.frame-card.needs-work {
    border-color: #FF6347;
}

.frame-card.wrong {
    border-color: #FF0000;
}

.frame-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.frame-number {
    font-weight: bold;
    color: #FF6600;
    font-size: 1.1em;
}

.frame-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9em;
}

/* ========================================
   FRAME COMPARISON
   ======================================== */

.frame-comparison {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.user-action, .optimal-action {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.user-action h4, .optimal-action h4 {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-action h4 {
    color: #00FF00;
}

.optimal-action h4 {
    color: #FF6600;
}

.user-action .call-type, .optimal-action .call-type {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 8px;
}

.user-action .accuracy {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.user-action .result {
    margin-top: 8px;
    font-style: italic;
    font-size: 0.85em;
}

.user-action .result.rush,
.user-action .result.approach {
    color: #00FF00;
}

.user-action .result.hold {
    color: #FFaa00;
}

.user-action .result.retreat,
.user-action .result.spook {
    color: #FF6347;
}

.user-action .distance {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.optimal-action .reason {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.optimal-action .expected {
    font-size: 0.85em;
    color: rgba(0, 255, 0, 0.7);
    font-style: italic;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
}

.vs-divider span {
    background: rgba(255, 102, 0, 0.3);
    padding: 10px;
    border-radius: 50%;
    font-weight: bold;
    color: #FF6600;
}

/* ========================================
   VERDICT BAR
   ======================================== */

.verdict-bar {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.verdict-bar.excellent {
    background: linear-gradient(135deg, #00FF00, #00CC00);
    color: #000;
}

.verdict-bar.good {
    background: linear-gradient(135deg, #90EE90, #32CD32);
    color: #000;
}

.verdict-bar.acceptable {
    background: linear-gradient(135deg, #FFaa00, #FF8C00);
    color: #000;
}

.verdict-bar.mixed {
    background: linear-gradient(135deg, #FF8C00, #FF6347);
    color: #fff;
}

.verdict-bar.needs-work {
    background: linear-gradient(135deg, #FF6347, #FF4500);
    color: #fff;
}

.verdict-bar.wrong {
    background: linear-gradient(135deg, #FF0000, #CC0000);
    color: #fff;
}

/* ========================================
   BREAKDOWN & LESSONS
   ======================================== */

.frame-breakdown {
    margin-bottom: 15px;
}

.breakdown-mini {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
}

.breakdown-mini span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 15px;
}

.lesson-box {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.lesson-box strong {
    color: #00FF00;
}

.tips-box {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.85em;
}

.tips-box strong {
    color: #FFaa00;
}

.tips-box ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.tips-box li {
    margin-bottom: 3px;
}

.environment-context {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.environment-context small {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8em;
}

/* ========================================
   RECOMMENDATIONS
   ======================================== */

.recommendations {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.recommendations h3 {
    text-align: center;
    color: #FF6600;
    margin: 0 0 20px 0;
    font-size: 1.3em;
    letter-spacing: 2px;
}

.recommendation-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.recommendation-card {
    background: rgba(255, 102, 0, 0.1);
    border: 1px solid rgba(255, 102, 0, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    max-width: 350px;
}

.recommendation-icon {
    font-size: 1.5em;
}

.recommendation-text {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .frame-comparison {
        flex-direction: column;
    }

    .vs-divider {
        width: 100%;
        padding: 10px 0;
    }

    .overall-assessment {
        flex-direction: column;
    }

    .breakdown-bars {
        width: 100%;
    }

    .timeline-controls {
        flex-wrap: wrap;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px currentColor;
    }
    50% {
        box-shadow: 0 0 25px currentColor;
    }
}

.timeline-marker.active {
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.frame-card {
    animation: slideIn 0.3s ease-out;
}
