/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    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: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==================== 头部 ==================== */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.logo h1 {
    font-size: 32px;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
}

/* ==================== 卡片样式 ==================== */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.card-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #333;
}

.card-desc {
    font-size: 14px;
    color: #666;
}

.card-body {
    padding: 24px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

/* ==================== 测速结果 ==================== */
.speed-results {
    margin-top: 20px;
}

.speed-category {
    margin-bottom: 20px;
}

.speed-category-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 4px solid #667eea;
}

.speed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.speed-item:hover {
    background: #e9ecef;
}

.speed-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.speed-status {
    font-size: 20px;
}

.speed-name {
    font-weight: 600;
    color: #333;
}

.speed-value {
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.speed-value.excellent {
    background: #d1fae5;
    color: #065f46;
}

.speed-value.good {
    background: #fef3c7;
    color: #92400e;
}

.speed-value.normal {
    background: #fed7aa;
    color: #9a3412;
}

.speed-value.slow {
    background: #fecaca;
    color: #991b1b;
}

.speed-value.offline {
    background: #e5e7eb;
    color: #6b7280;
}

/* ==================== URL列表 ==================== */
.url-list {
    display: grid;
    gap: 12px;
}

.url-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
}

.url-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.url-item.recommended {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid #667eea;
}

.url-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.url-status {
    font-size: 20px;
}

.url-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.url-name {
    font-weight: 600;
    color: #333;
}

.url-speed {
    font-size: 13px;
    color: #666;
}

.url-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.url-item-right {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
}

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

.btn-enter:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==================== 下载区域 ==================== */
.download-section {
    text-align: center;
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.btn-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: #f8f9fa;
    color: #333;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-download:hover {
    background: #e9ecef;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.btn-download .icon {
    width: 48px;
    height: 48px;
}

.btn-download .text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.btn-download strong {
    font-size: 16px;
    color: #333;
}

.btn-download small {
    font-size: 12px;
    color: #666;
}

.btn-android {
    color: #3ddc84;
}

.btn-android .icon {
    color: #3ddc84;
}

.btn-android:hover {
    background: linear-gradient(135deg, #3ddc84 0%, #2bb968 100%);
    color: white;
}

.btn-android:hover .icon,
.btn-android:hover strong,
.btn-android:hover small {
    color: white;
}

.btn-ios {
    color: #007aff;
}

.btn-ios .icon {
    color: #007aff;
}

.btn-ios:hover {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: white;
}

.btn-ios:hover .icon,
.btn-ios:hover strong,
.btn-ios:hover small {
    color: white;
}

.qrcode-section {
    margin: 24px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.qrcode-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.qrcode-container {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-container img {
    display: block;
    width: 200px;
    height: 200px;
}

.qrcode-hint {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

.download-info {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.download-info .version {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.download-info .hint {
    font-size: 13px;
    color: #666;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    margin-bottom: 8px;
}

.empty-state .hint {
    font-size: 13px;
    color: #bbb;
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 24px;
    color: white;
    opacity: 0.8;
}

.footer p {
    margin-bottom: 4px;
}

.footer-hint {
    font-size: 13px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .header {
        margin-bottom: 20px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 14px;
    }

    .card {
        margin-bottom: 16px;
    }

    .card-header,
    .card-body {
        padding: 16px;
    }

    .card-header h2 {
        font-size: 18px;
    }

    .download-buttons {
        grid-template-columns: 1fr;
    }

    .url-item-right {
        flex-direction: column;
    }

    .btn-small {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        width: 60px;
        height: 60px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .btn-download .icon {
        width: 40px;
        height: 40px;
    }

    .qrcode-container img {
        width: 160px;
        height: 160px;
    }
}

