* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: #1a1a2e;
    font-size: 16px;
    line-height: 1.5;
}

/* 主容器 */
#garden-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: relative;
    overflow: hidden;
    transition: all 2s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 双层背景实现渐变过渡 */
#garden-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/garden-gloomy.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    z-index: 0;
}

#garden-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/garden-bright.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0;
    transition: opacity 2s ease;
}

#garden-container.bright::after {
    opacity: 1;
}

/* 天空（保留兼容） */
#sky {
    display: none;
}

/* 草地（保留兼容） */
#grass {
    display: none;
}

/* 标题 */
#garden-title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    z-index: 10;
    width: 100%;
    padding: 0 20px;
}

#garden-title h1 {
    font-size: 2.5em;
    margin-bottom: 8px;
    white-space: nowrap;
}

#garden-title p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 整体进度 */
#overall-progress {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 1em;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
}

/* 背景音乐开关按钮 */
.music-toggle {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.music-toggle:active {
    transform: scale(0.9);
    background: rgba(0,0,0,0.7);
}

.music-toggle.playing {
    background: rgba(78, 205, 196, 0.6);
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(78, 205, 196, 0); }
}

/* 花园元素 */
.garden-element {
    position: absolute;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
    z-index: 10;
    -webkit-user-select: none;
    user-select: none;
}

.garden-element:active {
    transform: scale(0.95);
}

.garden-element::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,200,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.garden-element:active::after {
    opacity: 1;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.element-label {
    color: white;
    font-size: 1em;
    margin-top: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
    font-weight: bold;
    background: rgba(0,0,0,0.3);
    padding: 4px 12px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: inline-block;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
    margin: 6px auto 0;
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffd700, #32cd32);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 5px rgba(255,215,0,0.5);
}

/* 模块图标容器 */
.module-icon-wrap {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    transition: all 1s ease;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

/* 大树状态 */
.tree-withered {
    filter: grayscale(40%) brightness(0.8) sepia(20%) drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    transform: scale(0.85);
}

.tree-grown {
    filter: grayscale(0%) brightness(1.1) saturate(1.2) drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    transform: scale(1.05);
    animation: tree-sway 4s ease-in-out infinite;
}

/* 房屋状态 */
.house-broken {
    filter: grayscale(30%) brightness(0.8) sepia(10%) drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    transform: scale(0.85);
}

.house-fixed {
    filter: grayscale(0%) brightness(1.1) saturate(1.2) drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    transform: scale(1.05);
}

/* 围栏状态 */
.fence-broken {
    filter: grayscale(40%) brightness(0.75) sepia(15%) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    opacity: 0.7;
    transform: scale(0.85);
}

.fence-complete {
    filter: grayscale(0%) brightness(1.1) saturate(1.2) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    opacity: 1;
    transform: scale(1.05);
}

/* 院坝/射箭状态 */
.yard-dry {
    filter: grayscale(50%) brightness(0.7) sepia(20%) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    transform: scale(0.85);
}

.yard-lively {
    filter: grayscale(0%) brightness(1.1) saturate(1.3) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    transform: scale(1.05);
    animation: sway 3s ease-in-out infinite;
}

/* 大树区域 */
#tree-area {
    left: 15%;
    top: 20%;
    width: 200px;
    height: auto;
}

@keyframes tree-sway {
    0%, 100% { transform: scale(1.1) rotate(-1deg); }
    50% { transform: scale(1.1) rotate(1deg); }
}

/* 房屋区域 */
#house-area {
    right: 20%;
    top: 25%;
    width: 250px;
    height: 250px;
}

#house {
    width: 120px;
    height: 100px;
    position: relative;
    transition: all 1s ease;
    margin: 0 auto;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

.house-broken {
    filter: grayscale(20%) brightness(0.9) drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    opacity: 0.8;
}

.house-fixed {
    filter: grayscale(0%) brightness(1.1) drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
    opacity: 1;
}

.house-body {
    width: 100px;
    height: 70px;
    background: #deb887;
    position: absolute;
    bottom: 0;
    left: 10px;
    border: 2px solid #8b4513;
}

.house-roof {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 40px solid #8b0000;
    position: absolute;
    top: -5px;
    left: 0;
}

.house-door {
    width: 30px;
    height: 45px;
    background: #654321;
    position: absolute;
    bottom: 0;
    left: 45px;
    border-radius: 5px 5px 0 0;
}

.house-window {
    width: 25px;
    height: 25px;
    background: #87ceeb;
    position: absolute;
    top: 20px;
    left: 20px;
    border: 2px solid #8b4513;
}

/* 围栏区域 */
#fence-area {
    left: 10%;
    bottom: 25%;
    width: 180px;
    height: 100px;
}

#fence {
    display: flex;
    gap: 5px;
    justify-content: center;
    transition: all 1s ease;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.fence-broken {
    filter: grayscale(30%) brightness(0.8) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    opacity: 0.6;
}

.fence-complete {
    filter: grayscale(0%) brightness(1.1) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    opacity: 1;
}

.fence-post {
    width: 8px;
    height: 50px;
    background: linear-gradient(90deg, #8b4513, #d2691e, #8b4513);
    border-radius: 2px;
}

/* 院坝区域 */
#yard-area {
    right: 15%;
    bottom: 20%;
    width: 200px;
    height: 120px;
}

#yard {
    width: 150px;
    height: 60px;
    position: relative;
    transition: all 1s ease;
    margin: 0 auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.yard-dry {
    filter: grayscale(50%) brightness(0.7) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.yard-lively {
    filter: grayscale(0%) brightness(1.2) drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.yard-ground {
    width: 100%;
    height: 100%;
    background: #daa520;
    border-radius: 50%;
    opacity: 0.6;
}

.yard-flower {
    position: absolute;
    font-size: 28px;
    animation: sway 3s ease-in-out infinite;
}

.yard-flower:nth-child(2) { top: 0; left: 20px; animation-delay: 0s; }
.yard-flower:nth-child(3) { top: 5px; left: 60px; animation-delay: 0.5s; }
.yard-flower:nth-child(4) { top: 0; left: 100px; animation-delay: 1s; }

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* 弹窗 */
#modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

#modal-container.hidden {
    display: none;
}

#modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    position: relative;
    padding: 30px;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

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

#modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

#modal-close:active {
    background: #f0f0f0;
}

/* 模块通用样式 */
.module-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.module-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.module-header p {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

.module-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #888;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

/* 心灵树洞 */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    line-height: 1.6;
    animation: msgIn 0.3s ease;
    word-wrap: break-word;
    word-break: break-word;
}

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

