

:root {
    --primary: #0066ff;
    --primary-light: #4d94ff;
    --secondary: #8a2be2;
    --accent: #00c7ff;
    --bg-light: #ffffff;
    --bg-card: #f8faff;
    --text-dark: #1a1a2e;
    --text-medium: #4a4a6a;
    --text-light: #7a7a9a;
    --border-light: #e6e9ff;
    --success: #00c853;
    --warning: #ff9800;
    --danger: #ff4757;
    --shadow-light: rgba(0, 102, 255, 0.05);
    --shadow-medium: rgba(0, 102, 255, 0.1);
    --shadow-card: rgba(0, 102, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    font-family: 'Exo 2', sans-serif;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 102, 255, 0.015) 0%, transparent 15%),
        radial-gradient(circle at 90% 80%, rgba(138, 43, 226, 0.015) 0%, transparent 15%);
}

.tech-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 102, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 102, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    opacity: 0.4;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 20px;
    position: relative;
    z-index: 1;
}

/* 紧凑居中头部区域 */
.main-header {
    margin-bottom: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

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

.logo-icon {
    font-size: 24px;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pulse 2s infinite alternate;
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 1.2px;
}

.permanent-address {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: 0 3px 8px var(--shadow-light);
    margin-top: 5px;
}

.address-label {
    color: var(--text-medium);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.address {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

/* 紧凑检测控制区域 */
.detection-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 12px 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 3px 8px var(--shadow-light);
    margin-bottom: 15px;
    width: 100%;
    max-width: 750px;
}

.stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.detect-all-btn {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 3px 8px rgba(0, 102, 255, 0.15);
}

.detect-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 102, 255, 0.2);
}

/* 更小的线路卡片区域 */
.lines-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin: 20px 0;
}

.line-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 12px var(--shadow-card);
    cursor: pointer;
    height: 135px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.line-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.line-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.02), rgba(0, 199, 255, 0.02));
    opacity: 0;
    transition: opacity 0.3s;
}

.line-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 20px var(--shadow-medium);
}

.line-card:hover::after {
    opacity: 1;
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.line-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 7px;
}

.line-icon {
    font-size: 15px;
    color: var(--primary);
}

.line-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
    background: white;
}

.status-normal {
    color: var(--success);
    border: 1px solid rgba(0, 200, 83, 0.2);
    background: rgba(0, 200, 83, 0.05);
}

.status-loading {
    color: var(--warning);
    border: 1px solid rgba(255, 152, 0, 0.2);
    background: rgba(255, 152, 0, 0.05);
}

.status-error {
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
    background: rgba(255, 71, 87, 0.05);
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.status-normal .status-dot {
    background-color: var(--success);
    box-shadow: 0 0 5px rgba(0, 200, 83, 0.4);
    animation: pulse-green 2s infinite;
}

.status-loading .status-dot {
    background-color: var(--warning);
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.4);
    animation: pulse-yellow 1s infinite;
}

.status-error .status-dot {
    background-color: var(--danger);
    box-shadow: 0 0 5px rgba(255, 71, 87, 0.4);
    animation: pulse-red 1.5s infinite;
}

.line-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.line-speed {
    font-size: 13px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 6px;
}

.speed-value {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.line-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.line-ping {
    font-size: 13px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ping-value {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 15px;
}

/* 更小的科技风按钮 */
.tech-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 102, 255, 0.2);
    animation: breathe 2s infinite ease-in-out;
    position: relative;
    overflow: hidden;
}

.tech-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.tech-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0, 102, 255, 0.3);
    animation: none;
}

.tech-btn:hover::before {
    left: 100%;
}

.click-hint {
    text-align: center;
    margin: 25px 0;
    padding: 14px;
    font-size: 15px;
    color: var(--text-medium);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.click-hint::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.click-hint::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* 收藏提示 */
.bookmark-hint {
    text-align: center;
    margin-top: 25px;
    padding: 12px;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* 动画定义 */
@keyframes pulse {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

@keyframes breathe {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(0, 102, 255, 0.2);
    }
    50% { 
        transform: scale(1.03);
        box-shadow: 0 5px 14px rgba(0, 102, 255, 0.25);
    }
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

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

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .container {
        padding: 8px 15px;
    }
    
    .detection-section {
        padding: 10px 15px;
        max-width: 100%;
    }
    
    .stats-bar {
        gap: 15px;
    }
    
    .lines-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .line-card {
        height: 130px;
        padding: 16px;
    }
    
    .stat-item {
        min-width: 70px;
    }
    
    .stat-value {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }
    
    .logo-icon {
        font-size: 22px;
    }
    
    .permanent-address {
        padding: 6px 14px;
    }
    
    .lines-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stats-bar {
        gap: 10px;
        justify-content: center;
        width: 100%;
    }
    
    .stat-item {
        min-width: 65px;
    }
    
    .stat-value {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .click-hint {
        font-size: 14px;
        padding: 12px;
        margin: 20px 0;
    }
    
    .bookmark-hint {
        font-size: 13px;
        padding: 10px;
        margin-top: 20px;
    }
    
    .tech-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .detect-all-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 360px) {
    .line-card {
        height: 125px;
        padding: 14px;
    }
    
    .line-name {
        font-size: 16px;
    }
    
    .ping-value, .speed-value {
        font-size: 14px;
    }
    
    .tech-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .permanent-address {
        padding: 6px 12px;
    }
    
    .address {
        font-size: 14px;
    }
}