.speed-test-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

.speed-test-section .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    color: #fff;
}

.calculator-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.calculator-title i {
    font-size: 2.8rem;
}

.calculator-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.calculator-badge {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.test-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.test-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.test-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
}

.circle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f3f4f6;
}

.circle-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#667eea 0deg, #667eea 0deg, transparent 0deg);
    transition: background 0.3s ease;
}

.circle-content {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.speed-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.speed-unit {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.test-status {
    font-size: 0.9rem;
    color: #999;
}

.start-btn, .reset-btn {
    padding: 14px 40px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.start-btn:hover, .reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.reset-btn {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
}

.reset-btn:hover {
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.results-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.results-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-title i {
    color: #3b82f6;
}

.results-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.result-card.completed {
    opacity: 1;
    transform: translateY(0);
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
}

.download-card .result-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.upload-card .result-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.ping-card .result-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.jitter-card .result-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.result-label {
    font-size: 0.85rem;
    color: #666;
}

.result-unit {
    font-size: 0.8rem;
    color: #999;
}

.history-section {
    margin-top: 25px;
}

.history-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.empty-history {
    color: #999;
    text-align: center;
    padding: 20px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
}

.history-item:last-child {
    margin-bottom: 0;
}

.history-speeds {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-download {
    font-size: 0.9rem;
    font-weight: 600;
    color: #10b981;
}

.history-upload {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3b82f6;
}

.history-ping {
    font-size: 0.85rem;
    color: #8b5cf6;
}

.history-time {
    font-size: 0.75rem;
    color: #999;
}

.speed-guide {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.speed-guide .guide-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.guide-grid .guide-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.guide-grid .guide-item:hover {
    transform: translateY(-3px);
}

.guide-grid .guide-item.slow {
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.guide-grid .guide-item.normal {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.guide-grid .guide-item.fast {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}

.guide-grid .guide-item.ultra {
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.guide-range {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.guide-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.guide-desc {
    font-size: 0.8rem;
    color: #666;
}

.calculator-guide {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.calculator-guide .guide-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.guide-content .guide-item {
    text-align: center;
}

.guide-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.3rem;
    color: #fff;
}

.guide-content .guide-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.guide-content .guide-item p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

@media (max-width: 768px) {
    .calculator-title {
        font-size: 1.8rem;
    }

    .test-main {
        grid-template-columns: 1fr;
    }

    .results-content {
        grid-template-columns: 1fr;
    }

    .guide-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .test-circle {
        width: 160px;
        height: 160px;
    }

    .speed-value {
        font-size: 2rem;
    }
}