/* ===== CSS Variables ===== */
:root {
    --primary: #3366ff;
    --primary-dark: #1a4bcc;
    --hint: #888888;
    --placeholder: #2a2a2a;
    --bg-glass: rgba(255, 255, 255, 0.5);
    --blur: blur(6px);
    --radius: 20px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    position: relative;
    min-height: 100vh;
}

body {
    background-image: url('../png/背景.webp');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0a0c0f;
    color: #e0e0e0;
    font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1c20; }
::-webkit-scrollbar-thumb { background: #3366ff; border-radius: 10px; }

/* ===== Scroll Animation（0.7s） ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Header & Nav ===== */
header {
    background-color: rgba(10, 12, 15, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
header.scrolled {
    background-color: rgba(5, 7, 10, 0.92);
    padding: 10px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #3366ff, #66ccff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo img {
    height: 50px;
    margin-right: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid rgba(51,102,255,0.3);
}
.logo img:hover { transform: rotate(10deg); }

.nav-links {
    display: flex;
    list-style: none;
}
.nav-links li { margin-left: 25px; }
.nav-links a {
    color: #ddd;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    padding: 8px 15px;
    border-radius: 30px;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3366ff;
    transition: 0.2s;
}
.nav-links a:hover {
    color: #3366ff;
    background-color: rgba(51,102,255,0.1);
}
.nav-links a:hover::after { width: 100%; }

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background-color: rgba(51,102,255,0.1);
    padding: 8px 15px;
    border-radius: 30px;
    transition: 0.2s;
}
.mobile-menu:hover { background-color: rgba(51,102,255,0.2); }

/* ===== Hero ===== */
.hero {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('../png/背景1.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 0 20px;
    margin: 20px auto;
    max-width: 1100px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    border-radius: 20px;
}
.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
    border-radius: 20px;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
}
.hero-content h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(145deg, #ffffff, #6699ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(51,102,255,0.5);
    opacity: 0;
    transform: translateY(40px);
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    opacity: 0;
    transform: translateY(40px);
}
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.hero-buttons .btn {
    opacity: 0;
    transform: translateY(40px);
}

/* ===== Buttons（悬停上浮） ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 60px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(20,20,30,0.9);
    border: 1px solid #3366ff;
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
    margin: 0;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

.btn-primary {
    background: #3366ff;
    border: none;
    color: black;
    box-shadow: 0 0 12px #3366ff;
}
.btn-primary:hover {
    background: #5588ff;
    box-shadow: 0 0 25px #3366ff, 0 8px 20px rgba(0,0,0,0.25) !important;
}

.btn-outline {
    background-color: transparent;
    color: #3366ff;
}
.btn-outline:hover {
    background: #3366ff;
    color: black;
    border-color: #3366ff;
}

/* ===== Sections ===== */
.about, .features, .rules, .server-join-section, .contact {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    border-radius: 48px;
    margin: 30px auto;
    padding: 60px 0;
    max-width: 1100px;
    transition: all 0.3s;
}
.about:hover, .features:hover, .rules:hover, .server-join-section:hover, .contact:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    background: linear-gradient(135deg, #fff, #88aaff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}
.section-title::after {
    content: '';
    width: 80px;
    height: 3px;
    background-color: #3366ff;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.about-content, .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 20px;
}
.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #3366ff;
}
.about-image img {
    border-radius: 20px;
    border: 1px solid rgba(51,102,255,0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 20px;
}
.feature-card, .rule-item {
    background: rgba(15,15,25,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px;
    padding: 28px 20px;
    text-align: center;
    transition: 0.25s;
}
.feature-card:hover, .rule-item:hover {
    transform: translateY(-8px);
    border-color: #3366ff;
    box-shadow: 0 15px 30px rgba(51,102,255,0.2);
}
.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #5588ff;
}
.feature-card h3, .rule-item h3 {
    margin-bottom: 15px;
    color: #3366ff;
}
.rule-item {
    text-align: left;
    border-left: 5px solid #3366ff;
}

/* ===== Join ===== */
.server-address {
    background-color: rgba(0,0,0,0.6);
    padding: 15px 25px;
    border-radius: 50px;
    margin: 20px auto;
    max-width: 600px;
    border: 1px solid #3366ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.server-address p {
    font-size: 1.2rem;
    color: #e0e0e0;
}
.server-address span {
    color: #3366ff;
    font-weight: bold;
}
.copy-btn {
    background: #3366ff;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    color: black;
}
.copy-btn:hover {
    background: #5588ff;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 6px 16px rgba(51, 102, 255, 0.3) !important;
}

.version-tip {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 10px;
}

.server-status {
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: rgba(0,0,0,0.5);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border: 1px solid #3366ff;
}
.status-online { color: #33ff66; font-weight: bold; }
.status-offline { color: #ff5252; font-weight: bold; }
.refresh-status-btn {
    background: none;
    border: none;
    color: #3366ff;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s;
}
.refresh-status-btn:hover { transform: rotate(180deg); }

/* ===== Contact ===== */
.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.contact-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    color: #3366ff;
}
.qq-qrcode-container {
    text-align: center;
    padding: 20px;
    background-color: rgba(0,0,0,0.6);
    border-radius: 20px;
    border: 1px solid #3366ff;
}
.qq-qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto 10px;
    cursor: pointer;
    border-radius: 10px;
}
.qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.qrcode-modal.active { display: flex; }
.qrcode-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    cursor: grab;
}
.qrcode-modal-content.grabbing { cursor: grabbing; }
.qrcode-modal-content img {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.1s ease;
    transform-origin: center center;
}
.close-modal {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
}

/* ===== Contact Form ===== */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 15px;
    background: rgba(20,20,30,0.8);
    border: 1px solid rgba(51,102,255,0.3);
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #3366ff;
    box-shadow: 0 0 0 3px rgba(51,102,255,0.15);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #666;
}
.contact-form .field-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: -10px;
    margin-bottom: 12px;
}
.contact-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3366ff, #5588ff);
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}
.contact-form button:hover {
    background: linear-gradient(135deg, #5588ff, #66aaff);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51,102,255,0.3);
}
.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
#formResult {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    display: none;
    font-size: 15px;
}
#formResult.success {
    display: block;
    background: rgba(46, 125, 50, 0.2);
    border: 1px solid #4CAF50;
    color: #66bb6a;
}
#formResult.error {
    display: block;
    background: rgba(198, 40, 40, 0.2);
    border: 1px solid #f44336;
    color: #ef5350;
}
.contact-form .form-desc {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.6;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    padding: 12px 24px;
    border-radius: 60px;
    color: white;
    border-left: 4px solid #33ff66;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Next Page Buttons ===== */
.next-page-btn, .bottom-next-btn {
    background-color: #3366ff;
    border: 2px solid #3366ff;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.next-page-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 160px;
    border-radius: 50px;
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    z-index: 999;
}
.next-page-btn:hover {
    background-color: #1a4bcc;
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}
.bottom-next-btn {
    display: block;
    width: 200px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 50px;
    margin: 40px auto 20px;
    font-size: 18px;
    font-weight: bold;
}
.bottom-next-btn:hover {
    background-color: #1a4bcc;
    transform: translateY(-3px);
}

/* ===== Back to Top（修复：上移避开自动滚动控件） ===== */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 50px;
    height: 50px;
    background: #3366ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    font-size: 28px;
    color: white;
    z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #1a4bcc; transform: scale(1.1); }

/* ===== Footer ===== */
footer {
    background-color: rgba(0,0,0,0.6);
    padding: 40px 0 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    margin-top: 30px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}
.footer-section h3 {
    margin-bottom: 20px;
    color: #3366ff;
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 10px;
}
.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: 0.2s;
}
.footer-links a:hover {
    color: #3366ff;
}
.social-links a {
    display: inline-block;
    margin: 0 10px;
    color: #aaa;
    font-size: 1.5rem;
    transition: 0.2s;
}
.social-links a:hover {
    color: #3366ff;
    transform: translateY(-3px);
}
.copyright {
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #aaa;
}

