/* 导入二次元风格字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 二次元风格背景 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #333;
    line-height: 1.6;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border-radius: 0 0 20px 20px;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content h1 {
    font-size: 28px;
    color: #f5576c;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content p {
    font-size: 14px;
    color: #666;
    max-width: 600px;
}

.header-image {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header-image img {
    max-width: 80%;
    max-height: 80%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 主内容样式 */
main {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

/* 表单样式 */
.ping-section {
    margin-bottom: 40px;
}

.ping-form h2 {
    font-size: 22px;
    color: #4facfe;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #f093fb;
}

.form-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f5576c;
    font-size: 16px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.checkbox-group label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    color: #34495e;
    background: rgba(79, 172, 254, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.checkbox-group label:hover {
    background: rgba(79, 172, 254, 0.2);
    border-color: #4facfe;
    transform: translateY(-2px);
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #f5576c;
    transform: scale(1.2);
}

.select-all {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.select-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.local-ip {
    display: inline-block;
    margin-left: 20px;
    color: #666;
    font-size: 14px;
    background: rgba(240, 147, 251, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.test-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-left: 20px;
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.test-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.test-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 推荐线路样式 */
.recommend-section {
    margin-bottom: 40px;
}

.recommend-section h2 {
    font-size: 22px;
    color: #4facfe;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.recommend-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: #4facfe rgba(255, 255, 255, 0.5);
}

.recommend-list::-webkit-scrollbar {
    height: 8px;
}

.recommend-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.recommend-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 10px;
}

.recommend-item {
    flex: 0 0 260px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    backdrop-filter: blur(5px);
}

.recommend-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: #4facfe;
}

.recommend-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.9) 0%, rgba(255, 182, 193, 0.8) 100%);
}

.recommend-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(173, 216, 230, 0.9) 0%, rgba(135, 206, 235, 0.8) 100%);
}

.recommend-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(144, 238, 144, 0.9) 0%, rgba(124, 252, 0, 0.8) 100%);
}

.recommend-item .line-name {
    font-size: 18px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 10px;
}

.recommend-item .region {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.recommend-item .delay {
    font-size: 28px;
    font-weight: 700;
    color: #f5576c;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 结果表格样式 */
.result-section h2 {
    font-size: 22px;
    color: #4facfe;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    background: rgba(240, 147, 251, 0.1);
    border-radius: 15px;
}

.loading img {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.result-table {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 10px;
    backdrop-filter: blur(5px);
}

.result-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-table th,
.result-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.result-table th {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    font-weight: 600;
    color: white;
    position: sticky;
    top: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.result-table tr:hover {
    background: rgba(240, 147, 251, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.result-table .line-name {
    font-weight: 600;
    color: #f5576c;
    font-size: 15px;
}

.result-table .delay {
    color: #f5576c;
    font-weight: 600;
    font-size: 15px;
}

.result-table .packet-loss {
    color: #27ae60;
    font-weight: 600;
    font-size: 15px;
}

.result-table .network-quality {
    width: 120px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图表样式 */
.chart {
    width: 100px;
    height: 25px;
    background-image: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-size: 15px 100%;
    background-repeat: repeat-x;
    border-radius: 5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 24px;
    }
    
    .header-image {
        margin-top: 20px;
        width: 150px;
        height: 150px;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .recommend-list {
        flex-direction: column;
    }
    
    .recommend-item {
        flex: 1;
    }
    
    .local-ip {
        display: block;
        margin-left: 0;
        margin-bottom: 15px;
    }
    
    .test-btn {
        margin-left: 0;
        width: 100%;
    }
    
    main {
        padding: 20px;
    }
}
