/* Results Page Styles */

/* Modal Styles for Results */
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.detailed-answers {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

.detailed-answers h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.answer-detail {
    padding: 0.75rem;
    border-left: 3px solid #e9ecef;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 0 5px 5px 0;
    font-size: 0.9rem;
}

.answer-detail:last-child {
    margin-bottom: 0;
}

.result-summary {
    text-align: center;
}

.result-stats {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: left;
}

.result-stats p {
    margin-bottom: 0.75rem;
    color: #555;
}

.result-stats strong {
    color: #333;
}

/* Results Header */
.results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 2rem;
}

.results-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-left h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-left p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Latest Result Card */
.latest-result {
    padding: 2rem 0;
    background: #f8f9fa;
}

.result-card.featured {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.result-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #17a2b8, #ffc107, #dc3545);
    border-radius: 20px 20px 0 0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-title h2 {
    color: #333;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-name {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.result-date {
    color: #666;
    font-style: italic;
}

.result-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.3);
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-unit {
    font-size: 1rem;
    opacity: 0.9;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.correct {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

.label {
    color: #666;
    font-size: 0.9rem;
}

.score-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-weight: 600;
}

.result-analysis h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.analysis-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.analysis-item i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.analysis-item div h4,
.analysis-item strong {
    margin-bottom: 0.25rem;
    color: #333;
}

.analysis-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Dashboard Stats */
.dashboard-stats {
    padding: 2rem 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    padding: 2rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Charts Section */
.charts-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-header h3 {
    color: #333;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: #e9ecef;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: #667eea;
    color: white;
}

.chart-container {
    position: relative;
    height: 300px;
}

.skills-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.listening { background: #28a745; }
.legend-color.reading { background: #007bff; }
.legend-color.vocabulary { background: #6f42c1; }
.legend-color.grammar { background: #fd7e14; }

/* Test History */
.test-history {
    padding: 3rem 0;
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: #333;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.history-filters select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
}

.history-grid {
    display: grid;
    gap: 1rem;
}

.history-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: white;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.history-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.history-score {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 60px;
}

.history-details h4 {
    color: #333;
    margin-bottom: 0.25rem;
}

.history-details p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-actions button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-actions button:hover {
    background: #5a67d8;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.no-results p {
    margin-bottom: 2rem;
}

/* Achievements */
.achievements-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.achievement-card.unlocked {
    border-color: #ffd700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #666;
}

.achievement-card.unlocked .achievement-icon {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: white;
}

.achievement-card h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.achievement-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Results Page */
@media (max-width: 768px) {
    .results-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-left h1 {
        font-size: 2rem;
    }
    
    .result-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .score-display {
        justify-content: center;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .quick-actions {
        justify-content: center;
    }

    .result-actions {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-left h1 {
        font-size: 1.8rem;
    }

    .result-card.featured {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .history-filters {
        flex-direction: column;
    }

    .history-filters select {
        min-width: 100%;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-filters {
        flex-wrap: wrap;
    }

    .skills-legend {
        justify-content: center;
    }

    .quick-actions {
        flex-direction: column;
        align-items: center;
    }

    .result-actions {
        flex-direction: column;
    }
} 