:root {
    /* 深色模式变量 */
    --primary: #4f6df5;
    --primary-light: #6b8aff;
    --primary-dark: #3a56e6;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --bg-light: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(30, 41, 59, 0.8);
    --border-radius: 16px;
    --shadow-sm: 0 4px 12px rgba(148, 163, 184, 0.1);
    --shadow-md: 0 8px 24px rgba(148, 163, 184, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --tech-glow: 0 0 10px rgba(79, 109, 245, 0.5);
    --tech-glow-hover: 0 0 20px rgba(79, 109, 245, 0.8);
    --tech-border: 1px solid rgba(79, 109, 245, 0.3);
    --tech-grid: linear-gradient(rgba(79, 109, 245, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 109, 245, 0.1) 1px, transparent 1px);
    --warning-bg: #fff3f3;
    --warning-border: #fecaca;
    --light-text-primary: #1e293b;
    --light-text-secondary: #475569;
    --light-text-muted: #64748b;
    --light-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --light-card-bg: rgba(255, 255, 255, 0.9);
    --light-shadow-sm: 0 4px 12px rgba(30, 41, 59, 0.05);
    --light-shadow-md: 0 8px 24px rgba(30, 41, 59, 0.1);
    --light-tech-glow: 0 0 10px rgba(79, 109, 245, 0.2);
    --light-tech-glow-hover: 0 0 20px rgba(79, 109, 245, 0.3);
    --light-tech-border: 1px solid rgba(79, 109, 245, 0.1);
    --light-tech-grid: linear-gradient(rgba(79, 109, 245, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 109, 245, 0.05) 1px, transparent 1px);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    box-shadow: var(--shadow-sm), var(--tech-glow);
    border: var(--tech-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md), var(--tech-glow-hover);
}

.theme-toggle i {
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: var(--transition);
}

body.light-mode {
    --text-primary: var(--light-text-primary);
    --text-secondary: var(--light-text-secondary);
    --text-muted: var(--light-text-muted);
    --bg-light: var(--light-bg);
    --card-bg: var(--light-card-bg);
    --shadow-sm: var(--light-shadow-sm);
    --shadow-md: var(--light-shadow-md);
    --tech-glow: var(--light-tech-glow);
    --tech-glow-hover: var(--light-tech-glow-hover);
    --tech-border: var(--light-tech-border);
    --tech-grid: var(--light-tech-grid);
}

body.light-mode .theme-toggle {
    background: var(--light-card-bg);
    box-shadow: var(--light-shadow-sm), var(--light-tech-glow);
    border: var(--light-tech-border);
}

body.light-mode .theme-toggle:hover {
    box-shadow: var(--light-shadow-md), var(--light-tech-glow-hover);
}

body.light-mode .theme-toggle i {
    color: var(--light-text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-light), var(--tech-grid);
    background-size: 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

main {
    width: 100%;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(90deg, #4f6df5 0%, #3a56e6 100%);
    color: white;
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(79, 109, 245, 0.3), var(--tech-glow);
    position: relative;
    overflow: hidden;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 109, 245, 0.4), var(--tech-glow-hover);
}

.back-button::before {
    content: "< ";
    margin-right: 8px;
}

.back-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: rotate(30deg) translateX(-100%);
    }

    100% {
        transform: rotate(30deg) translateX(100%);
    }
}

h1 {
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin: 0 0 2.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: (rem);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(79, 109, 245, 0.5);
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 3px;
    animation: lineGrow 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    box-shadow: 0 0 15px var(--primary);
    animation: glowPulse 2s infinite alternate;
}

@keyframes lineGrow {
    from {
        width: 0;
    }

    to {
        width: 100px;
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px var(--primary);
    }

    100% {
        box-shadow: 0 0 20px var(--primary);
    }
}

h2 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    margin: 2.5rem 0 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1.2rem;
}

h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary);
}

h3 {
    font-size: clamp(1.3rem, 3.5vw, 1.5rem);
    margin: 2rem 0 1.2rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 24px;
}

h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 2px;
}

.content-section {
    margin-bottom: 3rem;
    position: relative;
}

.content-section::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    box-shadow: 0 0 10px var(--primary);
}

.text {
    font-size: clamp(1rem, 3vw, 1.1rem);
    color: var(--text-secondary);
    padding: 1.8rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm), var(--tech-glow);
    transition: var(--transition);
    line-height: 1.9;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    text-indent: 2em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--tech-border);
}

.text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: height 0.4s ease;
}

.text:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), var(--tech-glow-hover);
}

.text:hover::before {
    height: 100%;
}

.text p {
    margin-bottom: 1rem;
    text-indent: 2em;
    position: relative;
    z-index: 2;
}

.text p:last-child {
    margin-bottom: 0;
}

.error-code {
    font-family: 'Fira Code', monospace;
    background: rgba(255, 245, 245, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    color: #fc8181;
    font-weight: 600;
    border: 1px solid rgba(252, 129, 129, 0.3);
    display: inline-block;
}

a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.danger {
    margin: 2rem 0;
    padding: 1.8rem;
    background-color: rgba(255, 245, 245, 0.1);
    border-left: 5px solid #fc8181;
    border-radius: 12px;
    color: #fc8181;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(252, 129, 129, 0.1), var(--tech-glow);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: #fc8181;
    transition: height 0.4s ease;
}

.danger:hover {
    transform: scale(1.005);
    box-shadow: 0 6px 18px rgba(252, 129, 129, 0.1), var(--tech-glow-hover);
}

.danger:hover::before {
    height: 100%;
}

.danger p {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.danger p:last-child {
    margin-bottom: 0;
}

.warning {
    padding: 1.8rem;
    background: rgba(255, 249, 219, 0.1);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm), var(--tech-glow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-left: 5px solid #ffd43b;
    color: #ffd43b;
    backdrop-filter: blur(5px);
}

.warning:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--tech-glow-hover);
}

.warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: #ffd43b;
    transition: height 0.4s ease;
}

.warning:hover::before {
    height: 100%;
}

.warning p {
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.warning p:last-child {
    margin-bottom: 0;
}

.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md), var(--tech-glow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(79, 109, 245, 0.4), var(--tech-glow-hover);
    background: var(--primary-dark);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    body {
        padding: 2rem 1rem;
        background-size: 15px 15px;
    }

    h1 {
        margin: 0 0 1.5rem;
        padding-bottom: 1rem;
    }

    h1::after {
        width: 80px;
        height: 4px;
    }

    h2 {
        font-size: 1.4rem;
        margin: 2rem 0 1.2rem;
        padding-left: 24px;
    }

    h2::before {
        width: 6px;
        height: 28px;
    }

    h3 {
        font-size: 1.3rem;
        margin: 1.8rem 0 1rem;
        padding-left: 20px;
    }

    h3::before {
        width: 5px;
        height: 16px;
    }

    .text {
        font-size: 1rem;
        padding: 1.5rem;
    }

    .back-button {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .danger .warning {
        font-size: 0.95rem;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .back-button {
        display: none;
    }
}