.chat-message.user {
    background: #4ecdc4;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chat-message.ai {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}

.chat-input-area input:focus {
    border-color: #4ecdc4;
}

.chat-input-area button {
    padding: 12px 20px;
    background: #4ecdc4;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.chat-input-area button:active {
    background: #3db9b1;
}

/* 怪兽模块 */
.monster-container {
    text-align: center;
    margin: 10px 0 20px;
    position: relative;
}

.monster-name-area {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.monster-name-area input {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    text-align: center;
    width: 150px;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.monster-name-area button {
    padding: 10px 18px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    font-size: 1em;
    -webkit-appearance: none;
    appearance: none;
}

/* 怪兽嘲讽对话气泡 */
.monster-speech {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 14px 22px;
    border-radius: 20px;
    font-size: 1em;
    color: #c0392b;
    font-weight: bold;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    max-width: 320px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
    line-height: 1.5;
}

.monster-speech.show {
    opacity: 1;
    animation: speechBounce 0.4s ease;
}

.monster-speech::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 12px solid white;
}

@keyframes speechBounce {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.8); }
    50% { transform: translateX(-50%) translateY(-5px) scale(1.05); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.monster-image {
    width: auto;
    height: 45vh;
    max-height: 400px;
    min-height: 250px;
    object-fit: contain;
    transition: all 0.3s ease;
    margin-bottom: 0;
    margin-top: 60px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    border: none;
    outline: none;
    -webkit-mask-image: none;
    mask-image: none;
    filter: drop-shadow(0 15px 40px rgba(0,0,0,0.35));
}

#monster {
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0;
}

.monster-face {
    font-size: 220px;
    transition: all 0.3s ease;
    margin-bottom: 0;
    margin-top: -15px;
    line-height: 1;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
}

.monster-healthy .monster-face,
.monster-healthy .monster-image {
    animation: monsterIdle 2s ease-in-out infinite;
}

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

.monster-hurt .monster-face,
.monster-hurt .monster-image {
    animation: monsterHurt 0.4s ease;
}

@keyframes monsterHurt {
    0%, 100% { transform: translateX(0) scale(1); }
    20% { transform: translateX(-15px) rotate(-8deg) scale(0.95); filter: brightness(1.5); }
    40% { transform: translateX(15px) rotate(8deg) scale(0.95); }
    60% { transform: translateX(-10px) rotate(-5deg); }
    80% { transform: translateX(10px) rotate(5deg); }
}

.monster-defeated .monster-face,
.monster-defeated .monster-image {
    transform: rotate(90deg) scale(0.8);
    filter: grayscale(100%);
    animation: monsterFall 1s ease forwards;
}

@keyframes monsterFall {
    0% { transform: rotate(0) scale(1); opacity: 1; }
    100% { transform: rotate(90deg) translateY(50px) scale(0.7); opacity: 0.7; }
}

.monster-hp-bar {
    width: 320px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 5px auto 10px;
    overflow: hidden;
    max-width: 80vw;
}

.monster-hint {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    margin-top: 12px;
    font-style: italic;
    animation: hintPulse 2s ease-in-out infinite;
}

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

#monster {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

#monster:active .monster-image,
#monster:active .monster-face {
    transform: scale(0.95);
}

