* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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.5;
    scroll-behavior: smooth;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1c20;
}
::-webkit-scrollbar-thumb {
    background: #3366ff;
    border-radius: 10px;
}

@keyframes flicker {
    0% { text-shadow: 0 0 2px #3366ff, 0 0 5px #3366ff; opacity: 0.9; }
    50% { text-shadow: 0 0 8px #3366ff, 0 0 15px #6699ff; opacity: 1; }
    100% { text-shadow: 0 0 2px #3366ff, 0 0 5px #3366ff; opacity: 0.9; }
}

.glass-nav {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background-color: rgba(10, 12, 15, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}
.glass-nav-scrolled {
    background-color: rgba(5, 7, 10, 0.92);
}
.animate-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.toast {
    position: fixed;
    top: 20px;
    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;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.prev-page-btn,
.mobile-prev-page-btn {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background-color: #3366ff;
    color: white;
    border-radius: 50px;
    border: 3px solid #3366ff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: upright;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}
.prev-page-btn {
    width: 50px;
    height: 160px;
    font-size: 18px;
}
.mobile-prev-page-btn {
    width: 40px;
    height: 120px;
    font-size: 14px;
    display: none;
}
.prev-page-btn:hover,
.mobile-prev-page-btn:hover {
    background-color: #1a4bcc;
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}
@media (max-width: 768px) {
    .prev-page-btn {
        display: none;
    }
    .mobile-prev-page-btn {
        display: flex;
        width: 36px;
        height: 120px;
        font-size: 13px;
        right: 8px;
    }
}

.screenshot-card {
    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;
    overflow: hidden;
    transition: all 0.25s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.screenshot-card:hover {
    transform: translateY(-8px);
    border-color: #3366ff;
    box-shadow: 0 15px 30px rgba(51, 102, 255, 0.2);
}
.screenshot-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.screenshot-card:hover img {
    transform: scale(1.03);
}
.img-placeholder {
    width: 100%;
    height: 240px;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.2rem;
}

#screenshots {
    background-color: #0a0c0f;
}

/* ===== 固定进度条（透明毛玻璃） ===== */
#fixedProgress {
    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);
}
#fixedProgress.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#fixedProgress.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}
#fixedProgress #progressText {
    text-align: center;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 6px;
    min-height: 22px;
    transition: opacity 0.3s ease;
}
#fixedProgress #progressWrapper {
    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);
}
#fixedProgress #progressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3366ff, #66ccff);
    border-radius: 8px;
    transition: width 0.3s ease;
}
#fixedProgress #completionBanner {
    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;
}
#fixedProgress #completionBanner.show {
    opacity: 1;
    max-height: 60px;
}
#fixedProgress #completionBanner i {
    margin-right: 8px;
}
@media (max-width: 768px) {
    #fixedProgress {
        top: 56px;
        padding: 8px 14px 10px 14px;
        width: 94%;
    }
    #fixedProgress #progressText {
        font-size: 11px;
    }
}
/* ===== 固定进度条结束 ===== */

.copy-qq-btn {
    background: #3366ff;
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.copy-qq-btn:hover {
    background: #1a4bcc;
    transform: scale(1.02);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-image-container {
    position: relative;
    cursor: grab;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-image-container.grabbing {
    cursor: grabbing;
}
#modalImage {
    max-width: 100%;
    max-height: 100%;
    transition: none;
    transform-origin: center center;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    width: auto;
    height: auto;
}
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}
.zoom-btn,
.zoom-reset {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
    font-size: 1.1rem;
    backdrop-filter: blur(4px);
}
.zoom-btn:hover,
.zoom-reset:hover {
    background: rgba(51, 102, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}
.zoom-btn:active,
.zoom-reset:active {
    transform: scale(0.92);
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}
.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 回到顶部按钮（上移避开自动滚动控件） ===== */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 100px;
    background: #3366ff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    font-size: 20px;
    color: white;
    border: none;
    outline: none;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: #1a4bcc;
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(51, 102, 255, 0.4);
}
.back-to-top:active {
    transform: scale(0.95);
}

.mobile-back-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #3366ff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    font-size: 20px;
    color: white;
}
.mobile-back-btn.visible {
    opacity: 1;
    visibility: visible;
}
.mobile-back-btn:hover {
    background: #1a4bcc;
    transform: scale(1.1);
}
@media (min-width: 769px) {
    .mobile-back-btn {
        display: none;
    }
}

footer {
    border-top: 1px solid rgba(51, 102, 255, 0.3);
    margin-top: 60px;
    padding: 40px 0;
    text-align: center;
    color: #aaa;
}
.text-primary {
    color: #3366ff;
}
.bg-primary {
    background-color: #3366ff;
}
.hover\:bg-primaryDark:hover {
    background-color: #1a4bcc;
}

/* ===== 光效控制区域（右上角开关 + 类型切换） ===== */
.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);
}

@media (max-width: 768px) {
    .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;
    }
}

/* ===== 光效（优化照亮感） ===== */
#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;
}

/* ===== 🔥 修复模态框关闭按钮被光效开关遮挡 ===== */
body:has(.modal.active) .glow-toggle-container {
    z-index: 50 !important;
}

/* ===== 自动滚动控制容器（播放按钮 + 速度滑块 + 单按钮方向切换） ===== */
.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); }
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    #navbar {
        padding: 8px 0;
    }
    #navbar .max-w-7xl {
        padding: 0 12px;
    }
    #navbar .font-pacifico {
        font-size: 1.2rem;
    }

    .h-screen {
        height: 70vh;
        min-height: 400px;
    }
    .h-screen h1 {
        font-size: clamp(2rem, 6vw, 2.8rem);
    }
    .h-screen p {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        padding: 0 10px;
    }
    #viewScreenshotsBtn {
        padding: 12px 24px;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .screenshot-card img {
        height: 160px;
    }
    .screenshot-card {
        border-radius: 20px;
    }

    .text-4xl {
        font-size: clamp(1.4rem, 4.5vw, 1.8rem);
        margin-bottom: 24px;
    }

    #contact .max-w-sm {
        max-width: 100%;
        padding: 16px;
    }
    #contact .gap-3 {
        gap: 8px;
    }
    .copy-qq-btn {
        padding: 6px 14px;
        font-size: 12px;
        min-height: 36px;
    }
    .text-xl {
        font-size: 1rem;
    }

    .grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .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;
    }

    /* 移动端回到顶部按钮：上移避开自动滚动控件 */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 130px;
    }

    .mobile-back-btn {
        bottom: 130px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .screenshot-card img {
        height: 200px;
    }

    .h-screen {
        height: 60vh;
        min-height: 320px;
    }
    .h-screen h1 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    .mobile-prev-page-btn {
        width: 32px;
        height: 100px;
        font-size: 11px;
        right: 6px;
    }

    .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;
    }
}