/* ===== CSS Variables ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f7f9;
    --bg-tertiary: #eef0f4;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --accent-green: #10b981;
    --accent-green-light: #d1fae5;
    --accent-green-bg: #ecfdf5;
    --accent-blue: #3b82f6;
    --accent-blue-light: #dbeafe;
    --accent-blue-bg: #eff6ff;
    --accent-amber: #f59e0b;
    --accent-amber-light: #fef3c7;
    --accent-amber-bg: #fffbeb;
    --accent-red: #ef4444;
    --accent-red-light: #fee2e2;
    --accent-red-bg: #fef2f2;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #ede9fe;
    --accent-cyan: #06b6d4;
    --accent-cyan-light: #cffafe;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.1);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    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: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}

.nav a:hover { color: var(--text-primary); }

.nav a.active {
    color: var(--accent-blue);
    font-weight: 600;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-blue);
    border-radius: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
}

/* ===== Main Container ===== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ===== Hero Section ===== */
.hero {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(59,130,246,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero h1 span {
    background: linear-gradient(135deg, #3b82f6, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 580px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.search-box {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-light), var(--shadow-md);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 16px;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.search-box input::placeholder { color: var(--text-tertiary); }

.search-box button {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.search-box button:hover {
    opacity: 0.92;
    box-shadow: -4px 0 12px rgba(59,130,246,0.2);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.stat-card:nth-child(1)::before { background: var(--accent-blue); }
.stat-card:nth-child(2)::before { background: var(--accent-green); }
.stat-card:nth-child(3)::before { background: var(--accent-amber); }
.stat-card:nth-child(4)::before { background: var(--text-primary); }

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up { color: var(--accent-green); }
.stat-change.down { color: var(--accent-red); }
.stat-change.neutral { color: var(--text-tertiary); }

/* ===== Section Title ===== */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

/* ===== Tools Grid ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.tool-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.tool-card:hover .tool-icon { transform: scale(1.1); }

.tool-icon.blue { background: var(--accent-blue-light); }
.tool-icon.green { background: var(--accent-green-light); }
.tool-icon.amber { background: var(--accent-amber-light); }
.tool-icon.purple { background: var(--accent-purple-light); }
.tool-icon.red { background: var(--accent-red-light); }
.tool-icon.cyan { background: var(--accent-cyan-light); }

.tool-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Monitor Table ===== */
.monitor-table {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 28px;
}

.monitor-header {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 0.8fr 100px;
    padding: 14px 24px;
    background: var(--bg-secondary);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.monitor-row {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 0.8fr 100px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    align-items: center;
    font-size: 14px;
    transition: var(--transition);
}

.monitor-row:hover { background: var(--bg-secondary); }

.domain-name {
    font-weight: 600;
    color: var(--text-primary);
}

.domain-name span {
    color: var(--text-tertiary);
    font-weight: 400;
    font-size: 12px;
    display: block;
    margin-top: 3px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.green { background: var(--accent-green-light); color: #065f46; }
.badge.amber { background: var(--accent-amber-light); color: #92400e; }
.badge.red { background: var(--accent-red-light); color: #991b1b; }
.badge.blue { background: var(--accent-blue-light); color: #1e40af; }
.badge.gray { background: var(--bg-tertiary); color: var(--text-secondary); }

.score {
    font-weight: 800;
    font-size: 16px;
}

.score.high { color: var(--accent-green); }
.score.mid { color: var(--accent-amber); }
.score.low { color: var(--accent-red); }

.uptime-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    width: 80px;
}

.uptime-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.uptime-fill.high { background: var(--accent-green); }
.uptime-fill.mid { background: var(--accent-amber); }
.uptime-fill.low { background: var(--accent-red); }

/* ===== Article List ===== */
.article-list {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 28px;
}

.article-item {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.article-item:last-child { border-bottom: none; }

.article-item:hover { background: var(--bg-secondary); }

.article-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    transition: color 0.2s;
}

.article-item:hover .article-title { color: var(--accent-blue); }

.article-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.article-tag {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.article-item:hover .article-tag {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
}

/* ===== Feature Banner ===== */
.feature-banner {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 28px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.feature-banner h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-banner p {
    color: #94a3b8;
    font-size: 14px;
    max-width: 500px;
    line-height: 1.6;
}

.feature-banner .btn {
    background: white;
    color: #0f172a;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.feature-banner .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255,255,255,0.2);
}

/* ===== Tool Page Styles ===== */
.tool-page-header {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.tool-page-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.tool-page-header p {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 600px;
}

.tool-input-area {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.tool-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.tool-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.tool-input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-light);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
    white-space: nowrap;
}

.btn-primary:hover {
    opacity: 0.92;
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

/* ===== Result Cards ===== */
.result-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 28px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.result-card-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
}

.result-status.pass {
    background: var(--accent-green-light);
    color: #065f46;
}

.result-status.warn {
    background: var(--accent-amber-light);
    color: #92400e;
}

.result-status.fail {
    background: var(--accent-red-light);
    color: #991b1b;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.result-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.result-item-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.result-item-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-item-value.success { color: var(--accent-green); }
.result-item-value.warn { color: var(--accent-amber); }
.result-item-value.fail { color: var(--accent-red); }

/* ===== Score Ring ===== */
.score-ring-container {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.score-ring svg {
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.score-ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.score-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 800;
}

.score-ring-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
}

.score-details {
    flex: 1;
}

.score-details h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.score-details p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Checklist ===== */
.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.checklist li:last-child { border-bottom: none; }

.checklist-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.checklist-icon.pass {
    background: var(--accent-green-light);
    color: var(--accent-green);
}

.checklist-icon.warn {
    background: var(--accent-amber-light);
    color: var(--accent-amber);
}

.checklist-icon.fail {
    background: var(--accent-red-light);
    color: var(--accent-red);
}

.checklist-text {
    flex: 1;
}

.checklist-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.checklist-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== DNS Records Table ===== */
.dns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dns-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-secondary);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dns-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
}

.dns-table tr:hover td {
    background: var(--bg-secondary);
}

.dns-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
}

.dns-type.a { background: var(--accent-blue-light); color: var(--accent-blue); }
.dns-type.cname { background: var(--accent-purple-light); color: var(--accent-purple); }
.dns-type.mx { background: var(--accent-amber-light); color: var(--accent-amber); }
.dns-type.txt { background: var(--accent-green-light); color: var(--accent-green); }
.dns-type.ns { background: var(--accent-cyan-light); color: var(--accent-cyan); }

/* ===== Speed Test Nodes ===== */
.speed-nodes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.speed-node {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.speed-node:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.speed-node-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.speed-node-isp {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.speed-node-time {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.speed-node-time.fast { color: var(--accent-green); }
.speed-node-time.mid { color: var(--accent-amber); }
.speed-node-time.slow { color: var(--accent-red); }

.speed-node-unit {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ===== Blog Article Page ===== */
.article-page {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 48px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.article-page-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.article-page-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    margin-bottom: 16px;
}

.article-page h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.article-page-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.article-page-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-page-body h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bg-secondary);
}

.article-page-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 24px 0 12px;
}

.article-page-body p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.article-page-body ul, .article-page-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article-page-body li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.article-page-body code {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    color: var(--accent-red);
}

.article-page-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

.article-page-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-page-body blockquote {
    border-left: 4px solid var(--accent-blue);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== Guide Page ===== */
.guide-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

.guide-toc {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.guide-toc h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.guide-toc ul {
    list-style: none;
}

.guide-toc li {
    margin-bottom: 8px;
}

.guide-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}

.guide-toc a:hover { color: var(--accent-blue); }

.guide-section {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.guide-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.guide-section ol, .guide-section ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.guide-section li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}

.guide-section li strong {
    color: var(--text-primary);
}

/* ===== About / Privacy / Terms Pages ===== */
.legal-page {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 48px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.legal-page .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.legal-page h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 12px;
}

.legal-page p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.legal-page ul {
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-page li {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ===== Contact Page ===== */
.contact-form {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 32px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    font-family: var(--font-sans);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-light);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== API Page ===== */
.api-endpoint {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.api-method {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    font-family: monospace;
    margin-right: 8px;
}

.api-method.get { background: var(--accent-green-light); color: var(--accent-green); }
.api-method.post { background: var(--accent-blue-light); color: var(--accent-blue); }

.api-path {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.api-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 12px 0;
}

.api-params {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 12px;
}

.api-params h4 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-params table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse;
}

.api-params th {
    text-align: left;
    padding: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.api-params td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
    margin-top: 48px;
    padding: 32px 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-primary); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-banner { flex-direction: column; text-align: center; }
    .feature-banner p { max-width: 100%; }
    .result-grid { grid-template-columns: 1fr; }
    .speed-nodes { grid-template-columns: repeat(2, 1fr); }
    .score-ring-container { flex-direction: column; text-align: center; }
    .article-page { padding: 32px 24px; }
    .legal-page { padding: 32px 24px; }
    .guide-layout { grid-template-columns: 1fr; }
    .guide-toc { position: static; }
}

@media (max-width: 640px) {
    .header-inner { padding: 0; }
    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        padding: 16px 24px;
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid var(--border-color);
        z-index: 99;
        flex-direction: column;
        gap: 16px;
    }
    .nav.show { display: flex; }
    .mobile-menu-btn { display: block; }
    .hero { padding: 36px 20px; }
    .hero h1 { font-size: 26px; }
    .stats-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .monitor-header, .monitor-row { grid-template-columns: 1.5fr 1fr 80px; }
    .monitor-header > :nth-child(3), .monitor-header > :nth-child(4), .monitor-header > :nth-child(5),
    .monitor-row > :nth-child(3), .monitor-row > :nth-child(4), .monitor-row > :nth-child(5) { display: none; }
    .article-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .speed-nodes { grid-template-columns: 1fr; }
    .tool-input-group { flex-direction: column; }
    .tool-page-header { padding: 28px 20px; }
    .tool-page-header h1 { font-size: 22px; }
}

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

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hidden class for JS toggling */
.hidden { display: none !important; }

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.loading-overlay.hidden { display: none; }

.loading-content {
    text-align: center;
}

.loading-content .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin-bottom: 16px;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 14px;
}
