/* ========================================
   NetArt 全局样式文件
   统一的科技蓝配色方案
   ======================================== */

:root {
    --primary: #5b6af7;
    --primary-light: #8b95ff;
    --bg: #f0f4fa;
    --card-bg: #ffffff;
    --text-main: #1a2030;
    --text-sub: #6b7a99;
    --border: #e5e9f2;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========================================
   Header 导航栏
   ======================================== */
.header {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.nav { 
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
}

.nav a {
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
    white-space: nowrap;
}

.nav a:hover, .nav a.active {
    background: var(--primary);
    color: #fff;
}

/* ========================================
   Container 容器
   ======================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   Card 卡片
   ======================================== */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* ========================================
   Section Title 区块标题
   ======================================== */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* ========================================
   Buttons 按钮
   ======================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(91, 106, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 106, 247, 0.5);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-main);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

/* ========================================
   Forms 表单
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 106, 247, 0.1);
}

/* ========================================
   Alerts 提示框
   ======================================== */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* ========================================
   Footer 底部
   ======================================== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-sub);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.footer a { 
    color: var(--primary); 
    text-decoration: none; 
}

.footer a:hover {
    text-decoration: underline;
}

.footer-copyright { 
    margin-bottom: 10px; 
}

.footer-icp { 
    margin-bottom: 10px; 
}

.footer-links {
    margin-bottom: 10px;
}

.footer-custom { 
    margin-top: 15px; 
}

/* ========================================
   Friend Links 友情链接
   ======================================== */
.friendlinks-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.friendlinks-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.friendlink-item {
    padding: 8px 16px;
    background: var(--bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    font-size: 14px;
}

.friendlink-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   Ad Sections 广告位
   ======================================== */
.ad-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    text-align: center;
    overflow: hidden;
}

.ad-link {
    display: inline-block;
    width: 100%;
    transition: transform 0.2s;
}

.ad-link:hover {
    transform: scale(1.01);
}

.ad-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.friendlinks-hint {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-left: 10px;
}

/* ========================================
   IP Info Section IP信息区块
   ======================================== */
/* ========================================
   IP Section IP信息区域
   ======================================== */
.ip-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* 公告展示区域 */
.ip-item-full {
    grid-column: 1 / -1;
    min-height: auto;
    background: linear-gradient(135deg, rgba(91, 106, 247, 0.05) 0%, rgba(139, 149, 255, 0.08) 100%);
    border: 1.5px solid rgba(91, 106, 247, 0.15);
}

.home-announcement-wrapper {
    position: relative;
    z-index: 1;
}

.home-announcement-slider {
    overflow: hidden;
    position: relative;
    min-height: 40px;
}

.home-announcement-item {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 5px;
}

.home-announcement-item.active {
    opacity: 1;
    transform: translateY(0);
}

.home-announcement-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.6;
}

.home-announcement-content .announcement-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* IP Header 头部 */
.ip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(91, 106, 247, 0.05) 0%, rgba(139, 149, 255, 0.08) 100%);
    border-radius: 16px;
    border: 1.5px solid rgba(91, 106, 247, 0.15);
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(91, 106, 247, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ip-header:hover {
    border-color: rgba(91, 106, 247, 0.3);
    box-shadow: 0 8px 20px rgba(91, 106, 247, 0.12);
    transform: translateY(-2px);
}

.ip-address-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(91, 106, 247, 0.1);
    transition: all 0.3s ease;
}

.ip-address-wrapper:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(91, 106, 247, 0.2);
    box-shadow: 0 2px 8px rgba(91, 106, 247, 0.1);
}

.ip-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.ip-address {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(91, 106, 247, 0.15);
}

/* IP 模糊效果 */
.ip-address.blurred {
    filter: blur(8px);
    user-select: none;
    cursor: default;
    opacity: 0.6;
}

.ip-toggle-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(91, 106, 247, 0.3);
    overflow: hidden;
}

.ip-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ip-toggle-btn:active::before {
    width: 100px;
    height: 100px;
}

.ip-toggle-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.ip-toggle-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(91, 106, 247, 0.4);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.ip-toggle-btn:hover svg {
    transform: scale(1.1);
}

.ip-toggle-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(91, 106, 247, 0.3);
}

.ip-status {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(91, 106, 247, 0.1);
    transition: all 0.3s ease;
}