#monster-hp-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ee5a5a);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.attack-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.attack-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid;
    background: white;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.95em;
    font-weight: bold;
    -webkit-appearance: none;
    appearance: none;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.attack-btn:active {
    transform: scale(0.85);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.attack-icon {
    font-size: 2.5em;
    margin-bottom: 3px;
}

.attack-btn:nth-child(1) { border-color: #ff6b6b; color: #ff6b6b; background: #fff5f5; }
.attack-btn:nth-child(2) { border-color: #ffd93d; color: #e6a817; background: #fffdf0; }
.attack-btn:nth-child(3) { border-color: #6bcb77; color: #27ae60; background: #f5fff5; }

.attack-effect {
    position: absolute;
    pointer-events: none;
    font-size: 4em;
    opacity: 0;
    z-index: 20;
}

.attack-effect.show {
    animation: attackEffect 0.6s ease;
}

@keyframes attackEffect {
    0% { opacity: 1; transform: scale(0.3) translateY(0) rotate(-15deg); }
    50% { opacity: 1; transform: scale(1.3) translateY(-20px) rotate(10deg); }
    100% { opacity: 0; transform: scale(1.8) translateY(-50px) rotate(0deg); }
}

/* 射箭游戏 */
.archery-game {
    margin: 20px 0;
}

.archery-event {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 20px;
    position: relative;
}

.event-label {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 10px;
}

.event-text {
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.5;
}

.arrow-animation {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    animation: arrowShoot 1.5s ease-in-out infinite;
}

@keyframes arrowShoot {
    0% { transform: translateY(-50%) translateX(20px); opacity: 0; }
    50% { transform: translateY(-50%) translateX(0); opacity: 1; }
    100% { transform: translateY(-50%) translateX(-10px); opacity: 0; }
}

.archery-shields {
    text-align: center;
}

.shields-label {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.shields-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.shield-btn {
    padding: 15px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.95em;
    -webkit-appearance: none;
    appearance: none;
    min-height: 80px;
}

.shield-btn:active {
    transform: scale(0.97);
    border-color: #667eea;
}

.shield-btn.correct {
    border-color: #6bcb77;
    background: #f0fff0;
}

.shield-btn.wrong {
    border-color: #ff6b6b;
    background: #fff0f0;
}

.shield-emoji {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.shield-text {
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
    line-height: 1.4;
}

.shield-emotion {
    font-size: 0.85em;
    color: #888;
    line-height: 1.4;
}

.archery-feedback {
    text-align: center;
    padding: 15px;
    margin-top: 15px;
    border-radius: 10px;
    min-height: 50px;
    font-weight: bold;
    line-height: 1.5;
}

.feedback-correct {
    background: #f0fff0;
    color: #228b22;
}

.feedback-wrong {
    background: #fff0f0;
    color: #dc143c;
}

.next-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s;
    min-height: 50px;
    font-weight: bold;
    -webkit-appearance: none;
    appearance: none;
}

.next-btn:active {
    background: #5a6fd8;
}

/* 情绪自救模块 */
.rescue-section {
    margin: 20px 0;
}

.rescue-section.hidden {
    display: none;
}

.assessment-title {
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.level-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.level-card {
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    text-align: left;
}

.level-card:active {
    transform: scale(0.98);
}

.level-card.red {
    background: linear-gradient(135deg, #ffe5e5 0%, #ffcccc 100%);
    border-color: #ff6b6b;
}

.level-card.red:hover {
    background: linear-gradient(135deg, #ffcccc 0%, #ffb3b3 100%);
}

.level-card.yellow {
    background: linear-gradient(135deg, #fff9e6 0%, #fff0b3 100%);
    border-color: #ffd93d;
}

.level-card.yellow:hover {
    background: linear-gradient(135deg, #fff0b3 0%, #ffe680 100%);
}

.level-card.green {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #6bcb77;
}

.level-card.green:hover {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.level-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.level-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 4px;
}

.level-card.red .level-name { color: #c0392b; }
.level-card.yellow .level-name { color: #e67e22; }
.level-card.green .level-name { color: #27ae60; }

.level-subtitle {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.level-desc {
    font-size: 0.85em;
    color: #777;
    line-height: 1.6;
}

.back-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.95em;
    padding: 5px 0;
    margin-bottom: 15px;
    -webkit-appearance: none;
    appearance: none;
}

.back-btn:hover {
    color: #333;
}

.solution-header {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.solution-header.red {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
}

.solution-header.yellow {
    background: linear-gradient(135deg, #ffd93d 0%, #f0c419 100%);
    color: #665c00;
}

.solution-header.green {
    background: linear-gradient(135deg, #6bcb77 0%, #4caf50 100%);
    color: white;
}

.solution-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.solution-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 6px;
}

.solution-empathy {
    font-size: 0.95em;
    line-height: 1.6;
    opacity: 0.95;
}

.solution-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.solution-step {
    background: white;
    padding: 18px;
    border-radius: 12px;
    border-left: 4px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.solution-step.red { border-left-color: #ff6b6b; }
.solution-step.yellow { border-left-color: #ffd93d; }
.solution-step.green { border-left-color: #6bcb77; }

.step-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-weight: bold;
    margin-right: 10px;
    font-size: 0.9em;
}

.solution-step.red .step-number { background: #ffe5e5; color: #ff6b6b; }
.solution-step.yellow .step-number { background: #fff9e6; color: #e67e22; }
.solution-step.green .step-number { background: #e8f5e9; color: #27ae60; }

.step-title {
    font-weight: bold;
    font-size: 1.05em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.step-content {
    color: #555;
    line-height: 1.7;
    font-size: 0.93em;
    padding-left: 38px;
}

.step-content p {
    margin-bottom: 8px;
}

.step-content ul {
    padding-left: 20px;
    margin: 8px 0;
}

.step-content li {
    margin-bottom: 5px;
}

.step-content .tip {
    background: #f9f9f9;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 8px;
}

.solution-step.red .step-content .tip { background: #fff5f5; }
.solution-step.yellow .step-content .tip { background: #fffdf0; }
.solution-step.green .step-content .tip { background: #f5fff5; }

.complete-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
    min-height: 50px;
}

.complete-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.hotline-box {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 15px;
    border: 2px dashed #ff6b6b;
}

.hotline-title {
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.hotline-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #c0392b;
}

.hotline-desc {
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

/* 情绪记录表 */
.mood-record-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-section {
    margin-bottom: 18px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-label {
    font-weight: bold;
    font-size: 0.95em;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label .label-icon {
    font-size: 1.1em;
}

.form-label .label-hint {
    font-size: 0.8em;
    font-weight: normal;
    color: #999;
    margin-left: auto;
}

.form-textarea {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    line-height: 1.6;
    -webkit-appearance: none;
    appearance: none;
}

.form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.solution-step.yellow .form-textarea:focus { border-color: #ffd93d; }
.solution-step.green .form-textarea:focus { border-color: #6bcb77; }

.emotion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emotion-tag {
    padding: 6px 14px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.emotion-tag:active {
    transform: scale(0.95);
}

.emotion-tag.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.solution-step.yellow .emotion-tag.selected {
    background: #ffd93d;
    border-color: #ffd93d;
    color: #665c00;
}

.solution-step.green .emotion-tag.selected {
    background: #6bcb77;
    border-color: #6bcb77;
    color: white;
}

.intensity-slider {
    width: 100%;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.intensity-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e8e8e8;
    outline: none;
}

.intensity-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.solution-step.yellow .intensity-slider input[type="range"]::-webkit-slider-thumb {
    background: #ffd93d;
}

.solution-step.green .intensity-slider input[type="range"]::-webkit-slider-thumb {
    background: #6bcb77;
}

.intensity-value {
    min-width: 36px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    color: #667eea;
}

.solution-step.yellow .intensity-value { color: #e67e22; }
.solution-step.green .intensity-value { color: #27ae60; }

.intensity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #aaa;
    padding: 0 2px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.save-record-btn {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px;
}

.solution-step.yellow .save-record-btn {
    background: linear-gradient(135deg, #ffd93d 0%, #f0c419 100%);
    color: #665c00;
}

.solution-step.green .save-record-btn {
    background: linear-gradient(135deg, #6bcb77 0%, #4caf50 100%);
}

.save-record-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.view-records-btn {
    padding: 14px 18px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.view-records-btn:active {
    background: #e8e8e8;
}

/* 情绪记录列表 */
.records-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.record-item {
    background: #fafafa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #ddd;
}

.record-item.red { border-left-color: #ff6b6b; }
.record-item.yellow { border-left-color: #ffd93d; }
.record-item.green { border-left-color: #6bcb77; }

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.record-level {
    font-weight: bold;
    font-size: 0.9em;
}

.record-item.red .record-level { color: #ff6b6b; }
.record-item.yellow .record-level { color: #e67e22; }
.record-item.green .record-level { color: #27ae60; }

.record-date {
    font-size: 0.8em;
    color: #999;
}

.record-emotions {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 4px;
}

.record-intensity {
    font-size: 0.85em;
    color: #888;
}

.record-content {
    font-size: 0.9em;
    color: #555;
    margin-top: 8px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.empty-records {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-size: 0.9em;
}

/* 运动模块 */
.exercise-container {
    text-align: center;
    margin: 20px 0;
}

.exercise-type-selector {
    margin-bottom: 30px;
}

.exercise-type-selector p {
    color: #666;
    margin-bottom: 15px;
}

.exercise-types {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 10px 18px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95em;
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.type-btn:active {
    border-color: #4ecdc4;
}

.type-btn.active {
    background: #4ecdc4;
    color: white;
    border-color: #4ecdc4;
}

.timer-display {
    margin: 30px 0;
}

.timer {
    font-size: 4em;
    font-weight: bold;
    color: #333;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1.2;
}

.timer-label {
    color: #888;
    margin-top: 10px;
    font-size: 0.95em;
}

.exercise-controls {
    margin: 20px 0;
}

.exercise-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 54px;
    font-weight: bold;
    -webkit-appearance: none;
    appearance: none;
}

.exercise-btn.start {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.exercise-btn.pause {
    background: #ffd93d;
    color: #333;
}

.exercise-btn.resume {
    background: #6bcb77;
    color: white;
}

.exercise-btn:active {
    transform: scale(0.97);
}

.music-player {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.music-player p {
    color: #666;
    margin-bottom: 10px;
}

#music-btn {
    padding: 10px 25px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
    min-height: 44px;
    font-size: 1em;
    -webkit-appearance: none;
    appearance: none;
}

#music-btn:active {
    background: #8e44ad;
}

/* ========== 移动端适配 (平板及以下) ========== */
@media (max-width: 768px) {
    /* 背景图适配：手机竖屏用专门的竖版背景图 */
    #garden-container::before {
        background-image: url('/static/images/garden-gloomy-portrait.png');
        background-position: center;
        background-size: cover;
    }
    
    #garden-container::after {
        background-image: url('/static/images/garden-bright-portrait.png');
        background-position: center;
        background-size: cover;
    }
    
    /* 标题区域优化 */
    #garden-title {
        top: 15px;
    }
    
    #garden-title h1 {
        font-size: 1.6em;
    }
    
    #garden-title p {
        font-size: 0.85em;
    }
    
    /* 音乐按钮移动端位置 */
    .music-toggle {
        top: 15px;
        left: 15px;
        width: 42px;
        height: 42px;
        font-size: 1.1em;
    }
    
    /* 整体进度条移到底部 */
    #overall-progress {
        top: auto;
        bottom: 15px;
        right: 50%;
        transform: translateX(50%);
        font-size: 0.9em;
        padding: 10px 20px;
    }
    
    /* 四个模块 2x2 网格布局 */
    .garden-element {
        width: 45% !important;
        height: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
    }
    
    /* 移动端模块图标大小 */
    .module-icon-wrap {
        height: 90px;
    }
    
    .module-icon {
        width: 80px;
        height: 80px;
    }
    
    /* 左上：大树 */
    #tree-area {
        left: 3% !important;
        top: 15% !important;
        width: 45% !important;
        height: auto !important;
    }
    
    #tree {
        font-size: 70px;
    }
    
    /* 右上：房屋 */
    #house-area {
        right: 3% !important;
        top: 15% !important;
        width: 45% !important;
        height: auto !important;
    }
    
    #house {
        transform: scale(0.75);
        margin: 0 auto;
    }
    
    /* 左下：围栏 */
    #fence-area {
        left: 3% !important;
        bottom: 25% !important;
        width: 45% !important;
        height: auto !important;
    }
    
    /* 右下：院坝 */
    #yard-area {
        right: 3% !important;
        bottom: 25% !important;
        width: 45% !important;
        height: auto !important;
    }
    
    /* 标签和进度条缩小 */
    .element-label {
        font-size: 0.85em;
        padding: 3px 10px;
        margin-top: 5px;
    }
    
    .progress-bar {
        width: 70px;
        height: 6px;
        margin: 4px auto 0;
    }
    
    /* 弹窗全屏化 */
    #modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        padding: 20px 15px;
        padding-top: 60px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    #modal-close {
        top: 15px;
        right: 15px;
        font-size: 1.5em;
        width: 44px;
        height: 44px;
        background: #f5f5f5;
        border-radius: 50%;
    }
    
    /* 模块头部 */
    .module-header {
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .module-header h2 {
        font-size: 1.25em;
    }
    
    .module-header p {
        font-size: 0.88em;
    }
    
    .module-stats {
        gap: 12px;
        font-size: 0.82em;
    }
    
    /* 聊天模块 */
    .chat-messages {
        height: calc(100dvh - 280px);
        min-height: 250px;
    }
    
    .chat-message {
        max-width: 85%;
        font-size: 0.95em;
    }
    
    .chat-input-area {
        gap: 8px;
    }
    
    .chat-input-area input {
        padding: 10px 14px;
        font-size: 0.95em;
    }
    
    .chat-input-area button {
        padding: 10px 16px;
        font-size: 0.95em;
    }
    
    /* 怪兽模块 */
    .monster-face {
        font-size: 160px;
    }
    
    .monster-image {
        width: auto;
        height: 38vh;
        max-height: 320px;
        min-height: 220px;
    }
    
    .monster-hp-bar {
        width: 80%;
        max-width: 280px;
    }
    
    .attack-buttons {
        gap: 15px;
    }
    
    .attack-btn {
        width: 85px;
        height: 85px;
        font-size: 0.85em;
    }
    
    .attack-icon {
        font-size: 2em;
    }
    
    /* 射箭模块 */
    .shields-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .shield-btn {
        padding: 12px 14px;
        min-height: 70px;
        font-size: 0.9em;
    }
    
    .archery-event {
        padding: 15px;
    }
    
    .event-text {
        font-size: 1.05em;
    }
    
    .arrow-animation {
        font-size: 1.5em;
        right: -10px;
    }
    
    /* 运动模块 */
    .timer {
        font-size: 3em;
    }
    
    .exercise-btn {
        padding: 14px 32px;
        font-size: 1em;
    }
    
    .type-btn {
        padding: 8px 14px;
        font-size: 0.9em;
    }
}

/* ========== 小屏幕手机适配 (iPhone SE 等) ========== */
@media (max-width: 380px) {
    #garden-title h1 {
        font-size: 1.4em;
    }
    
    #garden-title p {
        font-size: 0.8em;
    }
    
    #tree {
        font-size: 60px;
    }
    
    #house {
        transform: scale(0.65);
    }
    
    .element-label {
        font-size: 0.8em;
    }
    
    .progress-bar {
        width: 60px;
    }
    
    .monster-face {
        font-size: 140px;
    }
    
    .monster-image {
        width: auto;
        height: 35vh;
        max-height: 280px;
        min-height: 200px;
    }
    
    .attack-btn {
        width: 75px;
        height: 75px;
    }
    
    .timer {
        font-size: 2.5em;
    }
    
    .module-header h2 {
        font-size: 1.15em;
    }
}

/* ========== 横屏模式适配 ========== */
@media (max-height: 500px) and (orientation: landscape) {
    #garden-title {
        top: 10px;
    }
    
    #garden-title h1 {
        font-size: 1.4em;
        margin-bottom: 4px;
    }
    
    #garden-title p {
        font-size: 0.8em;
    }
    
    #overall-progress {
        top: 10px;
        right: 15px;
        padding: 8px 15px;
        font-size: 0.85em;
        bottom: auto;
        transform: none;
    }
    
    #tree-area {
        top: 20% !important;
        left: 10% !important;
        width: 25% !important;
    }
    
    #house-area {
        top: 20% !important;
        right: 10% !important;
        width: 25% !important;
    }
    
    #fence-area {
        bottom: 20% !important;
        left: 15% !important;
        width: 25% !important;
    }
    
    #yard-area {
        bottom: 20% !important;
        right: 15% !important;
        width: 25% !important;
    }
    
    #tree {
        font-size: 60px;
    }
    
    #house {
        transform: scale(0.7);
    }
    
    .element-label {
        font-size: 0.8em;
    }
    
    .progress-bar {
        width: 60px;
    }
    
    /* 横屏时弹窗高度受限 */
    #modal-content {
        padding: 15px;
        padding-top: 50px;
    }
    
    .chat-messages {
        height: 180px;
        min-height: 150px;
    }
    
    .timer {
        font-size: 2.5em;
    }
    
    .monster-face {
        font-size: 120px;
    }
    
    .monster-image {
        width: auto;
        height: 70vh;
        max-height: 250px;
    }
}

/* ========== 每日欢迎书签 ========== */
.bookmark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

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

.bookmark-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 85vh;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf2d5 50%, #fce9bd 100%);
    border-radius: 8px 8px 20px 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 5px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    animation: bookmarkDrop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bookmarkDrop {
    0% {
        opacity: 0;
        transform: translateY(-50px) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0);
    }
}

/* 书签顶部的丝带/绳结装饰 */
.bookmark-ribbon {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffb347 0%, #ff8c42 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
    z-index: 2;
}

.bookmark-ribbon::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #ff8c42, #ffb347);
    border-radius: 2px;
}

.bookmark-content {
    padding: 50px 28px 28px;
    overflow-y: auto;
    max-height: 80vh;
    color: #5c4033;
}

.bookmark-title {
    text-align: center;
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #8b4513;
    letter-spacing: 2px;
}

.bookmark-greeting {
    text-align: center;
    font-size: 0.95em;
    color: #a0522d;
    margin-bottom: 20px;
    font-style: italic;
}

.bookmark-divider {
    text-align: center;
    color: #d4a574;
    font-size: 0.8em;
    margin: 18px 0;
    letter-spacing: 8px;
}

.bookmark-section {
    margin-bottom: 20px;
}

.bookmark-section h3 {
    font-size: 1.05em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #8b4513;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bookmark-section p {
    font-size: 0.92em;
    line-height: 1.7;
    color: #6b4423;
    margin-bottom: 8px;
}

.bookmark-section ul {
    padding-left: 20px;
    margin: 8px 0;
}

.bookmark-section li {
    font-size: 0.9em;
    line-height: 1.8;
    color: #6b4423;
}

.bookmark-section strong {
    color: #c0392b;
    font-weight: bold;
}

.bookmark-hotline {
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 15px;
    border-radius: 10px;
    margin: 12px 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid #e74c3c;
}

.hotline-icon {
    font-size: 1.5em;
}

.hotline-text {
    font-size: 0.9em;
    color: #5c4033;
}

.hotline-text strong {
    font-size: 1.1em;
    color: #c0392b;
}

.bookmark-small {
    font-size: 0.8em !important;
    color: #a0522d !important;
    opacity: 0.8;
    margin-top: 4px !important;
}

.bookmark-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #d4a574;
}

.bookmark-footer p {
    font-size: 0.95em;
    color: #8b4513;
    margin-bottom: 4px;
}

.bookmark-signature {
    font-style: italic;
    font-weight: 500;
    color: #a0522d !important;
}

.bookmark-enter-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: linear-gradient(135deg, #ffb347 0%, #ff8c42 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.35);
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px;
}

.bookmark-enter-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

/* 书签底部的斜角装饰 */
.bookmark-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: repeating-linear-gradient(
        45deg,
        #e8c99b,
        #e8c99b 10px,
        #f5deb3 10px,
        #f5deb3 20px
    );
    border-radius: 0 0 20px 20px;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .bookmark-content {
        padding: 45px 22px 25px;
    }
    
    .bookmark-title {
        font-size: 1.4em;
    }
    
    .bookmark-section h3 {
        font-size: 1em;
    }
    
    .bookmark-section p,
    .bookmark-section li {
        font-size: 0.88em;
    }
}

/* ==================== 修缮房屋模块新样式 ==================== */

.exercise-module {
    padding: 10px;
}

/* 房屋状态展示 */
.house-status-area {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf2e9 100%);
    border-radius: 15px;
}

.house-status-img {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.house-status-text {
    font-size: 0.9em;
    color: #8b7355;
    font-weight: 500;
}

/* 步骤通用 */
.exercise-step {
    animation: fadeIn 0.3s ease;
}

.exercise-step .module-header {
    margin-bottom: 20px;
}

.exercise-intro {
    color: #666;
    line-height: 1.6;
    margin: 10px 0;
    font-size: 0.95em;
}

.back-btn {
    background: none;
    border: none;
    color: #7c9d6b;
    font-size: 0.9em;
    cursor: pointer;
    padding: 5px 0;
    margin-bottom: 10px;
}

.back-btn:hover {
    color: #5a7d4a;
}

/* 状态选择卡片 */
.level-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.level-option {
    padding: 18px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: left;
}

.level-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.level-option:active {
    transform: translateY(0);
}

.level-option.red {
    background: linear-gradient(135deg, #fff0f0 0%, #ffe5e5 100%);
    border-color: #ffcdd2;
}

.level-option.yellow {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}

.level-option.green {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}

.level-option-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.level-option-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.level-option-desc {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.level-option-plan {
    font-size: 0.8em;
    color: #888;
    font-weight: 500;
}

.exercise-tip {
    text-align: center;
    font-size: 0.85em;
    color: #888;
    line-height: 1.5;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
}

/* 运动类型选择网格（户外方案） */
.exercise-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.type-card {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #eee;
}

.type-card:hover {
    border-color: #a8d5a2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(168, 213, 162, 0.3);
}

.type-card-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 8px;
}

.type-card-name {
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 4px;
    color: #333;
}

.type-card-desc {
    font-size: 0.75em;
    color: #888;
}

/* 动作卡片 */
.workout-cards-container {
    margin-bottom: 20px;
}

.workout-progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.workout-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.workout-dot.active {
    background: #7c9d6b;
    transform: scale(1.2);
}

.workout-dot.done {
    background: #a8d5a2;
}

.workout-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.workout-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f5f5f5;
}

.workout-card-body {
    padding: 18px;
}

.workout-card-body h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #333;
}

.workout-card-desc {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.workout-card-breathing,
.workout-card-duration {
    font-size: 0.85em;
    padding: 8px 12px;
    background: #f0f9f0;
    border-radius: 8px;
    margin-bottom: 8px;
    color: #5a7d4a;
}

.breathing-label,
.duration-label {
    font-weight: 600;
}

.workout-card-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #fafafa;
}

.nav-btn {
    background: #7c9d6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: #5a7d4a;
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#workout-action-index {
    font-size: 0.9em;
    color: #888;
}

/* 计时器 */
.workout-timer-area {
    text-align: center;
    margin-bottom: 20px;
}

.timer-display {
    margin: 20px 0;
}

.timer {
    font-size: 3em;
    font-weight: 300;
    color: #7c9d6b;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 10px rgba(124, 157, 107, 0.2);
}

.timer-label {
    font-size: 0.85em;
    color: #999;
    margin-top: 5px;
}

.exercise-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.exercise-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.exercise-btn.start {
    background: linear-gradient(135deg, #7c9d6b 0%, #5a7d4a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 157, 107, 0.4);
}

.exercise-btn.start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 157, 107, 0.5);
}

.exercise-btn.pause,
.exercise-btn.resume {
    background: #f0f0f0;
    color: #666;
}

.exercise-btn.pause:hover,
.exercise-btn.resume:hover {
    background: #e0e0e0;
}

/* 音乐按钮 */
.workout-music {
    text-align: center;
    margin-bottom: 20px;
}

.music-btn-small {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    color: #888;
    transition: all 0.3s ease;
}

.music-btn-small:hover {
    border-color: #7c9d6b;
    color: #7c9d6b;
}

/* 提前完成 */
.workout-finish-area {
    text-align: center;
    padding: 15px;
    background: #fef9e7;
    border-radius: 12px;
}

.finish-early-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.finish-early-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.finish-tip {
    font-size: 0.8em;
    color: #a08060;
    margin: 0;
}

/* 完成庆祝 */
.completion-celebration {
    text-align: center;
    padding: 30px 20px;
    animation: bounceIn 0.5s ease;
}

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

.celebration-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

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

.completion-celebration h2 {
    font-size: 1.8em;
    color: #5a7d4a;
    margin-bottom: 10px;
}

.completion-message {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
}

.completion-house-img {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.15));
}

.completion-encouragement {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    padding: 15px 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #8b7355;
    font-size: 0.95em;
}

.hidden {
    display: none !important;
}

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

/* 移动端适配 */
@media (max-width: 480px) {
    .exercise-type-grid {
        grid-template-columns: 1fr;
    }
    
    .workout-card-img {
        height: 150px;
    }
    
    .timer {
        font-size: 2.5em;
    }
    
    .level-option {
        padding: 15px;
    }
    
    .completion-house-img {
        width: 120px;
    }
}

/* ==================== 新版主界面 - 热区交互方案 ==================== */

/* 隐藏旧的方块按钮和场景元素 */
.garden-element,
.scene-element {
    display: none !important;
}

/* 背景图 - 用回完整的院子图 */
#garden-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: filter 1.5s ease;
    z-index: 0;
}

.garden-bg-gloomy {
    background-image: url('/static/images/garden-gloomy.png');
    filter: saturate(0.7) brightness(0.85);
}

.garden-bg-bright {
    background-image: url('/static/images/garden-bright.png');
    filter: saturate(1.05) brightness(1);
}

/* 热区通用样式 */
.hotspot {
    position: absolute;
    cursor: pointer;
    z-index: 5;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
}

.hotspot-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 230, 150, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    animation: hotspotPulse 3s ease-in-out infinite;
}

@keyframes hotspotPulse {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.hotspot:active .hotspot-glow {
    opacity: 1;
    animation: none;
    transform: translate(-50%, -50%) scale(1.5);
    background: radial-gradient(circle, rgba(255, 220, 100, 0.7) 0%, transparent 70%);
}

/* 热区标签 - 默认就显示，艺术字体，精致小巧 */
.hotspot-label {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 253, 245, 0.92);
    color: #6b5c45;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: normal;
    font-family: "KaiTi", "STKaiti", "楷体", "Songti SC", "SimSun", serif;
    letter-spacing: 1px;
    white-space: nowrap;
    opacity: 0.85;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5);
    z-index: 10;
    margin-bottom: 3px;
    border: 1px solid rgba(200, 180, 150, 0.3);
}

/* 标签下面的小箭头 */
.hotspot-label::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 253, 245, 0.92);
    filter: drop-shadow(0 1px 1px rgba(200, 180, 150, 0.3));
}

.hotspot:active .hotspot-label {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
    background: rgba(255, 253, 245, 0.98);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* 标签的跳动动画，错落有致 */
.hotspot:nth-child(1) .hotspot-label {
    animation: labelBounce 2.5s ease-in-out infinite;
}

.hotspot:nth-child(2) .hotspot-label {
    animation: labelBounce 2.5s ease-in-out infinite 0.6s;
}

.hotspot:nth-child(3) .hotspot-label {
    animation: labelBounce 2.5s ease-in-out infinite 1.2s;
}

.hotspot:nth-child(4) .hotspot-label {
    animation: labelBounce 2.5s ease-in-out infinite 1.8s;
}

@keyframes labelBounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 0.8; 
    }
    50% { 
        transform: translateX(-50%) translateY(-4px); 
        opacity: 0.95; 
    }
}

/* 热区进度环 */
.hotspot-progress {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hotspot.has-progress .hotspot-progress {
    opacity: 1;
}

.hotspot-progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.4);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: #7c9d6b;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 4px rgba(124, 157, 107, 0.6));
}

