/* ========================================
   Стили для инструмента проверки скорости интернета
   ======================================== */

/* Информация о провайдере */
.speed-info-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.speed-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.speed-info-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speed-info-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* Рекомендации */
.speed-recommendations {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.speed-recommendations p {
    margin: 0 0 12px 0;
    color: #856404;
    font-weight: 600;
}

.speed-recommendations ul {
    margin: 0;
    padding-left: 20px;
    color: #856404;
}

.speed-recommendations li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.speed-recommendations li:last-child {
    margin-bottom: 0;
}

/* Секция капчи */
.speed-captcha-section {
    display: none;
    margin-bottom: 20px;
}

/* Кнопка запуска теста */
.speed-test-button-container {
    text-align: center;
    margin: 30px 0;
}

.btn-large {
    font-size: 18px;
    padding: 16px 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-large i {
    font-size: 20px;
}

/* Процесс тестирования */
.speed-test-process {
    display: none;
    margin: 30px 0;
}

.speed-test-stage {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.speed-test-stage:last-child {
    margin-bottom: 0;
}

.stage-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stage-icon i {
    font-size: 28px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.stage-icon.active {
    background-color: #0066cc;
    animation: pulse 1.5s ease-in-out infinite;
}

.stage-icon.active i {
    color: #fff;
}

.stage-icon.completed {
    background-color: #28a745;
}

.stage-icon.completed i {
    color: #fff;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.stage-info {
    flex: 1;
}

.stage-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.stage-result {
    font-size: 24px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 10px;
}

.stage-progress {
    width: 100%;
    height: 8px;
    background-color: #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0066cc, #0052a3);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Итоговые результаты */
.speed-test-results {
    display: none;
    margin: 30px 0;
}

.speed-test-results h2 {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.result-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.result-icon {
    margin-bottom: 15px;
}

.result-icon i {
    font-size: 36px;
    opacity: 0.9;
}

.result-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    opacity: 0.9;
}

.result-value {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.speed-test-actions {
    text-align: center;
}

/* Сообщение об ошибке */
.speed-message {
    display: none;
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
    font-size: 14px;
}

.speed-message.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Адаптивность */
@media (max-width: 1400px) {
    .speed-info-section {
        gap: 12px;
    }
    
    .results-grid {
        gap: 18px;
    }
}

@media (max-width: 1200px) {
    .speed-test-stage {
        padding: 20px;
    }
    
    .stage-icon {
        width: 55px;
        height: 55px;
    }
    
    .stage-icon i {
        font-size: 26px;
    }
    
    .result-card {
        padding: 25px;
    }
}

@media (max-width: 991px) {
    .stage-info h3 {
        font-size: 17px;
    }
    
    .stage-result {
        font-size: 22px;
    }
    
    .result-value {
        font-size: 28px;
    }
}

@media (max-width: 810px) {
    .speed-test-stage {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .speed-info-section {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }
    
    .speed-recommendations {
        padding: 15px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .speed-test-stage {
        padding: 18px;
        gap: 15px;
    }
    
    .stage-icon {
        width: 50px;
        height: 50px;
    }
    
    .stage-icon i {
        font-size: 24px;
    }
}

@media (max-width: 650px) {
    .btn-large {
        font-size: 17px;
        padding: 14px 35px;
    }
    
    .speed-test-results h2 {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .speed-info-label {
        font-size: 12px;
    }
    
    .speed-info-value {
        font-size: 14px;
    }
    
    .speed-recommendations p {
        font-size: 14px;
    }
    
    .speed-recommendations ul {
        font-size: 14px;
    }
    
    .btn-large {
        font-size: 16px;
        padding: 12px 30px;
    }
    
    .speed-test-stage {
        flex-direction: column;
        text-align: center;
    }
    
    .stage-info h3 {
        font-size: 16px;
    }
    
    .stage-result {
        font-size: 20px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-value {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .speed-recommendations {
        padding: 12px;
    }
    
    .speed-recommendations li {
        font-size: 13px;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .speed-test-stage {
        padding: 15px;
    }
}

@media (max-width: 420px) {
    .btn-large {
        font-size: 15px;
        padding: 12px 25px;
    }
    
    .speed-test-results h2 {
        font-size: 20px;
    }
}

@media (max-width: 375px) {
    .speed-info-section {
        padding: 12px;
    }
    
    .stage-icon {
        width: 45px;
        height: 45px;
    }
    
    .stage-icon i {
        font-size: 22px;
    }
    
    .stage-info h3 {
        font-size: 15px;
    }
    
    .stage-result {
        font-size: 18px;
    }
    
    .result-icon i {
        font-size: 32px;
    }
    
    .result-value {
        font-size: 24px;
    }
}

@media (max-width: 360px) {
    .speed-recommendations {
        padding: 10px;
    }
    
    .result-card {
        padding: 18px;
    }
}

@media (max-width: 320px) {
    .btn-large {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .btn-large i {
        font-size: 16px;
    }
    
    .speed-test-results h2 {
        font-size: 18px;
    }
    
    .stage-result {
        font-size: 16px;
    }
    
    .result-content h3 {
        font-size: 14px;
    }
    
    .result-value {
        font-size: 22px;
    }
}