/* ===== Float Text ===== */
.float-text-container {
    position: relative;
    overflow: hidden;
    min-height: 60px;
    margin: 20px 0;
}
.float-text {
    display: inline-block;
    font-size: 1.2rem;
    color: #3366ff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: floatText 1.5s ease forwards;
    opacity: 0;
    margin: 0 5px;
}
@keyframes floatText {
    0% { opacity: 0; transform: translateY(20px); }
    50% { opacity: 1; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}
.float-text.delay-1 { animation-delay: 0.3s; }
.float-text.delay-2 { animation-delay: 0.6s; }
.float-text.delay-3 { animation-delay: 0.9s; }

/* ===== Register Progress Bar（透明毛玻璃） ===== */
#registerProgress {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    z-index: 30;
    background: rgba(10, 12, 15, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 20px 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    transition: opacity 0.8s ease, transform 0.8s ease;
    opacity: 0;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
#registerProgress.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: none;
}
#registerProgress.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}
#registerProgress #rpText {
    text-align: center;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 6px;
    min-height: 22px;
    transition: opacity 0.3s ease;
}
#registerProgress #rpWrapper {
    width: 100%;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    overflow: hidden;
    height: 6px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
#registerProgress #rpFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3366ff, #66ccff);
    border-radius: 8px;
    transition: width 0.3s ease;
}
#registerProgress #rpBanner {
    text-align: center;
    padding: 10px 0 0 0;
    color: #66bb6a;
    font-weight: bold;
    font-size: clamp(15px, 2.2vw, 18px);
    transition: opacity 0.6s ease, max-height 0.6s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}
