/* SpeedTest Plugin Styles */

.speedtest-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 0;
}

.speedtest-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

.speedtest-main {
    position: relative;
}

.speedtest-header {
    margin-bottom: 40px;
}

.speedtest-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.speedtest-subtitle {
    font-size: 16px;
    color: #999;
    margin: 0;
}

/* 测速圆圈 */
.speedtest-circle-wrapper {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.speedtest-circle {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.speedtest-progress {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
}

.speedtest-progress-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 10;
}

.speedtest-progress-bar {
    fill: none;
    stroke: url(#progressGradient);
    stroke: #667eea;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 282.743;
    stroke-dashoffset: 282.743;
    transition: stroke-dashoffset 0.3s ease;
}

.speedtest-circle-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 10;
    pointer-events: none;
}

.speedtest-status {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
    line-height: 1.4;
}

.speedtest-speed {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    line-height: 1.2;
    margin-bottom: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.speedtest-unit {
    font-size: 16px;
    color: #999;
    line-height: 1.4;
}

/* 按钮样式 */
.speedtest-actions {
    margin: 30px 0;
}

.speedtest-start-btn,
.speedtest-stop-btn,
.speedtest-restart-btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.speedtest-start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.speedtest-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.speedtest-stop-btn {
    background: #ff6b6b;
    color: white;
}

.speedtest-stop-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.speedtest-restart-btn {
    background: #51cf66;
    color: white;
}

.speedtest-restart-btn:hover {
    background: #40c057;
    transform: translateY(-2px);
}

/* 步骤指示器 */
.speedtest-steps {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.step-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 15px 10px;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step-item.testing {
    opacity: 1;
    transform: scale(1.1);
}

.step-item.testing .step-icon {
    color: #667eea;
    animation: pulse 1.5s infinite;
}

.step-item.completed {
    opacity: 1;
}

.step-item.completed .step-icon {
    color: #51cf66;
}

.step-icon {
    font-size: 32px;
    margin-bottom: 10px;
    color: #999;
    transition: all 0.3s ease;
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
}

.step-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
}

.step-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    min-height: 24px;
}

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

/* 测试结果 */
.speedtest-results {
    margin-top: 40px;
}

.result-item {
    padding: 15px;
}

.result-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.result-value {
    font-size: 24px;
    font-weight: 700;
}

/* 服务器信息 */
.speedtest-server-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.speedtest-server-info small {
    color: #999;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .speedtest-wrapper {
        padding: 20px 10px;
    }
    
    .speedtest-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .speedtest-title {
        font-size: 28px;
    }
    
    .speedtest-circle-wrapper {
        margin: 30px 0;
    }
    
    .speedtest-circle {
        width: 240px;
        height: 240px;
    }
    
    .speedtest-speed {
        font-size: 36px;
    }
    
    .speedtest-steps {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step-item {
        flex: 1;
        min-width: 100px;
        padding: 15px 5px;
        border-bottom: none;
    }
    
    .step-icon {
        font-size: 28px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .step-value {
        font-size: 16px;
    }
}

/* 加载动画 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}