/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

:root {
    --primary-pink: #ffb6c1;
    --primary-blue: #add8e6;
    --bg-color: #fff5f8;
    --text-color: #e85c8e;
    --shadow-color: rgba(255, 182, 193, 0.3);
}

html {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(var(--primary-pink) 5px, transparent 5px),
        radial-gradient(var(--primary-blue) 5px, transparent 5px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: "Comic Sans MS", "Bubblegum Sans", "Arial Rounded MT Bold", sans-serif;
    overflow: hidden;
    padding: 20px;
    cursor: pointer;
    transition: all 0.5s ease;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
    touch-action: manipulation;
    position: relative;
}

body.night-mode {
    --bg-color: #1a1a2e;
    --text-color: #ff9bb3;
    --shadow-color: rgba(255, 105, 180, 0.2);
    background-image: 
        radial-gradient(#4a4a6a 3px, transparent 3px),
        radial-gradient(#6a6a8a 3px, transparent 3px);
}

body.snow-mode {
    --bg-color: #e8f4f8;
    --primary-pink: #b8d4e3;
    --primary-blue: #d4e5ed;
    background-image: 
        radial-gradient(#ffffff 5px, transparent 5px),
        radial-gradient(#e0f0f8 5px, transparent 5px);
}

body.autumn-mode {
    --bg-color: #fff8f0;
    --primary-pink: #f4a460;
    --primary-blue: #deb887;
    background-image: 
        radial-gradient(#ffcc99 5px, transparent 5px),
        radial-gradient(#ffb366 5px, transparent 5px);
}

body.star-mode {
    --bg-color: #0f0f23;
    --primary-pink: #4a4a6a;
    --primary-blue: #3a3a5a;
    background-image: 
        radial-gradient(#6a6a8a 3px, transparent 3px),
        radial-gradient(#5a5a7a 3px, transparent 3px);
}

/* ========== Canvas 粒子背景 ========== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    transform: translateZ(0);
}

/* ========== 鼠标/触摸跟随尾巴 ========== */
.cat-tail {
    position: fixed;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease-out;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
    will-change: transform;
}

.cat-tail::before {
    content: '🐾';
    font-size: 24px;
    position: absolute;
    animation: tailWag 0.6s ease-in-out infinite alternate;
}

@keyframes tailWag {
    0% { transform: rotate(-5deg) scale(1); }
    100% { transform: rotate(5deg) scale(1.05); }
}

/* ========== 汉堡菜单按钮 - 圆角方形 ========== */
.hamburger-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
    cursor: pointer;
    font-size: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.5);
}

.hamburger-btn.active {
    background: linear-gradient(135deg, #8cb4e3, #5b9bd5);
    transform: scale(1.05);
}

body.night-mode .hamburger-btn,
body.star-mode .hamburger-btn {
    background: linear-gradient(135deg, #6a6a8a, #4a4a6a);
    color: white;
}

body.night-mode .hamburger-btn.active,
body.star-mode .hamburger-btn.active {
    background: linear-gradient(135deg, #8cb4e3, #5b9bd5);
}

/* ========== 功能菜单面板 - 改为横向排列 ========== */
.function-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    padding: 12px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    transform: scale(0);
    opacity: 0;
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.function-menu.show {
    transform: scale(1);
    opacity: 1;
}

.function-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #f8f8f8, #ffe4e1);
    cursor: pointer;
    font-size: 18px;
    color: #e85c8e;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.function-btn:hover {
    transform: scale(1.15);
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    color: white;
}

.function-btn::after {
    content: attr(data-title);
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.function-btn:hover::after {
    opacity: 1;
    top: -40px;
}

body.night-mode .function-menu,
body.star-mode .function-menu {
    background: rgba(40, 40, 60, 0.98);
}

body.night-mode .function-btn,
body.star-mode .function-btn {
    background: linear-gradient(135deg, #4a4a6a, #3a3a5a);
    color: #ff9bb3;
}

body.night-mode .function-btn:hover,
body.star-mode .function-btn:hover {
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    color: white;
}

body.snow-mode .function-menu {
    background: rgba(255, 255, 255, 0.98);
}

body.autumn-mode .function-menu {
    background: rgba(255, 248, 240, 0.98);
}

/* ========== 中心容器 ========== */
.container {
    width: 100%;
    max-width: 550px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 40px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 5px solid #ffe4e1;
    position: relative;
    z-index: 10;
    text-align: center;
    animation: gentleFloat 6s ease-in-out infinite;
    transition: all 0.5s ease;
    will-change: transform;
    transform: translateZ(0);
    margin-bottom: 60px;
}

body.night-mode .container,
body.snow-mode .container,
body.autumn-mode .container,
body.star-mode .container {
    background-color: rgba(40, 40, 60, 0.95);
    border-color: #4a4a6a;
}

body.snow-mode .container {
    background-color: rgba(255, 255, 255, 0.95);
    border-color: #b8d4e3;
}

body.autumn-mode .container {
    background-color: rgba(255, 248, 240, 0.95);
    border-color: #f4a460;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-8px) translateZ(0); }
}

@media (max-width: 768px) {
    .container {
        animation: none;
        transform: translateY(0);
        margin-bottom: 50px;
    }
}

/* 装饰元素 */
.decor {
    position: absolute;
    z-index: -1;
    animation: gentleSpin 12s linear infinite;
}

.decor.heart {
    top: -20px;
    left: 20px;
    color: #ff69b4;
}

.decor.star {
    bottom: -15px;
    right: 30px;
    color: #ffd700;
    animation-direction: reverse;
}

@keyframes gentleSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== 图片样式 ========== */
#mainImage {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 25px;
    display: block;
    border: 8px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background-color: #ffeef2;
    cursor: pointer;
    -webkit-user-drag: none;
    user-drag: none;
    transform: translateZ(0);
    will-change: transform;
}

#mainImage:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    #mainImage {
        width: 160px;
        height: 160px;
        border-width: 5px;
    }
    
    #mainImage:hover {
        transform: none;
    }
    #mainImage:active {
        transform: scale(0.95);
    }
}

#mainImage.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== 问题文字 ========== */
#question {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--text-color);
    margin-bottom: 30px;
    text-shadow: 2px 2px 5px var(--shadow-color);
    line-height: 1.3;
    min-height: 3.5rem;
    position: relative;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--text-color);
    margin-left: 2px;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ========== 按钮容器 ========== */
.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 20;
    min-height: 60px;
}

/* ========== 按钮样式 ========== */
button {
    font-family: inherit;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
    will-change: transform;
    min-height: 44px;
    min-width: 120px;
}

button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

button:hover:before {
    left: 100%;
}

@media (max-width: 768px) {
    button {
        padding: 12px 20px;
        min-width: 140px;
        font-size: 1.1rem;
    }
    
    button:hover {
        transform: none;
    }
    button:active {
        transform: scale(0.95);
    }
}

#yes {
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    color: white;
}

#yes:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.4);
}

#no {
    background: linear-gradient(135deg, #8cb4e3, #5b9bd5);
    color: white;
    position: relative;
    touch-action: none;
}

#no:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(91, 155, 213, 0.4);
}

/* ========== 点击特效 ========== */
.click-effect {
    position: fixed;
    pointer-events: none;
    z-index: 9997;
    font-size: 30px;
    animation: clickExplode 1s ease-out forwards;
    transform: translateZ(0);
}

@keyframes clickExplode {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -120%) scale(0.5);
        opacity: 0;
    }
}