.ip-status:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(91, 106, 247, 0.2);
    box-shadow: 0 2px 8px rgba(91, 106, 247, 0.1);
}

.user-type {
    font-size: 0.9rem;
    color: var(--text-main);
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(91, 106, 247, 0.12), rgba(139, 149, 255, 0.12));
    border-radius: 24px;
    font-weight: 600;
    border: 1.5px solid rgba(91, 106, 247, 0.2);
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(91, 106, 247, 0.08);
}

.user-type:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 106, 247, 0.15);
    border-color: rgba(91, 106, 247, 0.3);
}

.status-badge {
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 8px currentColor;
}

.status-badge.online .status-dot {
    background: var(--success);
}

.status-badge.offline .status-dot {
    background: var(--danger);
    animation: none;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.status-badge.online {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.15));
    color: var(--success);
    border: 1.5px solid rgba(34, 197, 94, 0.3);
}

.status-badge.offline {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.15));
    color: var(--danger);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
}

.ip-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

/* Server Info Grid */
.server-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    margin-top: 20px;
}

.server-item {
    background: linear-gradient(135deg, rgba(91, 106, 247, 0.05), rgba(139, 149, 255, 0.08));
    padding: 22px 28px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(91, 106, 247, 0.2);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    flex: 1;
    max-width: 280px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(91, 106, 247, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

/* Server item with chart */
.server-item-chart {
    align-items: center;
    padding: 20px 20px 22px;
}

.server-item-chart .server-item-label {
    margin-bottom: 15px;
}

.chart-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 140px;
}

.chart-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 12px;
    text-align: center;
    word-break: break-word;
    line-height: 1.4;
}

.server-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
}

.server-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 28px rgba(91, 106, 247, 0.15);
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(91, 106, 247, 0.08), rgba(139, 149, 255, 0.12));
}

.server-item:hover::before {
    opacity: 1;
}

.server-item-label {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.server-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--primary);
}

.server-item-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    opacity: 0.6;
}

.server-item-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    word-break: break-word;
    min-height: 1.6em;
}

/* Circular progress ring */
.progress-ring {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: rgba(91, 106, 247, 0.1);
}

.progress-ring-fill {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring-fill.load-chart {
    stroke: #ef4444;
}

.progress-ring-fill.memory-chart {
    stroke: #5b6af7;
}

.progress-text {
    transform: rotate(90deg);
    transform-origin: center;
}

.progress-label {
    transform: rotate(90deg);
    transform-origin: center;
}

/* Heartbeat animation */
.heartbeat-container {
    width: 100%;
    height: 60px;
    position: relative;
    overflow: hidden;
}

.heartbeat-wave {
    width: 100%;
    height: 100%;
}

.heartbeat-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: heartbeat-draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 4px rgba(91, 106, 247, 0.6));
}

@keyframes heartbeat-draw {
    0% {
        stroke-dashoffset: 600;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

.server-status {
    margin-top: 10px;
    width: 100%;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-indicator.online {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-indicator .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.ip-item {
    background: linear-gradient(135deg, rgba(240, 244, 250, 0.9), rgba(255, 255, 255, 0.9));
    padding: 22px 28px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid var(--border);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    flex: 1;
    max-width: 280px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ip-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s;
}

.ip-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 28px rgba(91, 106, 247, 0.15);
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 244, 250, 0.95));
}

.ip-item:hover::before {
    opacity: 1;
}

.ip-item-label {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.ip-item-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    opacity: 0.6;
}

.ip-item-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    word-break: break-word;
    min-height: 1.6em;
}

/* Loading text animation */
.loading-text {
    display: inline-block;
    animation: fade-in 0.3s ease-in;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Speed Panel 测速面板
   ======================================== */
.speed-panel {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.node-select {
    position: relative;
    margin-bottom: 20px;
}

.node-select label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 8px;
}

.node-select select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7a99' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.node-select select:focus {
    outline: none;
    border-color: var(--primary);
}

.thread-control {
    margin-bottom: 20px;
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.thread-header label {
    font-size: 0.85rem;
    color: var(--text-sub);
}

.thread-value {
    background: var(--primary);
    color: #fff;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.thread-hint {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
}

.start-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(91, 106, 247, 0.4);
}

.start-btn:hover { 
    transform: translateY(-2px); 
}

