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

html,
body
{
    overflow: hidden;
    width: 100%;
    height: 100%;
    height: -webkit-fill-available;
    font-family: 'Roboto', sans-serif;
    background: #1a1a2e;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

.experience
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    touch-action: none;
}

.experience canvas
{
    display: block;
}

/* ===== 介绍封面 ===== */
.cover-overlay
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: radial-gradient(ellipse at center, rgba(15, 15, 50, 0.55) 0%, rgba(8, 8, 30, 0.65) 40%, rgba(3, 3, 15, 0.78) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cover-overlay.fade-out
{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 浮动粒子背景 */
.cover-bg-particles
{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cover-particle
{
    position: absolute;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.25);
    animation: coverFloat linear infinite;
}

.cover-particle:nth-child(1) { width: 4px; height: 4px; left: 10%; top: 20%; animation-duration: 12s; animation-delay: 0s; }
.cover-particle:nth-child(2) { width: 3px; height: 3px; left: 25%; top: 60%; animation-duration: 14s; animation-delay: 2s; background: rgba(118, 75, 162, 0.3); }
.cover-particle:nth-child(3) { width: 5px; height: 5px; left: 45%; top: 15%; animation-duration: 10s; animation-delay: 4s; }
.cover-particle:nth-child(4) { width: 3px; height: 3px; left: 60%; top: 70%; animation-duration: 16s; animation-delay: 1s; background: rgba(100, 180, 255, 0.25); }
.cover-particle:nth-child(5) { width: 4px; height: 4px; left: 75%; top: 35%; animation-duration: 11s; animation-delay: 3s; }
.cover-particle:nth-child(6) { width: 2px; height: 2px; left: 88%; top: 55%; animation-duration: 15s; animation-delay: 5s; background: rgba(118, 75, 162, 0.35); }
.cover-particle:nth-child(7) { width: 4px; height: 4px; left: 35%; top: 80%; animation-duration: 13s; animation-delay: 6s; }
.cover-particle:nth-child(8) { width: 3px; height: 3px; left: 70%; top: 10%; animation-duration: 9s; animation-delay: 2.5s; background: rgba(100, 180, 255, 0.2); }

@keyframes coverFloat
{
    0% { transform: translateY(0) scale(1); opacity: 0.3; }
    25% { transform: translateY(-30px) scale(1.5); opacity: 0.7; }
    50% { transform: translateY(-60px) scale(1); opacity: 0.3; }
    75% { transform: translateY(-90px) scale(0.5); opacity: 0.1; }
    100% { transform: translateY(-120px) scale(1); opacity: 0.3; }
}

/* 封面内容 */
.cover-content
{
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 32px;
    animation: coverContentIn 1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

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

/* Logo */
.cover-logo
{
    margin-bottom: 24px;
}

.cover-logo-icon
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    font-size: 44px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 24px;
    animation: coverLogoPulse 3s ease-in-out infinite;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.15);
}

@keyframes coverLogoPulse
{
    0%, 100% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.15); }
    50% { box-shadow: 0 0 60px rgba(102, 126, 234, 0.3); }
}

/* 标题 */
.cover-title
{
    margin-bottom: 16px;
}

.cover-title-line
{
    display: block;
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 40%, #64b4ff 70%, #667eea 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: coverGradient 4s ease-in-out infinite;
    letter-spacing: 3px;
    line-height: 1.3;
}