/* ========== 爱心动画元素 ========== */
.heart {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #ff69b4;
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 5;
    will-change: transform, opacity;
}

.heart:before, .heart:after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #ff69b4;
    border-radius: 50%;
}

.heart:before { top: -12px; left: 0; }
.heart:after { top: 0; left: -12px; }

@keyframes floatHeart {
    0% {
        transform: rotate(45deg) translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(45deg) translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

/* ========== 星星动画元素 ========== */
.star {
    position: absolute;
    color: #ffd700;
    animation: twinkle 2s infinite alternate;
    will-change: transform, opacity;
}

@keyframes twinkle {
    from { transform: scale(0.8); opacity: 0.7; }
    to { transform: scale(1.2); opacity: 1; }
}

/* ========== 成功页面 ========== */
.yes-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #fff0f3;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff9bb3' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 1s ease;
    padding: 20px;
    cursor: default;
    transform: translateZ(0);
}

body.night-mode .yes-screen {
    background-color: #1a1a2e;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236a6a8a' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.text-container {
    text-align: center;
    margin-bottom: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yes-text {
    font-size: clamp(1.8rem, 7vw, 3rem);
    color: #e66481;
    text-shadow: 3px 3px 8px rgba(255,180,200,0.6);
    line-height: 1.4;
    animation: gentlePulse 2s ease infinite;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.egg-text {
    color: #ff8c00;
    text-shadow: 3px 3px 8px rgba(255,140,0,0.4);
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.yes-image {
    width: 80%;
    max-width: 350px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 8px solid white;
    animation: pop 0.8s ease;
    margin-bottom: 20px;
    -webkit-user-drag: none;
    user-drag: none;
}

@keyframes pop {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========== 视频容器 ========== */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    opacity: 0;
    transition: opacity 1.5s ease;
    transform: translateZ(0);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container.show {
    opacity: 1;
}

#彩蛋视频 {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    playsinline: true;
    webkit-playsinline: true;
}

@media (max-aspect-ratio: 9/16) {
    #彩蛋视频 {
        width: 100%;
        height: auto;
        max-height: 100vh;
    }
}

@media (max-width: 768px) {
    .video-container {
        height: 100vh;
        height: -webkit-fill-available;
    }
    
    #彩蛋视频 {
        object-fit: contain;
        width: 100%;
        height: auto;
        max-height: 100%;
    }
}

.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls,
.video-container.show .video-controls {
    opacity: 1;
}

.video-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* ========== 音乐可视化 ========== */
.music-visualizer {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 40px;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
    bottom: 80px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .music-visualizer {
        bottom: 70px;
    }
}

.music-visualizer.active {
    opacity: 1;
}

.visualizer-bar {
    width: 6px;
    background: linear-gradient(to top, #ff69b4, #ff9bb3);
    border-radius: 3px;
    transition: height 0.1s ease;
    will-change: height;
}

body.night-mode .visualizer-bar {
    background: linear-gradient(to top, #9b59b6, #e74c3c);
}

/* ========== 钓鱼小游戏 - 改为小窗口 ========== */
.fishing-game-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 500px;
    height: 70vh;
    max-height: 600px;
    background: linear-gradient(180deg, #87CEEB 0%, #4682B4 100%);
    border-radius: 30px;
    z-index: 9996;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 4px solid white;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fishing-game-modal.show {
    transform: translate(-50%, -50%) scale(1);
}

.fishing-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fishing-title {
    color: #e85c8e;
    font-size: 1.3rem;
    font-weight: bold;
}

.fishing-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.fish-count {
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
}

.fish-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(135, 206, 235, 0.3) 0%, rgba(70, 130, 180, 0.5) 100%);
}

.fish {
    position: absolute;
    font-size: 35px;
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.fish:hover {
    transform: scale(1.1);
}

.fish.caught {
    animation: fishCaught 0.5s ease forwards;
}

@keyframes fishCaught {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.5) rotate(180deg); }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.fishing-controls {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.fishing-btn {
    font-family: inherit;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    height: 45px;
    padding: 0 22px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
    will-change: transform;
    color: white;
    white-space: nowrap;
}

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

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

.end-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
}

.end-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.fish-emoji {
    position: absolute;
    font-size: 24px;
    pointer-events: none;
    animation: floatUp 1s ease forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}

/* ========== 关闭按钮 ========== */
.close-game {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    border-radius: 9px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-game:hover {
    background: #ff4444;
    transform: scale(1.1);
}

/* ========== 成就系统样式 ========== */
.achievement-popup {
    position: fixed;
    top: 80px;
    right: -400px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b4513;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 350px;
    border: 2px solid #fff;
}

.achievement-popup.show {
    right: 20px;
}

.achievement-icon {
    font-size: 2rem;
}

.achievement-content h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #8b4513;
}

.achievement-content p {
    margin: 2px 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.achievement-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 9996;
    padding: 25px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto;
}

.achievement-panel.show {
    transform: translate(-50%, -50%) scale(1);
}

.achievement-panel h2 {
    color: #e85c8e;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.achievement-item {
    background: #f8f8f8;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, #fff9e6, #fff5d6);
    border-color: #ffd700;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
}

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-item i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.achievement-item.unlocked i {
    color: #ffd700;
}

.achievement-item.locked i {
    color: #ccc;
}

.achievement-item h5 {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

.achievement-item p {
    margin: 5px 0 0;
    font-size: 0.75rem;
    color: #666;
}

/* ========== 天气切换面板 - 改为横向且提高层级 ========== */
.weather-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    padding: 12px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1002; /* 提高层级 */
    display: flex;
    flex-direction: row;
    gap: 8px;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    transform-origin: top right;
}

.weather-panel.show {
    transform: scale(1);
    opacity: 1;
}

.weather-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #f0f0f0, #ffe4e1);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.weather-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
}

.weather-btn.active {
    border-color: #ff69b4;
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    transform: scale(1.1);
}

/* ========== 分享面板 ========== */
.share-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 9996;
    padding: 25px;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-panel.show {
    transform: translate(-50%, -50%) scale(1);
}

.share-panel h3 {
    color: #e85c8e;
    margin-bottom: 15px;
}

#qrcode {
    margin: 15px auto;
    padding: 10px;
    background: white;
    border-radius: 10px;
    display: inline-block;
}

.share-url {
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0;
    word-break: break-all;
}

.copy-btn {
    font-family: inherit;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    height: 45px;
    padding: 0 22px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
    will-change: transform;
    background: linear-gradient(135deg, #ff9bb3, #ff69b4);
    color: white;
    margin-top: 10px;
    white-space: nowrap;
}

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

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

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #90ee90, #32cd32);
}

.copy-btn.copied:hover {
    box-shadow: 0 8px 20px rgba(144, 238, 144, 0.4);
}

/* ========== 海报下载面板 ========== */
.poster-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 450px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 9996;
    padding: 25px;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.poster-panel.show {
    transform: translate(-50%, -50%) scale(1);
}

.poster-panel h3 {
    color: #e85c8e;
    margin-bottom: 15px;
}

.poster-display {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.poster-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.poster-btns button {
    padding: 12px 25px;
    font-size: 1rem;
}

/* ========== 欢迎回来弹窗 ========== */
.welcome-back {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 90%;
    max-width: 350px;
    background: linear-gradient(135deg, #fff5f8, #ffe4e1);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(255, 105, 180, 0.4);
    z-index: 10002;
    padding: 30px;
    text-align: center;
    border: 3px solid #ff69b4;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.welcome-back.show {
    transform: translate(-50%, -50%) scale(1);
}

.welcome-back h2 {
    color: #e85c8e;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.stat-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 15px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff69b4;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* ========== 手势画布 ========== */
#gesture-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* ========== 遮罩层 ========== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9995;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ========== 底部版权信息 ========== */
#copyright {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 12px 20px;
    font-size: 12px;
    color: #999;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    z-index: 100;
    text-align: center;
    line-height: 1.4;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 182, 193, 0.3);
}

body.night-mode #copyright {
    color: #888;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: rgba(26, 26, 46, 0.8);
    border-top-color: rgba(74, 74, 106, 0.3);
}

body.snow-mode #copyright {
    background: rgba(232, 244, 248, 0.8);
}