.start-btn.running {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.running-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: var(--text-sub);
    font-size: 0.85rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* ========================================
   Chart 图表
   ======================================== */
.chart-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-sub);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ========================================
   Ranking 排行榜
   ======================================== */
.ranking-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.rank-list { 
    margin-top: 15px; 
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: var(--bg);
    transition: 0.2s;
}

.rank-item:hover { 
    transform: translateX(5px); 
}

.rank-item.top-1 { 
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05)); 
}

.rank-item.top-2 { 
    background: linear-gradient(135deg, rgba(192,192,192,0.15), rgba(192,192,192,0.05)); 
}

.rank-item.top-3 { 
    background: linear-gradient(135deg, rgba(205,127,50,0.15), rgba(205,127,50,0.05)); 
}

.rank-pos { 
    width: 30px; 
    font-weight: bold; 
    text-align: center; 
    color: var(--text-sub); 
}

.rank-user { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
}

.user-name { 
    font-weight: 500; 
}

.user-traffic { 
    color: var(--text-sub); 
    font-size: 0.8rem; 
}

.medal {
    font-size: 1.5rem;
}

.position {
    font-weight: bold;
    color: var(--text-sub);
}

.ranking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.ranking-period {
    text-align: center;
    color: var(--text-sub);
    font-size: 0.85rem;
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-sub);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ========================================
   Auth Pages 认证页面
   ======================================== */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--primary);
    font-size: 2em;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-sub);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-options label {
    color: var(--text-sub);
    cursor: pointer;
}

.form-options input[type="checkbox"] {
    margin-right: 5px;
}

.form-options a {
    color: var(--primary);
    text-decoration: none;
}

.form-options a:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 106, 247, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.third-party-login {
    margin-top: 30px;
    text-align: center;
}

.third-party-login p {
    color: var(--text-sub);
    margin-bottom: 15px;
    position: relative;
}

.third-party-login p::before,
.third-party-login p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}

.third-party-login p::before {
    left: 0;
}

.third-party-login p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-sub);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   User Profile 用户中心
   ======================================== */
.profile-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.profile-info h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.profile-info p {
    opacity: 0.9;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.profile-stat-item {
    background: var(--bg);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.profile-stat-label {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.profile-stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

/* ========================================
   Tools 工具页面
   ======================================== */
.tool-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.tool-input-group input,
.tool-input-group select {
    flex: 1;
}

.tool-result {
    background: var(--bg);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.tool-result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.tool-result-item:last-child {
    border-bottom: none;
}

.tool-result-label {
    color: var(--text-sub);
}

.tool-result-value {
    font-weight: bold;
    color: var(--primary);
}

/* ========================================
   Responsive 响应式
   ======================================== */
@media (max-width: 768px) {
    .header-inner { 
        height: auto; 
        padding: 12px 0; 
    }
    
    .nav { 
        flex-wrap: wrap; 
        justify-content: center; 
    }
    
    .nav a { 
        padding: 6px 12px; 
        font-size: 0.8rem; 
    }
    
    .container {
        padding: 15px;
    }
    
    .card,
    .speed-panel, 
    .ranking-section, 
    .chart-section, 
    .ip-section,
    .friendlinks-section { 
        padding: 20px; 
    }
    
    .ip-section {
        padding: 20px;
    }
    
    .ip-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 16px;
    }
    
    .ip-address-wrapper {
        width: 100%;
    }
    
    .ip-address {
        font-size: 1.2rem;
    }
    
    .ip-status {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ip-grid { 
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .ip-item {
        padding: 14px 12px;
    }
    
    .ip-item-label {
        font-size: 0.7rem;
    }
    
    .ip-item-value {
        font-size: 0.95rem;
    }
    
    /* Server grid responsive */
    .server-grid {
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 15px;
    }
    
    .server-item {
        padding: 14px 12px;
    }
    
    .server-item-label {
        font-size: 0.7rem;
    }
    
    .server-item-value {
        font-size: 0.95rem;
    }
    
    .stats-grid { 
        grid-template-columns: 1fr; 
    }
    
    .friendlinks-section {
        padding: 18px;
    }
    
    .auth-box {
        padding: 25px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .ip-main-address {
        font-size: 1.2rem;
    }
    
    .ip-grid {
        grid-template-columns: 1fr;
    }
    
    .ip-address {
        font-size: 1.1rem;
    }
}