/* ===== 四个热区位置（根据背景图调整） ===== */

/* 大树 - 左侧 */
.hotspot-tree {
    left: 5%;
    top: 20%;
    width: 25%;
    height: 60%;
}

/* 小屋 - 右侧 */
.hotspot-house {
    right: 8%;
    top: 25%;
    width: 28%;
    height: 50%;
}

/* 内心小孩 - 房屋门口 */
.hotspot-inner-child {
    right: 18%;
    top: 60%;
    width: 15%;
    height: 20%;
}

/* 围栏 - 中间下方 */
.hotspot-fence {
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    width: 45%;
    height: 25%;
}

/* 弓箭/院坝 - 中间空地 */
.hotspot-yard {
    left: 50%;
    top: 45%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30%;
}

/* ===== 新手引导 ===== */
.newbie-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
    pointer-events: none;
    animation: guideBounce 2s ease-in-out infinite;
}

@keyframes guideBounce {
    0%, 100% { transform: translate(-50%, -50%); opacity: 0.9; }
    50% { transform: translate(-50%, -60%); opacity: 1; }
}

.guide-hand {
    font-size: 2.5em;
    margin-bottom: 5px;
    animation: handPoint 1s ease-in-out infinite;
}

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

.newbie-guide p {
    background: rgba(255,255,255,0.95);
    color: #666;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0;
}