@keyframes coverGradient
{
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cover-subtitle
{
    display: block;
    font-size: 16px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 6px;
    animation: coverFadeIn 1s 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

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

/* 描述 */
.cover-desc
{
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 40px;
    animation: coverFadeIn 1s 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* 特色功能 */
.cover-features
{
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 44px;
    animation: coverFadeIn 1s 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.cover-feature-item
{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.cover-feature-item:hover
{
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cover-feature-icon
{
    font-size: 18px;
}

/* 进入按钮 */
.cover-enter-btn
{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    overflow: hidden;
    animation: coverFadeIn 1s 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.cover-enter-btn::before
{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s;
}

.cover-enter-btn:hover
{
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 45px rgba(102, 126, 234, 0.5);
}

.cover-enter-btn:hover::before
{
    left: 100%;
}

.cover-enter-btn:active
{
    transform: translateY(0) scale(0.98);
}

/* 底部提示 */
.cover-hint
{
    margin-top: 28px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    animation: coverFadeIn 1s 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* 封面 - 移动端适配 */
@media (max-width: 600px)
{
    .cover-title-line
    {
        font-size: 28px;
        letter-spacing: 1.5px;
    }

    .cover-subtitle
    {
        font-size: 12px;
        letter-spacing: 4px;
    }

    .cover-desc
    {
        font-size: 13px;
        max-width: 300px;
        margin-bottom: 28px;
    }

    .cover-features
    {
        gap: 10px;
        margin-bottom: 32px;
    }

    .cover-feature-item
    {
        padding: 8px 12px;
        font-size: 11px;
        gap: 5px;
    }

    .cover-feature-icon
    {
        font-size: 15px;
    }

    .cover-enter-btn
    {
        padding: 15px 36px;
        font-size: 16px;
        letter-spacing: 1px;
        border-radius: 14px;
    }

    .cover-logo-icon
    {
        width: 60px;
        height: 60px;
        font-size: 32px;
        border-radius: 18px;
    }

    .cover-content
    {
        padding: 24px 20px;
    }

    .cover-hint
    {
        margin-top: 20px;
        font-size: 11px;
    }
}

@media (max-width: 380px)
{
    .cover-title-line
    {
        font-size: 24px;
    }

    .cover-subtitle
    {
        font-size: 10px;
        letter-spacing: 3px;
    }

    .cover-features
    {
        gap: 6px;
    }

    .cover-feature-item
    {
        padding: 6px 10px;
        font-size: 10px;
    }

    .cover-enter-btn
    {
        padding: 14px 30px;
        font-size: 15px;
    }
}

/* ===== 登录/注册覆盖层 ===== */
.auth-overlay
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 30, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.auth-overlay.hidden
{
    opacity: 0;
    pointer-events: none;
}

.auth-panel
{
    background: rgba(20, 20, 50, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 44px;
    width: 400px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.6s ease;
    -webkit-overflow-scrolling: touch;
}

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

.auth-header
{
    text-align: center;
    margin-bottom: 36px;
}

.auth-header h1
{
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 1.5px;
}

.auth-header p
{
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-form h2
{
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 20px;
}

.input-group { margin-bottom: 16px; }

.input-group label
{
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.input-group input
{
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    touch-action: manipulation;
}

.input-group input:focus
{
    border-color: rgba(100, 180, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.input-group input::placeholder { color: rgba(255, 255, 255, 0.3); }

.auth-message
{
    font-size: 12px;
    min-height: 20px;
    margin: 8px 0;
}
.auth-message.error { color: #ff4757; }
.auth-message.success { color: #2ed573; }

.auth-btn
{
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
    touch-action: manipulation;
}

.auth-btn:hover
{
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.45);
}
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-switch
{
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}
.auth-switch a
{
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.auth-switch a:hover { color: #764ba2; }

/* ===== 顶部信息栏 ===== */
.top-bar
{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(10, 10, 30, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: none;
    justify-content: space-between;
    align-items: center;
    padding-left: 28px;
    padding-right: 28px;
    z-index: 200;
    color: #ffffff;
    font-size: 13px;
}

.top-bar.visible { display: flex; }

.top-bar-left
{
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
}

.room-info
{
    color: #DAA520;
    font-weight: 400;
    font-size: 12px;
}

.room-online
{
    color: #4caf50;
}

.room-online::before
{
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4caf50;
    margin-right: 4px;
    vertical-align: middle;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot
{
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.room-timer
{
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.top-bar-right
{
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name { color: rgba(255, 255, 255, 0.6); }

.back-btn
{
    padding: 6px 18px;
    background: rgba(218, 165, 32, 0.12);
    border: 1px solid rgba(218, 165, 32, 0.35);
    border-radius: 8px;
    color: #DAA520;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s;
    display: none;
}
.back-btn:hover
{
    background: rgba(218, 165, 32, 0.25);
    color: #FFD700;
}

.admin-btn
{
    padding: 6px 18px;
    background: rgba(218, 165, 32, 0.12);
    border: 1px solid rgba(218, 165, 32, 0.35);
    border-radius: 8px;
    color: #DAA520;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s;
    display: none;
}
.admin-btn:hover
{
    background: rgba(218, 165, 32, 0.25);
    color: #FFD700;
}
.admin-btn.admin-visible
{
    display: inline-block;
}

.panoramic-btn
{
    padding: 6px 18px;
    background: rgba(100, 180, 255, 0.12);
    border: 1px solid rgba(100, 180, 255, 0.35);
    border-radius: 8px;
    color: #64b4ff;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s;
    display: none;
}
.panoramic-btn:hover
{
    background: rgba(100, 180, 255, 0.25);
    color: #88ccff;
}
.panoramic-btn.active
{
    background: rgba(100, 180, 255, 0.3);
    border-color: rgba(100, 180, 255, 0.6);
    color: #aaddff;
}

.logout-btn
{
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s;
}
.logout-btn:hover
{
    background: rgba(255, 71, 87, 0.2);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
}

/* ===== 操作提示（由PlayerController动态创建） ===== */
#playerHUD
{
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 150;
    pointer-events: none;
}

.hud-controls
{
    display: flex;
    gap: 24px;
    padding: 10px 28px;
    background: rgba(10, 10, 30, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}

.key-hint b
{
    color: #FFD700;
    background: rgba(255, 215, 0, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 3px;
}

.hud-action
{
    min-height: 32px;
    transition: all 0.3s;
}

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

/* ===== 移动端触摸控件 ===== */
/* 桌面端默认隐藏，移动端通过媒体查询显示 */
#mobileControls
{
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    pointer-events: none;
}

/* 触摸屏 且 屏幕宽度 < 1280 时显示 */
@media (any-pointer: coarse) and (max-width: 1279px)
{
    #mobileControls.visible
    {
        display: block !important;
    }
}

/* 回退：窄屏时也显示（兼容不支持 any-pointer 的旧浏览器） */
@media (max-width: 1023px)
{
    #mobileControls.visible
    {
        display: block !important;
    }
}

#mobileControls > *
{
    pointer-events: auto;
}

/* 前进后退按钮 */
.mobile-move-forward,
.mobile-move-backward
{
    position: fixed;
    left: calc(24px + env(safe-area-inset-left, 0px));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.75);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s;
}

.mobile-move-forward:active,
.mobile-move-backward:active
{
    background: rgba(255,255,255,0.2);
}

.mobile-move-forward
{
    bottom: calc(100px + env(safe-area-inset-bottom, 20px));
}

.mobile-move-backward
{
    bottom: calc(30px + env(safe-area-inset-bottom, 20px));
}

/* 旋转按钮 */
.mobile-btn
{
    position: fixed;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s;
}

.mobile-btn:active
{
    background: rgba(255,255,255,0.18);
}

.mobile-rotate-left
{
    bottom: calc(50px + env(safe-area-inset-bottom, 20px));
    right: calc(90px + env(safe-area-inset-right, 0px));
}

.mobile-rotate-right
{
    bottom: calc(50px + env(safe-area-inset-bottom, 20px));
    right: calc(24px + env(safe-area-inset-right, 0px));
}

/* 跳跃按钮 */
.mobile-jump
{
    bottom: calc(50px + env(safe-area-inset-bottom, 20px));
    right: calc(155px + env(safe-area-inset-right, 0px));
    color: rgba(39,174,96,0.85);
    border-color: rgba(39,174,96,0.45);
    font-size: 15px;
    font-weight: 700;
}

.mobile-jump:active
{
    background: rgba(39,174,96,0.25);
}

.mobile-action-btn
{
    position: fixed;
    bottom: calc(108px + env(safe-area-inset-bottom, 20px));
    right: calc(45px + env(safe-area-inset-right, 0px));
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(102,126,234,0.2);
    border: 2px solid rgba(102,126,234,0.5);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s;
    font-family: 'Roboto', sans-serif;
}

.mobile-action-btn:active
{
    background: rgba(102,126,234,0.45);
}

.mobile-action-btn.sitting
{
    background: rgba(39,174,96,0.3);
    border-color: rgba(39,174,96,0.6);
}

/* ===== 移动端媒体查询 ===== */
@media (max-width: 768px)
{
    /* 登录面板 */
    .auth-panel
    {
        padding: 28px 22px;
        width: 100%;
        border-radius: 14px;
    }

    .auth-header h1 { font-size: 22px; }
    .auth-header p { font-size: 12px; }
    .auth-header { margin-bottom: 24px; }
    .auth-form h2 { font-size: 16px; margin-bottom: 14px; }
    .input-group input { padding: 11px 14px; font-size: 16px; }
    .auth-btn { padding: 13px; font-size: 14px; }

    /* 顶部栏 */
    .top-bar
    {
        height: 40px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 11px;
    }

    .top-bar-left { gap: 8px; }
    .top-bar-right { gap: 10px; }

    .back-btn,
    .admin-btn,
    .panoramic-btn,
    .logout-btn,
    .stats-btn
    {
        padding: 4px 12px;
        font-size: 10px;
        border-radius: 6px;
    }

    /* HUD 键盘提示隐藏 */
    #playerHUD
    {
        bottom: 10px;
        font-size: 10px;
    }

    .hud-controls
    {
        gap: 10px;
        padding: 6px 14px;
        font-size: 10px;
    }
}

@media (max-width: 480px)
{
    .top-bar
    {
        height: 36px;
        font-size: 10px;
    }

    /* 登录面板进一步缩小 */
    .auth-panel
    {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .auth-header { margin-bottom: 16px; }
    .auth-header h1 { font-size: 18px; }
    .auth-header p { font-size: 11px; }
    .auth-form h2 { font-size: 14px; margin-bottom: 10px; }
    .input-group input { padding: 10px 12px; font-size: 14px; }
    .auth-btn { padding: 11px; font-size: 13px; }
    .auth-switch { font-size: 12px; }

    /* 移动端按钮缩小 */
    .mobile-move-forward,
    .mobile-move-backward
    {
        width: 48px;
        height: 48px;
        font-size: 17px;
        left: calc(12px + env(safe-area-inset-left, 0px));
    }

    .mobile-move-forward
    {
        bottom: calc(90px + env(safe-area-inset-bottom, 20px));
    }

    .mobile-move-backward
    {
        bottom: calc(28px + env(safe-area-inset-bottom, 20px));
    }

    .mobile-btn
    {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .mobile-rotate-left
    {
        bottom: calc(45px + env(safe-area-inset-bottom, 20px));
        right: calc(76px + env(safe-area-inset-right, 0px));
    }

    .mobile-rotate-right
    {
        bottom: calc(45px + env(safe-area-inset-bottom, 20px));
        right: calc(16px + env(safe-area-inset-right, 0px));
    }

    .mobile-jump
    {
        bottom: calc(45px + env(safe-area-inset-bottom, 20px));
        right: calc(130px + env(safe-area-inset-right, 0px));
    }

    .mobile-action-btn
    {
        width: 50px;
        height: 50px;
        font-size: 12px;
        bottom: calc(95px + env(safe-area-inset-bottom, 20px));
        right: calc(33px + env(safe-area-inset-right, 0px));
    }

    /* HUD 进一步缩小 */
    #playerHUD
    {
        bottom: 6px;
    }

    .hud-controls
    {
        gap: 6px;
        padding: 4px 10px;
        font-size: 9px;
    }
}

@media (max-width: 360px)
{
    .auth-panel
    {
        padding: 16px 12px;
    }

    .auth-header h1 { font-size: 16px; }
    .auth-header p { font-size: 10px; }
    .auth-header { margin-bottom: 12px; }
    .auth-form h2 { font-size: 13px; }
    .input-group input { padding: 8px 10px; font-size: 14px; border-radius: 8px; }
    .input-group label { font-size: 11px; }
    .auth-btn { padding: 10px; font-size: 13px; border-radius: 8px; }
    .auth-switch { font-size: 11px; }
    .auth-message { font-size: 11px; }
}

/* ===== 统计按钮 ===== */
.stats-btn
{
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    white-space: nowrap;
}

.stats-btn:hover
{
    background: rgba(255, 255, 255, 0.2);
}

/* ===== 统计面板遮罩 ===== */
.stats-overlay
{
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

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

.stats-panel
{
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(218, 165, 32, 0.3);
    border-radius: 16px;
    padding: 0;
    width: 90vw;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    position: relative; /* 为关闭按钮提供定位参考 */
}

.stats-header
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 20px 28px 16px;
    padding-right: 56px; /* 为关闭按钮留出空间 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.stats-header h2
{
    color: #DAA520;
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

/* 关闭按钮 - 绝对定位在面板右上角，脱离 flex 流，确保始终可点击 */
.stats-close-btn
{
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    line-height: 1;
    outline: none;
}

.stats-close-btn:hover,
.stats-close-btn:active
{
    background: rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    transform: scale(1.1);
}

/* 可滚动内容区 */
.stats-panel-body
{
    padding: 20px 28px 28px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* ===== 统计概览卡片 ===== */
.stats-summary
{
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card
{
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    min-width: 0;
}

.stat-label
{
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.stat-value
{
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stat-value.stat-active
{
    color: #4caf50;
    font-size: 16px;
}

/* ===== 统计表格 ===== */
.stats-table-section
{
    margin-bottom: 20px;
}

.stats-table-section h3
{
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    padding-left: 4px;
}

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

.stats-table th
{
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stats-table td
{
    color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-variant-numeric: tabular-nums;
}

.stats-table tbody tr:hover
{
    background: rgba(255, 255, 255, 0.03);
}

.stats-table td:first-child { color: #DAA520; }

/* 删除记录按钮 */
.stat-del-btn
{
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.4;
    transition: all 0.2s;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.stat-del-btn:hover
{
    opacity: 1;
    background: rgba(255, 77, 77, 0.25);
    color: #ff4d4d;
    transform: scale(1.15);
}

/* ===== 排行榜列表 ===== */
.leaderboard-list
{
    width: 100%;
}

.leaderboard-row
{
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    transition: background 0.2s;
}

.leaderboard-row:hover
{
    background: rgba(255, 255, 255, 0.03);
}

.leaderboard-row.is-me
{
    background: rgba(218, 165, 32, 0.12);
    border-radius: 8px;
    border-bottom: none;
    margin: 2px 0;
}

.leaderboard-rank
{
    width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.leaderboard-name
{
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-active
{
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 6px #4caf50;
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

.leaderboard-time
{
    width: 80px;
    text-align: right;
    color: #DAA520;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.leaderboard-sessions
{
    width: 44px;
    text-align: right;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    flex-shrink: 0;
}

.leaderboard-empty
{
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    padding: 20px;
    font-size: 13px;
}

/* ===== 每日任务面板 ===== */
.task-overlay
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 30, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.task-overlay.hidden
{
    opacity: 0;
    pointer-events: none;
}

.task-panel
{
    background: rgba(20, 20, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    width: 560px;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.4s ease;
    position: relative;
}

.task-close-btn
{
    position: absolute;
    top: 14px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-close-btn:hover
{
    background: rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.task-panel-header
{
    padding: 18px 24px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.task-panel-header h2
{
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
}

.task-tabs
{
    display: flex;
    gap: 4px;
}

.task-tab
{
    padding: 8px 18px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
}

.task-tab:hover
{
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.task-tab.active
{
    color: #fff;
    background: rgba(102, 126, 234, 0.3);
    border-bottom: 2px solid #667eea;
}

.task-panel-body
{
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.task-tab-content
{
    display: none;
}

.task-tab-content.active
{
    display: block;
    animation: fadeInUp 0.25s ease;
}

/* 日期导航栏 */
.task-date-bar
{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.task-date-nav
{
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
}

.task-date-nav:hover
{
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.task-date-input
{
    flex: 1;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    outline: none;
}

.task-date-input:focus
{
    border-color: rgba(102, 126, 234, 0.6);
}

.task-date-today
{
    padding: 6px 16px;
    border: 1px solid rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
}

.task-date-today:hover
{
    background: rgba(102, 126, 234, 0.3);
    color: #fff;
}

/* 添加任务行 */
.task-add-row
{
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.task-add-input
{
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.task-add-input:focus
{
    border-color: rgba(102, 126, 234, 0.5);
}

.task-add-category
{
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    cursor: pointer;
    min-width: 70px;
}

.task-add-category option
{
    background: #1a1a2e;
    color: #fff;
}

.task-add-btn
{
    padding: 10px 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}

.task-add-btn:hover
{
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.task-add-btn:active { transform: translateY(0); }

/* 进度条 */
.task-progress-bar
{
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.task-progress-fill
{
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.task-progress-text
{
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 12px;
    text-align: right;
}

/* 任务列表 */
.task-list
{
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
}

.task-item
{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    transition: all 0.2s;
}

.task-item:hover
{
    background: rgba(255, 255, 255, 0.08);
}

.task-item.completed
{
    opacity: 0.5;
}

.task-item.completed .task-item-title
{
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.35);
}

.task-checkbox
{
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.task-checkbox:hover
{
    border-color: #667eea;
}

.task-checkbox.checked
{
    background: #667eea;
    border-color: #667eea;
}

.task-checkbox.checked::after
{
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.task-item-body
{
    flex: 1;
    min-width: 0;
}

.task-item-title
{
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
}

.task-item-meta
{
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

.task-category-tag
{
    padding: 1px 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    color: #8899ee;
    font-size: 10px;
}

.task-item-actions
{
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.task-timer-btn
{
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.task-timer-btn:hover
{
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.task-timer-btn.running
{
    background: rgba(76, 175, 80, 0.25);
    border-color: rgba(76, 175, 80, 0.4);
    color: #4caf50;
    animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border
{
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(76, 175, 80, 0); }
}

.task-timer-display
{
    font-size: 12px;
    color: #4caf50;
    font-variant-numeric: tabular-nums;
    min-width: 50px;
    text-align: center;
    font-weight: 500;
}

.task-delete-btn
{
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 14px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-delete-btn:hover
{
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

/* ===== 日历视图 ===== */
.task-calendar-nav
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.task-cal-nav
{
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
}

.task-cal-nav:hover
{
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.task-cal-title
{
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    min-width: 120px;
    text-align: center;
}

.task-calendar-grid
{
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.cal-weekday
{
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    padding: 8px 4px;
    font-weight: 500;
}

.cal-day
{
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s;
    position: relative;
    border: 1px solid transparent;
}

.cal-day:hover
{
    background: rgba(255, 255, 255, 0.08);
}

.cal-day.today
{
    border-color: rgba(102, 126, 234, 0.5);
    color: #667eea;
    font-weight: 600;
}

.cal-day.other-month
{
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.cal-day-dots
{
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.cal-dot
{
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.cal-dot.done { background: #4caf50; }
.cal-dot.pending { background: #ff9800; }

.task-cal-legend
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.cal-dot-done, .cal-dot-partial, .cal-dot-none
{
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.cal-dot-done { background: #4caf50; }
.cal-dot-partial { background: #ff9800; }
.cal-dot-none { background: rgba(255, 255, 255, 0.15); }

/* ===== 数据面板 ===== */
.task-stat-cards
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.task-stat-card
{
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.tsc-value
{
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.tsc-label
{
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.task-chart-section
{
    margin-bottom: 20px;
}

.task-chart-section h3
{
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    font-weight: 500;
}

/* 柱状图 */
.task-bar-chart
{
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.task-bar-col
{
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.task-bar-stack
{
    width: 100%;
    max-width: 18px;
    border-radius: 3px 3px 0 0;
    display: flex;
    flex-direction: column-reverse;
    min-height: 2px;
}

.task-bar-done
{
    background: rgba(102, 126, 234, 0.7);
    border-radius: 3px 3px 0 0;
}

.task-bar-pending
{
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 3px 3px;
}

.task-bar-label
{
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    transform: rotate(-45deg);
    transform-origin: center;
    white-space: nowrap;
    margin-top: 4px;
}

/* 分类列表 */
.task-cat-list
{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-cat-row
{
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-cat-name
{
    width: 60px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.task-cat-bar-wrap
{
    flex: 1;
    height: 18px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.task-cat-bar
{
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.4s ease;
}

.task-cat-count
{
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    min-width: 50px;
    text-align: right;
}

/* 顶部清单按钮 */
.task-top-btn
{
    padding: 6px 18px;
    background: rgba(102, 126, 234, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.35);
    border-radius: 8px;
    color: #8899ee;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s;
}

.task-top-btn:hover
{
    background: rgba(102, 126, 234, 0.25);
    color: #aabbff;
}

/* ===== 移动端适配 ===== */
@media (max-width: 500px)
{
    .stats-panel
    {
        width: 95vw;
        border-radius: 12px;
    }

    .stats-header { padding: 16px 16px 12px; }
    .stats-panel-body { padding: 16px 16px 20px; }
    .stats-header h2 { font-size: 17px; }
    .stat-value { font-size: 17px; }
    .stat-value.stat-active { font-size: 14px; }
    .stat-label { font-size: 10px; }
    .stat-card { padding: 12px 8px; }
    .stats-table { font-size: 12px; }
    .stats-table th,
    .stats-table td { padding: 6px 8px; }
    .leaderboard-row { font-size: 12px; padding: 8px 10px; }
    .leaderboard-rank { width: 30px; font-size: 13px; }
    .leaderboard-time { width: 65px; }
    .leaderboard-sessions { width: 36px; font-size: 10px; }

    .task-panel
    {
        width: 95vw;
        border-radius: 12px;
    }

    .task-panel-header { padding: 12px 12px 8px; }
    .task-panel-body { padding: 12px; }
    .task-panel-header h2 { font-size: 17px; }
    .task-tab { font-size: 11px; padding: 6px 10px; }

    .task-date-bar { gap: 6px; }
    .task-date-input { font-size: 13px; padding: 6px 10px; }
    .task-date-nav, .task-date-today { font-size: 10px; padding: 6px 10px; }

    .task-add-row { flex-wrap: wrap; gap: 6px; }
    .task-add-input { flex: 1 1 100%; font-size: 13px; }
    .task-add-category { font-size: 11px; }
    .task-add-btn { font-size: 12px; padding: 8px 16px; }

    .task-item { font-size: 12px; padding: 10px; }
    .task-item-title { font-size: 13px; }
    .task-timer-display { font-size: 11px; }

    .cal-weekday { font-size: 11px; padding: 6px; }
    .cal-day { font-size: 12px; width: 30px; height: 30px; }
    .task-stat-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .task-stat-card { padding: 12px; }
    .tsc-value { font-size: 20px; }
    .tsc-label { font-size: 10px; }
}



/*# sourceMappingURL=main.css.map*/