body.autumn-mode #copyright {
    background: rgba(255, 248, 240, 0.8);
}

/* ========== 媒体查询 ========== */
@media (max-width: 768px) {
    .hamburger-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: 15px;
        right: 15px;
    }

    .function-menu {
        top: 70px;
        right: 15px;
        padding: 10px;
        gap: 6px;
        flex-wrap: wrap;
        max-width: calc(100vw - 30px);
        justify-content: flex-end;
    }

    .function-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .function-btn::after {
        top: -30px;
        font-size: 11px;
    }

    .weather-panel {
        top: 70px;
        right: 15px;
        padding: 10px;
        gap: 6px;
        z-index: 1002;
        flex-wrap: wrap;
        max-width: 90vw;
    }

    .weather-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .container {
        padding: 20px 15px;
        border-width: 3px;
        border-radius: 30px;
        max-width: calc(100vw - 30px);
        margin-bottom: 45px;
        margin-top: 10px;
    }
    
    #mainImage {
        width: 150px;
        height: 150px;
        border-width: 5px;
        margin-bottom: 15px;
    }
    
    button {
        padding: 12px 20px;
        min-width: 130px;
        font-size: 1.1rem;
    }
    
    .buttons {
        gap: 12px;
    }

    #question {
        font-size: clamp(1.5rem, 4.5vw, 2rem);
        margin-bottom: 20px;
    }
    
    .yes-text {
        font-size: clamp(1.3rem, 5vw, 2rem);
    }

    .fishing-game-modal {
        width: 95%;
        height: 60vh;
        max-height: 500px;
    }

    .fishing-title {
        font-size: 1.1rem;
    }

    .fish-count {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .fishing-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .copy-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .fish {
        font-size: 30px;
    }
    
    .achievement-popup {
        max-width: 280px;
        padding: 12px 15px;
        top: 70px;
    }

    .achievement-popup.show {
        right: 10px;
    }

    .achievement-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #copyright {
        font-size: 11px;
        padding: 10px 15px;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 15px 10px;
        margin-bottom: 40px;
    }
    
    #mainImage {
        width: 130px;
        height: 130px;
    }
    
    button {
        padding: 10px 15px;
        min-width: 110px;
        font-size: 1rem;
    }

    .function-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .function-menu {
        gap: 5px;
    }

    .fishing-btn {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }

    .copy-btn {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }
}

