/* Country Rankings Specific Styles */

/* Podium Section */
.podium-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.podium-section h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.podium-place {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    min-width: 150px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.podium-place:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.podium-place.first {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    transform: scale(1.1);
    z-index: 3;
}

.podium-place.second {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: white;
    z-index: 2;
}

.podium-place.third {
    background: linear-gradient(135deg, #cd7c2f, #a16207);
    color: white;
    z-index: 1;
}

.podium-flag {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.podium-country {
    margin-bottom: 1rem;
}

.podium-country .country-flag {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.podium-country .country-name {
    font-weight: 600;
    font-size: 1.125rem;
}

.podium-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.podium-participants {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Country Rankings Table */
.country-rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.country-rank-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.country-rank-badge.silver {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
}

.country-rank-badge.bronze {
    background: linear-gradient(135deg, #cd7c2f, #a16207);
}

.country-rank-badge.default {
    background: var(--primary-color);
}

.country-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.country-info .country-flag {
    font-size: 1.5rem;
}

.country-info .country-details {
    display: flex;
    flex-direction: column;
}

.country-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.country-code {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Score Display */
.score-display {
    text-align: center;
    font-weight: 600;
}

.score-value {
    display: block;
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.participants-count {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Mobile Country Cards */
.mobile-country-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    margin-bottom: 1rem;
}

.mobile-country-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mobile-country-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-country-info .country-flag {
    font-size: 1.5rem;
}

.mobile-country-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
}

.mobile-country-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-stat-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.mobile-stat-value {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.mobile-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-scores-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.mobile-score-item {
    text-align: center;
}

.mobile-score-value {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.mobile-score-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Performance Indicators */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.performance-indicator.excellent {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.performance-indicator.good {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.performance-indicator.average {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .podium-place {
        min-width: 200px;
        transform: none !important;
    }

    .podium-place.first {
        order: -1;
    }

    .podium-place.second {
        order: 0;
    }

    .podium-place.third {
        order: 1;
    }

    /* Hide desktop table, show mobile cards */
    .desktop-results {
        display: none;
    }

    .mobile-results {
        display: block;
    }

    .mobile-country-stats {
        grid-template-columns: 1fr;
    }

    .mobile-scores-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mobile-scores-grid .mobile-score-item:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .podium-section {
        padding: 1rem;
    }

    .podium-place {
        min-width: 150px;
        padding: 1rem 0.75rem;
    }

    .mobile-country-card {
        padding: 1rem;
    }

    .mobile-scores-grid {
        grid-template-columns: 1fr;
    }
}