/* 
龙腾测速 by：龙毅
QQ：825703967
*/
        :root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #ff6b6b;
            --dark: #1e293b;
            --darker: #0f172a;
            --light: #f8fafc;
            --text: #1e293b;
            --text-light: #64748b;
            --success: #10b981;
            --warning: #f59e0b;
            --card-bg: #ffffff;
            --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --border: #e2e8f0;
            --speed-start: #4361ee;
            --speed-end: #3a0ca3;
        }

        [data-theme="dark"] {
            --primary: #5eead4;
            --primary-dark: #2dd4bf;
            --secondary: #ff8fa3;
            --dark: #f1f5f9;
            --darker: #f8fafc;
            --light: #0f172a;
            --text: #f1f5f9;
            --text-light: #94a3b8;
            --success: #6ee7b7;
            --warning: #fcd34d;
            --card-bg: #1e293b;
            --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            --border: #334155;
        }

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

        body {
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, var(--darker), var(--dark));
            color: var(--text);
            min-height: 100vh;
            padding: 20px 15px;
            transition: background 0.3s ease;
        }

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

        .header {
            text-align: center;
            padding: 20px 0 40px;
            position: relative;
        }

        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-bottom: 10px;
        }

        .logo i {
            font-size: 36px;
            color: var(--primary);
            background: linear-gradient(120deg, var(--speed-start), var(--speed-end));
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        h1 {
            font-size: 40px;
            font-weight: 800;
            background: linear-gradient(90deg, var(--speed-start), var(--speed-end));
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 8px;
            letter-spacing: 1px;
        }

        .subtitle {
            color: var(--text-light);
            font-size: 18px;
            margin-bottom: 30px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .theme-toggle {
            position: absolute;
            top: 10px;
            right: 10px;
            background: transparent;
            border: none;
            color: var(--text);
            font-size: 24px;
            cursor: pointer;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .theme-toggle:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .card {
            background: var(--card-bg);
            border-radius: 20px;
            box-shadow: var(--card-shadow);
            padding: 25px;
            margin-bottom: 25px;
            border: 1px solid var(--border);
            transition: all 0.3s ease;
        }

        .card-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text);
        }

        .card-title i {
            color: var(--primary);
        }

        .control-section {
            text-align: center;
            margin-bottom: 30px;
        }

        .speed-results {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
        }

        .result-card {
            padding: 25px;
            background: linear-gradient(145deg, rgba(67, 97, 238, 0.05), rgba(58, 12, 163, 0.05));
            border-radius: 18px;
            border: 1px solid var(--border);
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
        }

        .result-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }

        .result-type {
            font-size: 16px;
            font-weight: 500;
            margin-bottom: 10px;
            color: var(--text-light);
        }

        .result-value {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 8px;
            color: var(--text);
        }

        .ping-jitter {
            display: flex;
            justify-content: space-around;
            gap: 15px;
            margin: 15px 0;
        }

        .ping-jitter > div {
            flex: 1;
            text-align: center;
            padding: 15px;
            background-color: rgba(255, 255, 255, 0.03);
            border-radius: 12px;
            border: 1px solid var(--border);
        }

        .unit {
            font-size: 16px;
            font-weight: 500;
            color: var(--text-light);
            text-transform: uppercase;
        }

        .value {
            font-size: 28px;
            font-weight: 700;
            color: var(--text);
            margin: 8px 0 5px;
        }

        .label {
            font-size: 14px;
            color: var(--text-light);
        }

        #ipArea {
            text-align: center;
            padding: 18px;
            font-size: 16px;
            color: var(--text-light);
            border-radius: 14px;
            background-color: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border);
            margin: 20px 0;
        }

        .history-section {
            margin-top: 40px;
        }

        .history-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 20px;
        }

        .history-item {
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 20px;
            transition: all 0.3s ease;
        }

        .history-item:hover {
            transform: translateY(-3px);
            box-shadow: var(--card-shadow);
        }

        .history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            border-bottom: 1px solid var(--border);
            padding-bottom: 10px;
        }

        .history-time {
            font-size: 14px;
            color: var(--text-light);
        }

        .history-stat {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .history-stat-name {
            color: var(--text-light);
            font-size: 14px;
        }

        .history-stat-value {
            font-weight: 600;
            color: var(--text);
        }

        .history-actions {
            margin-top: 15px;
            display: flex;
            justify-content: space-between;
        }

        .btn {
            display: inline-block;
            padding: 14px 28px;
            border-radius: 14px;
            font-weight: 600;
            font-size: 18px;
            cursor: pointer;
            text-align: center;
            border: none;
            transition: all 0.3s ease;
        }

        .btn-primary {
            background: linear-gradient(120deg, var(--speed-start), var(--speed-end));
            color: white;
            box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--primary);
            color: var(--primary);
        }

        .btn-outline:hover {
            background-color: rgba(67, 97, 238, 0.1);
        }

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

        .btn-block {
            display: block;
            width: 100%;
        }

        .running {
            background: linear-gradient(120deg, #ff6b6b, #ff3e3e);
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.5); }
            70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
            100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
        }

        .footer {
            text-align: center;
            padding: 30px 0 20px;
            margin-top: 40px;
            color: var(--text-light);
            font-size: 14px;
            border-top: 1px solid var(--border);
        }

        .footer a {
            color: var(--primary);
            text-decoration: none;
        }

        .footer a:hover {
            text-decoration: underline;
        }

        .meter {
            width: 100%;
            height: 20px;
            background-color: rgba(0, 0, 0, 0.05);
            border-radius: 10px;
            margin: 15px 0;
            overflow: hidden;
            border: 1px solid var(--border);
        }

        .meter-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--speed-start), var(--speed-end));
            transition: width 0.5s ease;
        }

        @media (max-width: 768px) {
            .speed-results {
                grid-template-columns: 1fr;
            }

            .ping-jitter {
                flex-direction: column;
            }

            h1 {
                font-size: 32px;
            }

            .result-value {
                font-size: 30px;
            }

            .btn {
                padding: 12px 20px;
                font-size: 16px;
            }
        }

        @media (max-width: 480px) {
            .logo {
                gap: 10px;
            }

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

            h1 {
                font-size: 28px;
            }

            .result-value {
                font-size: 26px;
            }

            .btn {
                padding: 10px 16px;
                font-size: 14px;
            }
        }