@media (max-height: 600px) {
    .container {
        padding: 15px;
    }

    #mainImage {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
}

@supports (padding-top: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .hamburger-btn {
        top: calc(15px + env(safe-area-inset-top));
        right: calc(15px + env(safe-area-inset-right));
    }

    .function-menu {
        top: calc(70px + env(safe-area-inset-top));
        right: calc(15px + env(safe-area-inset-right));
    }

    .weather-panel {
        top: calc(70px + env(safe-area-inset-top));
        right: calc(15px + env(safe-area-inset-right));
    }
    
    #copyright {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .container {
        margin-bottom: calc(45px + env(safe-area-inset-bottom));
    }
}

/* 赞助窗口样式 */
.sponsor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sponsor-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.sponsor-content {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 90%;
    max-height: 80vh;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.sponsor-modal.show .sponsor-content {
    transform: scale(1);
}

.sponsor-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 15px;
}

.sponsor-info {
    text-align: center;
    margin-top: 15px;
}

.cute-text {
    font-family: "Comic Sans MS", "Bubblegum Sans", "Arial Rounded MT Bold", sans-serif;
    font-size: 1rem;
    color: #e85c8e;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(255, 182, 193, 0.3);
}

.email-text {
    font-family: "Comic Sans MS", "Bubblegum Sans", "Arial Rounded MT Bold", sans-serif;
    font-size: 1.1rem;
    color: #5b9bd5;
    margin: 10px 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(140, 180, 227, 0.3);
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        transform: scale(0.85);
        margin-bottom: 40px;
    }

    #mainImage {
        width: 100px;
        height: 100px;
    }

    .fishing-game-modal {
        height: 80vh;
        max-height: 400px;
    }
}

/* 480px 适配 */
@media (max-width: 480px) {
    .function-menu {
        gap: 5px;
        padding: 8px;
    }

    .function-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .fishing-game-modal {
        max-width: 92vw;
        height: 65vh;
    }

    .poster-btns {
        flex-wrap: wrap;
        gap: 8px;
    }

    .poster-btns button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .welcome-back {
        max-width: 92vw;
        padding: 22px;
    }

    .sponsor-content {
        max-width: 92vw;
        padding: 16px;
    }

    .sponsor-image {
        max-width: 100%;
    }
}