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

:root {
    --primary-bg: #0a0a0f;
    --secondary-bg: #1a1a2e;
    --accent-color: #6366f1;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border-color: #2a2a3e;
    
    /* 安全区域变量 */
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-right: env(safe-area-inset-right);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    cursor: url('images/cursor-default.png') 2 2, auto;
}

/* 可点击元素使用pointer光标 */
a, button, .game-card, .doc-card, .feature-card, 
input[type="submit"], input[type="button"], 
[onclick], .copy-button, .discord-button,
.nav-link, .buy-button, .search-btn, .ai-chat-btn,
.nav-brand, .nav-links a, .nav-signin, .user-avatar,
.chat-toggle-btn, .chat-send-btn, .selection-ai-btn,
.doc-item, .feature-icon, .sponsor-badge {
    cursor: url('images/cursor-pointer.png') 10 10, pointer !important;
}

/* 输入框光标 */
input[type="text"], input[type="email"], input[type="password"], 
textarea, input[type="search"], .chat-input, .api-key-input {
    cursor: url('images/cursor-text.png') 16 16, text !important;
}

/* 拖动元素光标 */
.chat-header {
    cursor: url('images/cursor-pointer.png') 10 10, move !important;
}

.chat-resize-handle {
    cursor: nwse-resize !important;
}

/* 禁用状态光标 */
button:disabled, input:disabled, textarea:disabled {
    cursor: not-allowed !important;
}

/* 加载状态光标 */
.loading, .processing {
    cursor: wait !important;
}

/* 移动设备禁用自定义光标 */
@media (max-width: 768px) {
    body, * {
        cursor: auto !important;
    }
    
    a, button, .game-card, .doc-card, .feature-card,
    input[type="submit"], input[type="button"], [onclick] {
        cursor: pointer !important;
    }
    
    input[type="text"], input[type="email"], input[type="password"], 
    textarea, input[type="search"] {
        cursor: text !important;
    }
}

/* 加载画面 */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

.loading-logo {
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

.loading-logo svg {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

.loading-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.loading-bar-container {
    margin: 2rem auto;
    max-width: 400px;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.loading-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

.loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    position: relative;
}

.loading-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 背景动画点阵 */
.background-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    pointer-events: none;
    animation: dotsMove 20s linear infinite;
}

@keyframes dotsMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

/* 雪花容器 */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* 雪花样式 - 由JavaScript控制动画 */
.snowflake {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    user-select: none;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* 流星效果 */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(99, 102, 241, 0.8);
    animation: shootingStar linear;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, rgba(99, 102, 241, 0.8), transparent);
}

@keyframes shootingStar {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-300px, 300px);
        opacity: 0;
    }
}

/* 雷电支持出品标识 */
.sponsor-badge {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    z-index: 1001;
    transition: all 0.3s ease;
    animation: pulseGlow 2s ease-in-out infinite;
}

.sponsor-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #ff5252 0%, #f44336 100%);
}

.sponsor-badge svg {
    animation: lightning 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.6);
    }
}

