/* Speed Test Components */

/* Progress Bar */
.progress-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
}

.progress-bar {
    height: 60px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    border-radius: 10px;
    transition: width 0.3s ease, background 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Progress bar pulse animation */
@keyframes progressPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.progress-text {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Speed Display */
.speed-display {
    text-align: center;
    margin: 30px 0;
}

.speed-value {
    font-size: 4rem;
    font-weight: bold;
    color: #1e3c72;
    margin: 0;
}

.speed-unit {
    font-size: 1.5rem;
    color: #6c757d;
    margin-left: 10px;
}

.speed-label {
    font-size: 1.2rem;
    color: #6c757d;
    margin-top: 10px;
}

/* Test Controls */
.test-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.test-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 150px;
}

.test-btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.test-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
}

.test-btn-secondary {
    background: #6c757d;
    color: white;
}

.test-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-3px);
}

/* Server Selection */
.server-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.server-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.server-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.server-btn.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.result-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #1e3c72;
}

.result-card h3 {
    color: #1e3c72;
    margin-bottom: 15px;
}

.result-value {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
    margin: 10px 0;
}

.result-comparison {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 5px 0;
}

/* Charts */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-title {
    font-size: 1.5rem;
    color: #1e3c72;
    margin-bottom: 20px;
    text-align: center;
}

.speed-chart {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30,60,114,0.1);
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

/* Test Status */
.test-status {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #17a2b8;
}

.test-status h3 {
    color: #17a2b8;
    margin-bottom: 10px;
}

.test-status p {
    color: #6c757d;
    margin: 5px 0;
}

/* Comparison Bars */
.comparison-container {
    margin: 30px 0;
}

.comparison-bar {
    display: flex;
    align-items: center;
    margin: 15px 0;
    gap: 15px;
}

.comparison-label {
    min-width: 150px;
    font-weight: 600;
    color: #333;
}

.comparison-progress {
    flex: 1;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.comparison-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 15px;
    transition: width 0.3s ease;
}

.comparison-value {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    color: #1e3c72;
}

/* Responsive Design for Components */
@media (max-width: 768px) {
    .speed-value {
        font-size: 3rem;
    }
    
    .test-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .test-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .server-selection {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comparison-label {
        min-width: auto;
    }
    
    .comparison-value {
        min-width: auto;
        text-align: left;
    }
} 