#registerProgress #rpBanner.show {
    opacity: 1;
    max-height: 60px;
}
#registerProgress #rpBanner i {
    margin-right: 8px;
}

/* ===== 光效控制区域（开关 + 类型切换） ===== */
.glow-toggle-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 12, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 12px 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.toggle-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    user-select: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
    transform: translateX(20px);
    background: #ffffff;
}

.toggle-switch:has(input:checked) {
    background: #3366ff;
}

.toggle-switch:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
.toggle-switch:active .toggle-slider {
    transform: scale(0.9);
}
.toggle-switch:has(input:checked):active .toggle-slider {
    transform: translateX(20px) scale(0.9);
}

.glow-type-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.glow-type-btn:hover {
    background: rgba(51, 102, 255, 0.3);
    transform: scale(1.1);
    border-color: #3366ff;
}
.glow-type-btn:active {
    transform: scale(0.9);
}

/* ===== 光效（优化照亮感） ===== */
#glow {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 999999 !important;
    mix-blend-mode: soft-light;
    will-change: background;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#glow.active {
    opacity: 1;
}

/* ===== 自动滚动控制容器（播放按钮 + 速度滑块 + 单按钮方向切换） ===== */
.auto-scroll-container {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 12, 15, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px 16px 8px 12px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.auto-scroll-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.auto-scroll-btn:hover {
    background: rgba(51, 102, 255, 0.4);
    transform: scale(1.05);
}
.auto-scroll-btn.playing {
    background: rgba(51, 102, 255, 0.5);
    animation: auto-scroll-pulse 1.5s ease-in-out infinite;
}
.auto-scroll-btn:active {
    transform: scale(0.9);
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.speed-control input[type="range"] {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    transition: background 0.2s;
}
.speed-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3366ff;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(51, 102, 255, 0.4);
}
.speed-control input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3366ff;
    cursor: pointer;
    border: none;
}
.speed-control #speedDisplay {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
    user-select: none;
}