@keyframes lightning {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-brand:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.nav-brand:active {
    transform: translateY(0);
}

.nav-brand svg {
    width: 24px;
    height: 24px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-signin {
    padding: 0.5rem 1.5rem;
    background: var(--secondary-bg);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-signin:hover {
    background: var(--accent-color);
    color: var(--text-primary) !important;
}

/* 主要内容 */
.main-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    text-align: center;
}

/* 购买按钮 */
.buy-button-container {
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease;
}

.buy-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* 标题 */
.main-title {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.main-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* 脚本加载器 */
.script-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.script-box {
    display: flex;
    align-items: center;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 400px;
    transition: all 0.3s ease;
}

.script-box:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.script-box code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-button,
.discord-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.copy-button {
    margin-left: 1rem;
}

.copy-button .copy-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.copy-button:hover,
.discord-button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.discord-button {
    padding: 1rem;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

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

/* 预览容器 */
.preview-container {
    margin: 4rem 0;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.preview-image {
    perspective: 1000px;
}

.laptop-mockup {
    max-width: 600px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.laptop-mockup:hover {
    transform: rotateX(5deg) rotateY(-5deg);
}

.laptop-screen {
    background: #1a1a2e;
    border-radius: 12px 12px 0 0;
    border: 8px solid #2a2a3e;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.laptop-screen img,
.laptop-screen video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.laptop-keyboard {
    height: 30px;
    background: linear-gradient(to bottom, #2a2a3e 0%, #1a1a2e 100%);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 功能部分 */
.features-section {
    margin: 6rem 0;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--accent-color);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.25);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 游戏支持展示 */
.games-section {
    margin: 6rem 0;
    text-align: center;
    padding: 3rem 0;
}

.games-section h2 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    font-weight: 600;
}

.games-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-style: italic;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
    padding: 0 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.game-card {
    background: rgba(30, 35, 50, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    aspect-ratio: 16/9;
    text-decoration: none;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover::after {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4),
                0 0 20px rgba(99, 102, 241, 0.2);
}

.game-image-wrapper {
    position: relative;
    width: 100%;
    height: calc(100% - 45px);
    overflow: hidden;
    background: rgba(20, 25, 40, 0.5);
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.game-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.game-info {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 25, 40, 0.6);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.game-info h3 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0;
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-status {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    flex-shrink: 0;
}

/* 文档部分 */
.docs-section {
    margin: 6rem 0;
    text-align: left;
}

.docs-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.doc-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99, 102, 241, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.doc-card:hover::before {
    transform: scaleX(1);
}

.doc-card:hover::after {
    opacity: 1;
}

.doc-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.25);
}

.doc-card:active {
    transform: translateY(-5px) scale(1.01);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.doc-card:hover .doc-icon {
    transform: scale(1.1) rotate(5deg);
}

.doc-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.doc-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 48px;
}

.doc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.doc-badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.doc-size {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 页脚 */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    margin-top: 6rem;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a,
.nav-search-btn {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-search-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-color);
}

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

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==================== 移动端菜单按钮 ==================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== 响应式设计 - 移动端 ==================== */
@media (max-width: 768px) {
    /* 导航栏移动端优化 */
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-brand span {
        font-size: 1.1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding-top: 70px;
        padding-bottom: 1rem;
        border: none;
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a,
    .nav-links button {
        width: 100%;
        padding: 1rem 1.5rem;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 1rem;
    }
    
    .nav-search-btn {
        justify-content: flex-start;
        background: transparent;
        border: none;
        border-radius: 0;
    }
    
    .nav-signin {
        background: var(--accent-color);
        margin: 1rem 1.5rem;
        width: calc(100% - 3rem);
        text-align: center;
        border-radius: 8px;
    }
    
    .user-menu {
        width: 100%;
        padding: 1rem 1.5rem;
    }
    
    .user-avatar {
        width: 100%;
        justify-content: flex-start;
    }

    /* 主内容区优化 */
    .main-content {
        padding: 5rem 1rem 3rem;
    }
    
    .main-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .main-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    /* 脚本加载器优化 */
    .script-box {
        min-width: auto;
        width: 100%;
        max-width: 100%;
        padding: 0.875rem 1rem;
    }

    .script-loader {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 3rem;
    }

    .copy-button {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* 功能卡片优化 */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
    }
    
    .feature-card {
        padding: 1.5rem;
    }

    /* 游戏网格优化 */
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0;
    }

    .games-section {
        padding: 3rem 1rem;
    }

    .games-section h2 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .game-card {
        padding: 0.75rem;
    }

    .game-info h3 {
        font-size: 0.8rem;
    }
    
    .game-info p {
        font-size: 0.7rem;
    }

    /* 返回顶部按钮 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* 赞助标识优化 */
    .sponsor-badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
        bottom: 15px;
        left: 15px;
    }
    
    .sponsor-badge svg {
        width: 12px;
        height: 12px;
    }
    
    /* 购买按钮优化 */
    .buy-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
    
    /* 触摸优化 - 增大可点击区域 */
    button, a, .game-card, .feature-card {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    }
    
    /* 防止文本选择 */
    .nav-links, .game-card, .feature-card, button {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* 滚动优化 */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* 超小屏幕优化（<375px） */
@media (max-width: 374px) {
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .nav-brand span {
        font-size: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .script-box {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

/* 平板端 */
@media (min-width: 769px) and (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .main-title {
        font-size: 4rem;
    }
    
    .main-content {
        padding: 7rem 2rem 4rem;
    }
}

/* 移动端横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .main-content {
        padding: 4rem 1rem 2rem;
    }
    
    .main-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .script-loader {
        margin-bottom: 2rem;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-links {
        padding-top: 60px;
    }
    
    .games-section {
        padding: 2rem 1rem;
    }
}

/* 大屏幕 */
@media (min-width: 1400px) {
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

/* AI 聊天功能样式 */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.chat-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.chat-container.active {
    display: flex;
}

/* 缩放手柄 */
.chat-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    font-size: 18px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.chat-resize-handle:hover {
    opacity: 1;
    color: var(--accent-color);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.chat-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.chat-status {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.message-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-primary);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--accent-color);
}

.message-content p {
    margin: 0;
    line-height: 1.6;
    word-wrap: break-word;
}

/* 格式化消息样式 */
.msg-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.msg-list-item {
    margin: 0.5rem 0 0.5rem 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    position: relative;
    padding-left: 0.5rem;
}

.msg-list-item strong {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

.inline-code {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-color);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* AI 回复用时显示 */
.message-time-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    opacity: 0.8;
}

.time-icon {
    font-size: 0.85rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    background: var(--primary-bg);
}

.chat-input {
    flex: 1;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-send-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    background: #5558e3;
    transform: translateY(-2px);
}

.chat-send-btn:active {
    transform: translateY(0);
}

.chat-settings {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--primary-bg);
}

.api-key-input {
    width: 100%;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.api-key-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.api-key-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.api-key-hint a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.api-key-hint a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

/* 响应式 - 聊天窗口 */
@media (max-width: 768px) {
    .chat-container {
        width: 100vw;
        height: 100vh;
        right: 0;
        bottom: 0;
        left: 0;
        top: 0;
        border-radius: 0;
        max-width: 100%;
        max-height: 100%;
    }
    
    .chat-toggle-btn {
        right: 20px;
        bottom: 20px;
        width: 56px;
        height: 56px;
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    }
    
    .chat-header {
        padding: 1.25rem 1rem;
        cursor: default;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-container {
        padding: 1rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
    
    .chat-input {
        font-size: 16px; /* 防止iOS自动缩放 */
        padding: 0.875rem 1rem;
    }
    
    .chat-send-btn {
        width: 48px;
        height: 48px;
    }
    
    .chat-resize-handle {
        display: none; /* 移动端隐藏调整大小手柄 */
    }
    
    .selection-ai-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* 文本选择 AI 提问弹出框 */
.selection-popup {
    position: absolute;
    display: none;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.selection-popup.show {
    opacity: 1;
    transform: translateY(0);
}

.selection-ai-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.selection-ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    background: linear-gradient(135deg, #5558e3 0%, #7c3aed 100%);
}

.selection-ai-btn:active {
    transform: translateY(0);
}

.selection-ai-btn svg {
    width: 16px;
    height: 16px;
}

/* 选择文本高亮效果 */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* 搜索模态框 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.3s ease;
    transition: all 0.3s ease;
}

.search-modal-content.expanded {
    max-width: 95%;
    max-height: 90vh;
    height: 90vh;
    padding: 1.5rem;
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.search-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.search-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.search-engine-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.search-tab:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.search-tab.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.search-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.search-submit-btn:active {
    transform: translateY(0);
}

.search-tips {
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    margin-top: 1rem;
}

.search-tips p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 搜索结果显示区域 */
.search-results-container {
    margin-top: 1.5rem;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--primary-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.search-results-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.search-results-frame {
    width: 100%;
    height: calc(90vh - 200px);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
}

/* 搜索头部操作按钮 */
.search-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.search-action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 音频播放器 */
.audio-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

.audio-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.audio-toggle-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.audio-player-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 320px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.audio-player-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.audio-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.audio-player-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.audio-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.audio-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.audio-info {
    margin-bottom: 1.5rem;
}

.audio-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.audio-time {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.time-separator {
    color: var(--text-secondary);
    font-weight: 400;
}

.audio-remaining {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.audio-control-group {
    margin-bottom: 1rem;
}

.audio-control-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.audio-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.audio-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.audio-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.progress-slider::-webkit-slider-runnable-track {
    background: linear-gradient(to right, var(--accent-color) 0%, var(--border-color) 0%);
}

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.audio-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.audio-control-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.audio-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.audio-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* 响应式 - 音频播放器 */
@media (max-width: 768px) {
    .audio-player {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .audio-player-panel {
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        width: calc(100vw - 40px);
        max-width: 320px;
    }
    
    .audio-player-panel.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* ==================== 认证模态框 ==================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-content {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.3s ease;
    position: relative;
}

.auth-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.auth-form h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-input-group {
    margin-bottom: 1.5rem;
}

.auth-input-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.auth-input-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--primary-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--secondary-bg);
    padding: 0 1rem;
}

.auth-google-btn {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-google-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-github-btn {
    width: 100%;
    padding: 1rem;
    background: #24292e;
    border: 2px solid #24292e;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.auth-github-btn:hover {
    background: #1a1e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: #8b5cf6;
}

/* ==================== 用户菜单 ==================== */

.user-menu {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar span {
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.user-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    word-break: break-all;
}

.user-dropdown button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.dropdown-switch-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.dropdown-switch-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.dropdown-signout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.dropdown-signout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* 响应式 - 认证 */
@media (max-width: 768px) {
    .auth-modal-content {
        padding: 2rem 1.5rem;
    }
    
    .user-avatar span {
        display: none;
    }
}


/* ==================== 点击光点效果 ==================== */

.click-ripple {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 0;
    height: 0;
}

.click-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8),
                0 0 20px 4px rgba(99, 102, 241, 0.6);
    animation: particleExpand 0.8s ease-out forwards;
    transform-origin: center;
}

@keyframes particleExpand {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 中心光圈效果 */
.click-ripple::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.6),
                0 0 40px 10px rgba(99, 102, 241, 0.4);
    animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* 移动设备优化 - 减少粒子效果 */
@media (max-width: 768px) {
    .click-particle {
        width: 4px;
        height: 4px;
    }
    
    .click-ripple::before {
        width: 15px;
        height: 15px;
        margin-left: -7.5px;
        margin-top: -7.5px;
    }
}

/* 性能优化 - 使用GPU加速 */
.click-ripple,
.click-particle {
    will-change: transform, opacity;
    transform: translateZ(0);
}