/* 移动端适配 */
@media (max-width: 480px) {
    #garden-bg {
        background-size: cover;
        background-position: 40% center;
    }
    
    .hotspot-tree {
        left: 2%;
        top: 15%;
        width: 30%;
        height: 55%;
    }
    
    .hotspot-house {
        right: 3%;
        top: 20%;
        width: 35%;
        height: 45%;
    }
    
    .hotspot-fence {
        bottom: 8%;
        width: 55%;
        height: 22%;
    }
    
    .hotspot-yard {
        top: 42%;
        width: 35%;
        height: 28%;
    }
    
    .hotspot-label {
        font-size: 0.75em;
        padding: 5px 12px;
    }
    
    .hotspot-progress {
        width: 28px;
        height: 28px;
        top: 3px;
        right: 3px;
    }
}

/* ============================================
   🏡 小院生机特效 - 落叶 + 草摆
   仅在小院100%时显示
   ============================================ */

/* 特效容器：覆盖整个小院，不阻挡交互 */
.garden-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 5;
}

.garden-effects.active {
    opacity: 1;
}

/* ---------- 🍃 落叶特效 ---------- */
.falling-leaf {
    position: absolute;
    top: -30px;
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #7cb342 0%, #558b2f 100%);
    border-radius: 0 70% 0 70%;
    opacity: 0.85;
    animation: leafFall linear infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 不同颜色的叶子变化 */
.falling-leaf.leaf-color-2 {
    background: linear-gradient(135deg, #9ccc65 0%, #689f38 100%);
}

.falling-leaf.leaf-color-3 {
    background: linear-gradient(135deg, #aed581 0%, #7cb342 100%);
}

.falling-leaf.leaf-color-4 {
    background: linear-gradient(135deg, #ffb74d 0%, #f57c00 100%);
}

.falling-leaf.leaf-color-5 {
    background: linear-gradient(135deg, #ffcc80 0%, #ff9800 100%);
}

/* 飘落动画 */
@keyframes leafFall {
    0% {
        transform: translateY(-30px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(100px) rotate(720deg);
        opacity: 0;
    }
}

/* 不同大小 */
.falling-leaf.leaf-size-s {
    width: 8px;
    height: 8px;
}

.falling-leaf.leaf-size-m {
    width: 12px;
    height: 12px;
}

.falling-leaf.leaf-size-l {
    width: 18px;
    height: 18px;
}

/* ---------- 🌿 草摆动特效 ---------- */
.grass-sway-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    pointer-events: none;
}

.grass-blade {
    position: absolute;
    bottom: 0;
    width: 6px;
    height: 24px;
    background: linear-gradient(to top, #558b2f, #8bc34a);
    border-radius: 50% 50% 0 0;
    transform-origin: bottom center;
    animation: grassSway ease-in-out infinite;
}

/* 不同草叶大小 */
.grass-blade.grass-tall {
    height: 35px;
    width: 7px;
}

.grass-blade.grass-short {
    height: 18px;
    width: 5px;
}

.grass-blade.grass-thin {
    width: 3px;
    height: 28px;
}

/* 草色变化 */
.grass-blade.grass-color-2 {
    background: linear-gradient(to top, #33691e, #7cb342);
}

.grass-blade.grass-color-3 {
    background: linear-gradient(to top, #689f38, #9ccc65);
}

/* 摆动动画 */
@keyframes grassSway {
    0%, 100% {
        transform: rotate(-8deg);
    }
    50% {
        transform: rotate(8deg);
    }
}

/* ---------- ✨ 光点漂浮特效 ---------- */
.floating-sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #fff9c4 0%, rgba(255, 249, 196, 0) 70%);
    border-radius: 50%;
    animation: sparkleFloat ease-in-out infinite;
    pointer-events: none;
}

.floating-sparkle.sparkle-size-l {
    width: 10px;
    height: 10px;
}

.floating-sparkle.sparkle-size-s {
    width: 4px;
    height: 4px;
}

@keyframes sparkleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) translateX(10px);
        opacity: 1;
    }
}

/* ---------- 🦋 蝴蝶小动画（偶尔飞过） ---------- */
.butterfly {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    animation: butterflyFly linear infinite;
}

.butterfly::before,
.butterfly::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 10px;
    height: 14px;
    background: linear-gradient(135deg, #ff80ab 0%, #e91e63 100%);
    border-radius: 50% 0 50% 0;
    animation: wingFlap 0.3s ease-in-out infinite alternate;
}

.butterfly::before {
    left: 0;
    transform-origin: right center;
    transform: rotate(-20deg);
}

.butterfly::after {
    right: 0;
    transform-origin: left center;
    transform: rotate(20deg) scaleX(-1);
    animation-delay: 0s;
}

.butterfly.butterfly-yellow::before,
.butterfly.butterfly-yellow::after {
    background: linear-gradient(135deg, #fff176 0%, #fbc02d 100%);
}

.butterfly.butterfly-blue::before,
.butterfly.butterfly-blue::after {
    background: linear-gradient(135deg, #81d4fa 0%, #29b6f6 100%);
}

@keyframes wingFlap {
    0% {
        transform: rotate(-30deg);
    }
    100% {
        transform: rotate(30deg);
    }
}

.butterfly::after {
    animation-name: wingFlapRight;
}

@keyframes wingFlapRight {
    0% {
        transform: rotate(30deg) scaleX(-1);
    }
    100% {
        transform: rotate(-30deg) scaleX(-1);
    }
}

@keyframes butterflyFly {
    0% {
        transform: translate(-50px, 50vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    25% {
        transform: translate(25vw, 40vh) rotate(10deg);
    }
    50% {
        transform: translate(50vw, 55vh) rotate(-5deg);
    }
    75% {
        transform: translate(75vw, 45vh) rotate(8deg);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(110vw, 50vh) rotate(0deg);
        opacity: 0;
    }
}

/* 自定义确认对话框 */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirm-box {
    background: white;
    border-radius: 16px;
    padding: 30px 24px 20px;
    max-width: 320px;
    width: 80%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.confirm-message {
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 24px;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.confirm-btn:active {
    opacity: 0.7;
}

.confirm-btn.cancel {
    background: #f0f0f0;
    color: #666;
}

.confirm-btn.ok {
    background: #4caf50;
    color: white;
}

/* ===== 内心小孩疗愈模块 ===== */
.inner-child-module {
    padding: 10px 0 20px;
}

.inner-child-intro {
    padding: 10px 20px 20px;
}

.intro-illustration {
    text-align: center;
    font-size: 60px;
    margin: 10px 0 20px;
    animation: gentle-float 3s ease-in-out infinite;
}

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

.intro-card {
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f6 100%);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.intro-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #d46b8a;
}

.intro-card p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

.tip-text {
    color: #888 !important;
    font-size: 13px !important;
    margin-top: 10px !important;
}

.inner-child-start-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}

.inner-child-start-btn:active {
    transform: scale(0.98);
}

.inner-child-history-link {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-top: 16px;
    cursor: pointer;
    text-decoration: underline;
}

/* 冥想界面 */
.meditation-header {
    padding: 10px 20px 0;
}

.meditation-scene {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 15px 0;
}

.meditation-light {
    position: absolute;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 220, 240, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-light 4s ease-in-out infinite;
}

@keyframes pulse-light {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.9; }
}

.meditation-child-icon {
    font-size: 70px;
    position: relative;
    z-index: 1;
    animation: gentle-float 4s ease-in-out infinite;
}

.meditation-guide-box {
    background: linear-gradient(135deg, #fdf6ff 0%, #fff5f8 100%);
    border-radius: 14px;
    padding: 18px 20px;
    margin: 0 20px 15px;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.meditation-guide-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: #5a4a5a;
    text-align: center;
}

.meditation-progress-bar {
    height: 4px;
    background: #f0e8f0;
    margin: 0 20px;
    border-radius: 2px;
    overflow: hidden;
}

.meditation-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffb6c1, #da70d6);
    border-radius: 2px;
    transition: width 1s linear;
}

.meditation-timer {
    text-align: center;
    font-size: 36px;
    font-weight: 300;
    color: #8b6b8b;
    margin: 15px 0;
    font-variant-numeric: tabular-nums;
}

.meditation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.meditation-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffb6c1 0%, #da70d6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(218, 112, 214, 0.3);
}

.meditation-btn.play {
    width: 70px;
    height: 70px;
    font-size: 24px;
}

.meditation-btn:active {
    transform: scale(0.95);
}

.meditation-btn.skip-forward {
    width: 50px;
    height: 50px;
    font-size: 18px;
    background: #f0e8f0;
    color: #8b6b8b;
    box-shadow: none;
}

.meditation-tip {
    text-align: center;
    color: #aaa;
    font-size: 13px;
    margin-top: 10px;
}

/* 记录表单 */
.record-form {
    padding: 10px 20px 20px;
}

.form-section {
    margin-bottom: 18px;
}

.form-label {
    font-size: 15px;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-icon {
    font-size: 18px;
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #f0e8f0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    background: #fdfbff;
    color: #555;
}

.form-textarea:focus {
    outline: none;
    border-color: #dda0dd;
}

.feeling-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feeling-tag {
    padding: 6px 14px;
    background: #f5f0f5;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.feeling-tag.selected {
    background: linear-gradient(135deg, #ffb6c1 0%, #da70d6 100%);
    color: white;
}

.save-record-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
}

.save-record-btn:active {
    transform: scale(0.98);
}

/* 完成页 */
.encouragement-card {
    background: linear-gradient(135deg, #fff5f5 0%, #f0f8ff 100%);
    border-radius: 12px;
    padding: 16px;
    margin: 15px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #666;
}

.completion-subtext {
    font-size: 14px;
    line-height: 1.8;
    color: #777;
    margin: 10px 20px;
}

/* 历史记录列表 */
.records-list {
    padding: 10px 20px 20px;
}

.record-item {
    background: #fdfbff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border-left: 3px solid #dda0dd;
}

.record-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.record-appearance {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.6;
}

.record-feelings {
    margin-bottom: 8px;
}

.record-feeling-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #fff0f5;
    color: #d46b8a;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
}

.record-message {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
    font-style: italic;
    padding-left: 10px;
    border-left: 2px solid #f0dff0;
}

.empty-records {
    text-align: center;
    color: #bbb;
    padding: 40px 20px;
    font-size: 14px;
}

/* ========== 新手引导 ========== */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

.onboarding-container {
    background: linear-gradient(160deg, #fff9f0 0%, #fff 50%, #f0f9f0 100%);
    border-radius: 24px;
    padding: 32px 28px 28px;
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease;
}

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

/* 进度指示器 */
.onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    gap: 8px;
}

.onboarding-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.onboarding-step-dot.active {
    background: linear-gradient(135deg, #6BCB77, #4CAF50);
    width: 28px;
    border-radius: 6px;
}

.onboarding-step-line {
    width: 24px;
    height: 2px;
    background: #e0e0e0;
    border-radius: 1px;
}

/* 步骤内容 */
.onboarding-step {
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.onboarding-emoji {
    font-size: 56px;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

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

.onboarding-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.onboarding-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

.onboarding-desc-small {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin: 8px 0 20px 0;
}

/* 输入框 */
.onboarding-input-group {
    margin-bottom: 24px;
    text-align: left;
}

.onboarding-input-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    font-weight: 500;
}

#garden-name-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    outline: none;
    background: #fff;
}

#garden-name-input:focus {
    border-color: #6BCB77;
    box-shadow: 0 0 0 4px rgba(107, 203, 119, 0.15);
}

.onboarding-hint {
    font-size: 12px;
    color: #aaa;
    margin: 8px 0 0 0;
    text-align: center;
}

/* 心情选择器 */
.mood-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.mood-option {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mood-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.mood-option.selected {
    border-color: #6BCB77;
    background: linear-gradient(135deg, #f0faf0, #e8f8e8);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(107, 203, 119, 0.25);
}

.mood-emoji {
    font-size: 32px;
}

.mood-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

/* 按钮 */
.onboarding-next-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6BCB77, #4CAF50);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.onboarding-next-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 203, 119, 0.4);
}

.onboarding-next-btn.disabled {
    background: #e0e0e0;
    color: #aaa;
    cursor: not-allowed;
}

.onboarding-cta-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FF8C42, #FF6B35);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.onboarding-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.onboarding-skip {
    font-size: 13px;
    color: #aaa;
    text-decoration: underline;
    cursor: pointer;
    margin: 0;
    transition: color 0.3s ease;
}

.onboarding-skip:hover {
    color: #888;
}

/* 大树预览 */
.onboarding-tree-preview {
    background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.tree-silhouette {
    font-size: 64px;
    margin-bottom: 8px;
    animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.tree-leaf-count {
    font-size: 14px;
    color: #558b2f;
    font-weight: 500;
}

/* 奖励弹窗 */
.reward-container {
    background: linear-gradient(160deg, #fff5e6 0%, #fff 50%, #f0fff0 100%);
    border-radius: 24px;
    padding: 36px 28px 28px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.reward-celebration {
    margin-bottom: 24px;
}

.reward-icon {
    font-size: 72px;
    margin-bottom: 12px;
    animation: rewardBounce 1s ease-in-out;
}

@keyframes rewardBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-10deg); }
    50% { transform: scale(0.9) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-5deg); }
}

.reward-celebration h2 {
    font-size: 22px;
    color: #333;
    margin: 0 0 8px 0;
}

.reward-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.reward-items {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.reward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
    color: #555;
}

.reward-item:last-child {
    border-bottom: none;
}

.reward-item-icon {
    font-size: 22px;
}

.reward-footer {
    font-size: 13px;
    color: #999;
    line-height: 1.7;
    margin: 0 0 20px 0;
}

.hidden {
    display: none !important;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .hotspot-inner-child {
        right: 15%;
        top: 58%;
        width: 20%;
        height: 22%;
    }
    
    .onboarding-container,
    .reward-container {
        width: 88%;
        padding: 28px 20px 24px;
    }
    
    .mood-selector {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .mood-option {
        padding: 12px 4px;
    }
    
    .mood-emoji {
        font-size: 28px;
    }
}
