/* ===== CSS变量 ===== */
:root {
    /* 主题色 - 更柔和可爱 */
    --primary: #FF9FF3;
    --secondary: #54A0FF;
    --accent: #FFC312;
    --success: #2ED573;
    --warning: #FFA502;
    --danger: #FF6B6B;

    /* 元素色 */
    --fire: #FF6B35;
    --water: #4CC9F0;
    --nature: #51CF66;
    --electric: #FFD43B;
    --star: #B197FC;

    /* 背景色 */
    --bg-primary: #FFF5F5;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;

    /* 文字色 */
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;

    /* 阴影 */
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

    /* 圆角 */
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 50%;

    /* 字体 */
    --font: 'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif;
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* ===== 启动画面 ===== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 50%, #f6d365 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.splash-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.splash-title {
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 8px;
    animation: title-bounce 2s ease infinite;
}

.splash-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 25px;
}

.pet-selection {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pet-choice {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 15px 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    min-width: 85px;
    position: relative;
    overflow: hidden;
}

.pet-choice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.pet-choice:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255,255,255,0.35);
}

.pet-choice:hover::before {
    opacity: 1;
}

.pet-choice.selected {
    border-color: white;
    background: rgba(255,255,255,0.45);
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.pet-preview {
    font-size: 2.8rem;
    margin-bottom: 6px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.pet-choice span {
    display: block;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.pet-choice small {
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
}

.name-input {
    margin-top: 20px;
    animation: fade-in 0.3s ease;
}

.name-input input {
    padding: 14px 24px;
    border-radius: 30px;
    border: 2px solid rgba(255,255,255,0.5);
    font-size: 1.1rem;
    width: 260px;
    text-align: center;
    outline: none;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s;
}

.name-input input:focus {
    border-color: white;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.btn {
    padding: 14px 36px;
    border-radius: 30px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

/* ===== 主游戏界面 ===== */
.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #E8F5E9 0%, #FFF8E1 100%);
}

/* 顶部状态栏 */
.status-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    z-index: 10;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.star-count {
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.level-badge {
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFC312, #F79F1F);
    color: #2D3436;
    padding: 6px 12px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(255, 195, 18, 0.4);
}

.status-right {
    display: flex;
    align-items: center;
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.stat-icon {
    font-size: 0.85rem;
    width: 18px;
    text-align: center;
}

.bar-container {
    width: 55px;
    height: 10px;
    background: rgba(255,255,255,0.25);
    border-radius: 5px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hunger-bar { background: linear-gradient(90deg, #FF9FF3, #f368e0); }
.happiness-bar { background: linear-gradient(90deg, #48DBFB, #0abde3); }
.clean-bar { background: linear-gradient(90deg, #FFC312, #f79f1f); }

.stat-value {
    font-weight: 600;
    min-width: 22px;
    text-align: right;
    font-size: 0.75rem;
}

/* 主内容区 */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

/* 宠物显示区 */
.pet-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pet-room {
    width: 100%;
    max-width: 400px;
    height: 280px;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8C8 60%, #8B7355 60%, #A0855B 100%);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
    border: 3px solid rgba(255,255,255,0.5);
}

/* 房间装饰 */
.room-bg::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    width: 30px;
    height: 30px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 20px #FFD700;
}

.room-bg::after {
    content: '';
    position: absolute;
    top: 15%;
    right: 15%;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
}

/* 云朵装饰 */
.pet-room::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 30%;
    width: 60px;
    height: 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
    animation: cloud-float 8s ease-in-out infinite;
}

.pet-room::after {
    content: '';
    position: absolute;
    top: 15%;
    right: 25%;
    width: 45px;
    height: 15px;
    background: rgba(255,255,255,0.5);
    border-radius: 8px;
    animation: cloud-float 6s ease-in-out infinite reverse;
}

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

.pet-display {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

.pet-sprite {
    font-size: 4.5rem;
    cursor: pointer;
    transition: transform 0.2s;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
    animation: pet-idle 2s ease-in-out infinite;
}

.pet-sprite:hover {
    transform: scale(1.1);
}

.pet-sprite:active {
    transform: scale(0.95);
}

.pet-speech {
    background: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    margin-top: 12px;
    position: relative;
    animation: speech-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

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

@keyframes speech-pop {
    from { opacity: 0; transform: scale(0.8) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pet-actions {
    display: flex;
    gap: 16px;
}

.action-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.5), transparent);
    border-radius: inherit;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

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

.action-btn .tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.action-btn:hover .tooltip {
    opacity: 1;
}

/* 面板通用样式 */
.panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    animation: panel-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(0,0,0,0.05);
}

@keyframes panel-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 习惯打卡 */
.habits-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.habit-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--radius);
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

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

.habit-item:hover::before {
    left: 100%;
}

.habit-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.habit-item.completed {
    background: linear-gradient(135deg, #2ED573 0%, #26de81 100%);
    color: white;
    border-color: rgba(255,255,255,0.3);
    transform: scale(0.95);
}

.habit-item.completed::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 1.2rem;
    font-weight: bold;
}

.habit-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.habit-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.habit-reward {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.habit-item.completed .habit-reward {
    color: rgba(255,255,255,0.9);
}

.streak-info {
    text-align: center;
    font-size: 1rem;
    color: var(--fire);
    font-weight: 600;
    background: linear-gradient(135deg, #fff5f5, #ffe0e0);
    padding: 10px;
    border-radius: var(--radius);
}

/* 专注训练 */
.focus-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.focus-btn {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    border: none;
    border-radius: var(--radius);
    padding: 18px 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(161, 140, 209, 0.4);
}

.focus-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(161, 140, 209, 0.5);
}

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

.focus-time {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.focus-reward {
    font-size: 0.85rem;
    opacity: 0.9;
}

.focus-timer {
    text-align: center;
    padding: 20px;
    animation: fade-in 0.3s ease;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.timer-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.timer-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 10;
}

.timer-progress {
    fill: none;
    stroke: url(#timer-gradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
    filter: drop-shadow(0 0 8px rgba(161, 140, 209, 0.5));
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.focus-games {
    margin-top: 20px;
    text-align: center;
    padding-top: 16px;
    border-top: 2px dashed #eee;
}

.focus-games h3 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(252, 182, 159, 0.4);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 182, 159, 0.5);
}

/* 探险系统 */
.energy-display {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--electric);
    font-weight: 600;
    background: linear-gradient(135deg, #fff9e6, #fff3cc);
    padding: 10px;
    border-radius: var(--radius);
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.map-location {
    border-radius: var(--radius);
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.map-location::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
}

.map-location:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.map-location:active {
    transform: scale(0.98);
}

.map-location[data-map="forest"] {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.map-location[data-map="beach"] {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.4);
}

.map-location[data-map="mountain"] {
    background: linear-gradient(135deg, #dfe6e9 0%, #636e72 100%);
    box-shadow: 0 4px 15px rgba(99, 110, 114, 0.4);
}

.map-location[data-map="space"] {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.map-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.map-location span {
    display: block;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-size: 0.95rem;
}

.map-location small {
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
}

.explore-result {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fade-in 0.2s ease;
}

.result-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: pop-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-lg);
}

@keyframes pop-in {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* 商店系统 */
.shop-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
}

.tab-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.3);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.shop-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--radius);
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.shop-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.shop-item:active {
    transform: scale(0.95);
}

.item-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: block;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.item-effect {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 成就系统 */
.achievements-list {
    display: grid;
    gap: 10px;
}

.achievement-item {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    transform: translateX(5px);
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, #FFC312 0%, #F79F1F 100%);
    box-shadow: 0 4px 15px rgba(247, 159, 31, 0.3);
}

.achievement-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.3);
    border-radius: var(--radius);
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    margin-bottom: 3px;
}

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

.achievement-item.unlocked .achievement-desc {
    color: rgba(0,0,0,0.7);
}

/* 进化系统 */
.evolution-tree {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.evolution-stage {
    text-align: center;
    min-width: 65px;
}

.stage-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
    opacity: 0.3;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.stage-icon.current {
    opacity: 1;
    transform: scale(1.3);
    filter: grayscale(0%);
    animation: evolve-pulse 2s ease infinite;
}

.stage-icon.unlocked {
    opacity: 1;
    filter: grayscale(0%);
}

@keyframes evolve-pulse {
    0%, 100% { transform: scale(1.3); }
    50% { transform: scale(1.4); filter: drop-shadow(0 0 10px rgba(255, 195, 18, 0.5)); }
}

.stage-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stage-arrow {
    font-size: 1.2rem;
    color: var(--text-light);
}

.evolution-info {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: var(--radius);
    margin-top: 16px;
}

.evolution-info p {
    margin-bottom: 6px;
    font-size: 0.95rem;
}

/* 底部导航栏 */
.nav-bar {
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 8px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
}

.nav-btn {
    background: none;
    border: none;
    padding: 8px 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 50px;
}

.nav-btn:hover {
    background: var(--bg-secondary);
}

.nav-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.nav-icon {
    font-size: 1.3rem;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 600;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fade-in 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    animation: pop-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

/* 粒子效果 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 300;
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: particle-fall 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes particle-fall {
    0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
    100% { opacity: 0; transform: translateY(120px) rotate(720deg) scale(0.5); }
}

/* 升级动画 */
.levelup-animation {
    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: 400;
    animation: fade-in 0.3s ease;
}

.levelup-content {
    text-align: center;
    animation: levelup-appear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.levelup-stars {
    font-size: 4rem;
    animation: spin 1s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 195, 18, 0.5));
}

.levelup-text {
    font-size: 2rem;
    color: white;
    font-weight: 700;
    margin: 16px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.levelup-level {
    font-size: 3rem;
    color: #FFC312;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* ===== 动画关键帧 ===== */
@keyframes title-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pet-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes levelup-appear {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

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

/* ===== 响应式 ===== */
@media (max-width: 400px) {
    .splash-title {
        font-size: 2rem;
    }

    .pet-selection {
        gap: 8px;
    }

    .pet-choice {
        padding: 12px 8px;
        min-width: 70px;
    }

    .pet-preview {
        font-size: 2.2rem;
    }

    .pet-sprite {
        font-size: 3.5rem;
    }

    .pet-room {
        height: 240px;
    }

    .habits-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

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

    .map-grid {
        grid-template-columns: 1fr;
    }

    .nav-label {
        display: none;
    }

    .nav-btn {
        min-width: 40px;
    }

    .status-bar {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }

    .status-left, .status-right {
        width: 100%;
        justify-content: center;
    }

    .bar-container {
        width: 45px;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* ===== 帮助提示 ===== */
.help-tip {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 50;
    transition: all 0.3s ease;
}

.help-tip:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ===== 新手引导 ===== */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    animation: pop-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.tutorial-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.tutorial-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.tutorial-card .btn {
    width: 100%;
}