/* ===== 方向切换按钮（单按钮循环切换 ↑/↓） ===== */
.direction-control {
    display: flex;
    align-items: center;
}
.dir-toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.dir-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}
.dir-toggle-btn.active-up {
    background: rgba(51, 102, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 12px rgba(51, 102, 255, 0.3);
}
.dir-toggle-btn.active-down {
    background: rgba(51, 102, 255, 0.4);
    color: #fff;
    box-shadow: 0 0 12px rgba(51, 102, 255, 0.3);
}
.dir-toggle-btn:active {
    transform: scale(0.9);
}

@keyframes auto-scroll-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(51, 102, 255, 0.15); }
    50% { box-shadow: 0 0 25px rgba(51, 102, 255, 0.5); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(0,0,0,0.95);
        padding: 20px;
        border-radius: 0 0 20px 20px;
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 10px 0; text-align: center; }
    .mobile-menu { display: block; }

    .hero-content h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .hero-content p {
        font-size: clamp(0.95rem, 3vw, 1.1rem);
        padding: 0 10px;
    }
    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin: 4px 6px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .about, .features, .rules, .server-join-section, .contact {
        padding: 30px 0;
        margin: 16px auto;
        border-radius: 28px;
    }
    .section-title {
        font-size: clamp(1.3rem, 4.5vw, 1.8rem);
        margin-bottom: 30px;
    }

    .about-content, .contact-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 12px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 12px;
    }
    .feature-card {
        padding: 18px 14px;
    }
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    .feature-card h3 {
        font-size: 0.95rem;
    }
    .feature-card p {
        font-size: 0.8rem;
    }

    .rules-list {
        padding: 0 12px;
    }
    .rule-item {
        padding: 16px 14px;
        margin-bottom: 10px;
    }
    .rule-item h3 {
        font-size: 0.95rem;
    }
    .rule-item p {
        font-size: 0.85rem;
    }

    .server-address {
        flex-direction: column;
        padding: 14px 18px;
        gap: 10px;
    }
    .server-address p {
        font-size: 1rem;
        text-align: center;
    }
    .copy-btn {
        padding: 10px 24px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .server-status {
        font-size: 0.85rem;
        padding: 8px 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }
    .contact-icon {
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 1.8rem;
    }

    .qq-qrcode {
        width: 160px;
        height: 160px;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 44px;
    }
    .contact-form button {
        padding: 12px;
        font-size: 15px;
        min-height: 48px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    .footer-section {
        min-width: auto;
    }

    .next-page-btn {
        width: 40px;
        height: 120px;
        font-size: 14px;
    }
    .bottom-next-btn {
        width: 160px;
        height: 50px;
        line-height: 50px;
        font-size: 16px;
    }

    /* 移动端回到顶部按钮：上移避开自动滚动控件 */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 24px;
        bottom: 130px; /* 从 80px 改为 130px，避开 auto-scroll-container */
    }

    .hero {
        height: 70vh;
    }

    #registerProgress {
        top: 64px;
        padding: 10px 16px 12px 16px;
        width: 92%;
    }
    #registerProgress #rpText {
        font-size: 12px;
    }

    .glow-toggle-container {
        top: 72px;
        right: 10px;
        padding: 4px 10px 4px 12px;
        gap: 6px;
    }
    .toggle-label {
        font-size: 11px;
    }
    .toggle-switch {
        width: 38px;
        height: 21px;
    }
    .toggle-switch .toggle-slider {
        width: 17px;
        height: 17px;
        top: 2px;
        left: 2px;
    }
    .toggle-switch input[type="checkbox"]:checked + .toggle-slider {
        transform: translateX(17px);
    }
    .glow-type-btn {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .auto-scroll-container {
        bottom: 80px;
        right: 10px;
        padding: 6px 12px 6px 10px;
        gap: 8px;
    }
    .auto-scroll-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    .speed-control input[type="range"] {
        width: 50px;
    }
    .speed-control #speedDisplay {
        font-size: 11px;
        min-width: 28px;
    }
    .dir-toggle-btn {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero-content h1 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
    }
    .hero-buttons .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        min-height: 44px;
        margin: 3px 4px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 0 8px;
    }
    .feature-card {
        padding: 14px 10px;
    }
    .feature-icon {
        font-size: 1.6rem;
    }
    .feature-card h3 {
        font-size: 0.85rem;
    }
    .feature-card p {
        font-size: 0.75rem;
    }

    .server-address p {
        font-size: 0.9rem;
    }
    .copy-btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .qq-qrcode {
        width: 140px;
        height: 140px;
    }

    .glow-toggle-container {
        top: 68px;
        right: 8px;
        padding: 3px 8px 3px 10px;
        gap: 4px;
    }
    .toggle-label {
        font-size: 10px;
    }
    .toggle-switch {
        width: 34px;
        height: 19px;
    }
    .toggle-switch .toggle-slider {
        width: 15px;
        height: 15px;
        top: 2px;
        left: 2px;
    }
    .toggle-switch input[type="checkbox"]:checked + .toggle-slider {
        transform: translateX(15px);
    }
    .glow-type-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .auto-scroll-container {
        bottom: 72px;
        right: 8px;
        padding: 4px 10px 4px 8px;
        gap: 6px;
    }
    .auto-scroll-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .speed-control input[type="range"] {
        width: 40px;
    }
    .speed-control #speedDisplay {
        font-size: 10px;
        min-width: 24px;
    }
    .dir-toggle-btn {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }
}