/* ===== 小白兔养成系统样式（Go 版新增） ===== */

/* 快捷入口（首页） */
.quick-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 24px;
}
.quick-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: #fff; border-radius: 12px; padding: 16px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); text-decoration: none;
    color: #2c3e50; font-size: 1.8rem; transition: transform 0.15s;
}
.quick-card:hover { transform: translateY(-2px); }
.quick-card span { font-size: 0.95rem; font-weight: 600; }
.quick-card small { font-size: 0.75rem; color: #95a5a6; }

/* 小屋布局 */
.pet-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.pet-main { flex: 1 1 420px; }
.pet-side { flex: 0 1 320px; display: flex; flex-direction: column; gap: 16px; }
.pet-side .detail-card { margin-bottom: 0; }

.scene {
    position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 460px;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); background: #cbe8fb;
}
.scene-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    object-position: bottom;
}
.scene-decor {
    position: absolute; bottom: 4%; height: 18%; max-width: 22%; object-fit: contain;
}
.scene-decor-0 { left: 5%; }
.scene-decor-1 { right: 6%; }
.scene-decor-2 { left: 32%; height: 13%; }
.scene-rabbit {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: min(46%, 250px);
}
.scene-rabbit .rabbit-svg { width: 100%; height: auto; display: block; }
.digest-bubble {
    position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.8); color: #fff; font-size: 0.8rem;
    border-radius: 12px; padding: 4px 10px; white-space: nowrap;
}
.rabbit-bar { margin: 12px 2px 16px; }
.rabbit-title { font-size: 1.15rem; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rabbit-level { color: #7f8c8d; font-size: 0.9rem; margin-top: 4px; }

/* 兔子立绘（Twemoji 图片合成）：composer 控尺寸，pet-img 漂浮呼吸，贴片绝对定位 */
.rabbit-composer { position: relative; width: var(--pet-size, 66%); margin: 0 auto; }
.pet-img { width: 100%; display: block; animation: pet-float 3.2s ease-in-out infinite; }
@keyframes pet-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.pet-acc { position: absolute; pointer-events: none; }
.pet-acc-tr { top: -6%; right: -10%; width: 26%; }
.pet-acc-bl { bottom: 10%; left: -14%; width: 24%; }
.pet-acc-crown { top: -14%; left: 50%; transform: translateX(-50%); width: 40%; z-index: 2; }
.pet-hat { top: -7%; left: 50%; transform: translateX(-50%); width: 44%; z-index: 2; }
.pet-cape { top: 60%; left: 50%; transform: translateX(-50%); width: 42%; opacity: 0.95; }
.pet-worn {
    position: absolute; bottom: -4px; right: -10px;
    display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end;
    width: 56%;
}
.pet-worn-item { width: 18px; height: 18px; }
.scene-rabbit .rabbit-composer { width: min(52%, 230px); }
.scene-rabbit.digesting .pet-img { animation: rb-sleep 3.2s ease-in-out infinite; }
@keyframes rb-sleep { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.scene-rabbit.eating .pet-img { animation: rb-eat 0.35s ease-in-out 4; }
@keyframes rb-eat { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.rabbit-art .rabbit-composer { width: 110px; }
.rabbit-art .rabbit-composer, .market-art {
    background: radial-gradient(circle, #eaf4fd 0%, #f5faff 70%);
    border-radius: 50%;
}
.rabbit-art .rabbit-composer { padding: 14px 0 6px; }
.market-art {
    width: 120px; height: 120px; margin: 0 auto 8px;
    display: flex; align-items: center; justify-content: center;
}
.market-art .pet-img { width: 92px; }
.drop-modal img.pet-img { width: 130px; display: block; margin: 0 auto; }

/* 喂食 */
.food-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.food-chip {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    background: #f8fafc; border: 1px solid #dfe4ea; border-radius: 10px;
    padding: 10px 14px; cursor: pointer; min-width: 108px;
}
.food-chip img { width: 52px; height: 52px; }
.food-chip:hover:not(:disabled) { border-color: #4a90d9; background: #eaf2fb; }
.food-chip:disabled { opacity: 0.55; cursor: not-allowed; }
.food-name { font-size: 0.9rem; font-weight: 600; }
.food-meta { font-size: 0.75rem; color: #95a5a6; }

/* 布置小屋 */
.decorate-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.deco-chip {
    display: flex; align-items: center; gap: 6px;
    background: #f8fafc; border: 1px solid #dfe4ea; border-radius: 8px;
    padding: 6px 10px; cursor: pointer; font-size: 0.85rem;
}
.deco-chip img { width: 34px; height: 34px; border-radius: 6px; }
.deco-chip:hover { border-color: #4a90d9; }
.deco-chip.equipped { border-color: #27ae60; background: #e3f7ec; }

/* 签到 / 任务 */
.sign-card h2 { margin-top: 0; }
.task-list { list-style: none; padding: 0; margin: 0; }
.task-item { padding: 10px 0; border-bottom: 1px solid #ecf0f1; }
.task-item:last-child { border-bottom: none; }
.task-info { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; }
.task-progress { height: 6px; background: #ecf0f1; border-radius: 3px; overflow: hidden; }
.task-progress-fill { height: 100%; background: #f1c40f; border-radius: 3px; transition: width 0.3s; }
.task-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.task-count { font-size: 0.8rem; color: #95a5a6; }

/* 稀有度 / 徽标 */
.badge-rarity {
    display: inline-block; font-size: 0.72rem; font-weight: 600;
    border-radius: 8px; padding: 2px 8px; background: #eef1f5; color: #7f8c8d;
}
[class~="rarity-稀有"] { background: #eaf2fb; color: #4a90d9; }
[class~="rarity-史诗"] { background: #fdf1e0; color: #e67e22; }
.badge-active {
    display: inline-block; font-size: 0.72rem; font-weight: 600;
    border-radius: 8px; padding: 2px 8px; background: #e3f7ec; color: #27ae60;
}
.badge-beaten {
    display: inline-block; font-size: 0.72rem; font-weight: 600;
    border-radius: 8px; padding: 2px 8px; background: #e3f7ec; color: #27ae60;
}

/* 兔舍 */
.rabbit-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.rabbit-card { margin-bottom: 0; }
.rabbit-card.active-rabbit { border: 2px solid #27ae60; }
.rabbit-art { width: 120px; margin: 0 auto; }
.rabbit-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.rabbit-name-text { font-size: 1.05rem; }
.rabbit-card .progress-bar { margin: 8px 0; }
.outfit-slots { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.outfit-slot { font-size: 0.82rem; color: #7f8c8d; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.dress-btn {
    background: #f8fafc; border: 1px solid #dfe4ea; border-radius: 6px;
    font-size: 0.76rem; padding: 2px 8px; cursor: pointer; color: #2c3e50;
}
.dress-btn:hover { border-color: #4a90d9; }
.dress-btn.equipped { background: #e3f7ec; border-color: #27ae60; }
.dress-btn.undress { color: #e74c3c; }
.rabbit-actions { display: flex; gap: 8px; margin-top: 8px; }
.market-card { margin-bottom: 0; text-align: center; }
.market-art img { width: 110px; }
.market-price { font-size: 1.1rem; font-weight: 700; color: #e67e22; }

/* 商店 */
.shop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.shop-card { margin-bottom: 0; text-align: center; padding: 14px 10px; }
.shop-art { width: 72px; height: 72px; object-fit: contain; }
.shop-art-wide { width: 100%; height: 60px; object-fit: cover; border-radius: 8px; }
.shop-slot-title { margin: 16px 0 10px; font-size: 1rem; color: #7f8c8d; }
.shop-card .btn { margin-top: 8px; }

/* 练习 */
.practice-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.practice-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: #7f8c8d; }
.practice-form select {
    padding: 8px 10px; border: 1px solid #dfe4ea; border-radius: 8px;
    font-size: 0.95rem; min-width: 200px; background: #fff;
}

/* 随身听 */
.listen-books { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.book-chip {
    background: #fff; border: 1px solid #dfe4ea; border-radius: 16px;
    padding: 5px 14px; text-decoration: none; color: #2c3e50; font-size: 0.88rem;
}
.book-chip.current { background: #4a90d9; border-color: #4a90d9; color: #fff; }
.listen-card { text-align: center; }
.listen-word { font-size: clamp(2.2rem, 8vw, 3.2rem); font-weight: 700; margin: 12px 0 0; }
.listen-ipa { font-family: monospace; font-size: 1.3rem; color: #4a90d9; margin: 6px 0; }
.listen-meaning { color: #7f8c8d; min-height: 1.4em; }
.listen-progress { color: #95a5a6; font-size: 0.85rem; margin: 10px 0; }
.listen-controls { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.listen-modes { display: flex; gap: 16px; justify-content: center; font-size: 0.88rem; color: #7f8c8d; }

/* 统计 */
.chart-card { padding: 20px; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bar-stack {
    display: flex; flex-direction: column-reverse; justify-content: flex-start;
    width: 70%; max-width: 46px; height: 100%; border-radius: 6px 6px 0 0; overflow: hidden;
    background: #f5f7fa;
}
.bar { width: 100%; }
.bar-total { background: #d4e6f7; }
.bar-correct { background: #27ae60; }
.bar-label { font-size: 0.72rem; color: #95a5a6; margin-top: 6px; }
.prog-list { list-style: none; padding: 0; margin: 0; }
.prog-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; flex-wrap: wrap; }
.prog-title { flex: 0 0 110px; font-weight: 600; font-size: 0.92rem; }
.prog-row .mastery-bar { flex: 1 1 200px; height: 10px; display: flex; overflow: hidden; border-radius: 5px; background: #dfe4ea; }
.seg-learn { background: #d4e6f7; }
.seg-testing { background: #f1c40f; }
.seg-mastered { background: #27ae60; }

/* 错题本 / 收藏本 */
.mistake-meta { font-size: 0.8rem; color: #95a5a6; display: flex; gap: 8px; align-items: center; }
.star-btn {
    background: none; border: none; cursor: pointer; font-size: 1.1rem;
    color: #b8c0cc; padding: 2px 4px;
}
.star-btn.starred { color: #f1c40f; }

/* 复习规划 */
.plan-list { list-style: none; padding: 0; margin: 0; }
.plan-row { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px dashed #ecf0f1; }
.plan-row:last-child { border-bottom: none; }
.plan-day { flex: 0 0 90px; font-weight: 600; }
.plan-count { color: #7f8c8d; }

/* 反馈组件 */
.pet-toast {
    position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(16px);
    background: rgba(44, 62, 80, 0.92); color: #fff; font-size: 0.92rem;
    border-radius: 20px; padding: 10px 20px; opacity: 0;
    transition: opacity 0.25s, transform 0.25s; z-index: 1000; pointer-events: none;
    max-width: 86vw;
}
.pet-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.carrot-float {
    position: fixed; left: 50%; top: 32%; transform: translateX(-50%);
    font-size: 1.5rem; font-weight: 700; color: #e67e22;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    animation: carrot-up 1.3s ease-out forwards; z-index: 1000; pointer-events: none;
}
@keyframes carrot-up {
    0% { opacity: 0; transform: translate(-50%, 24px); }
    18% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -56px); }
}
.drop-overlay {
    position: fixed; inset: 0; background: rgba(44, 62, 80, 0.55);
    display: flex; align-items: center; justify-content: center; z-index: 1100;
}
.drop-modal {
    background: #fff; border-radius: 16px; padding: 28px 34px; text-align: center;
    max-width: 320px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.drop-modal img { width: 150px; }
.drop-modal .btn { margin-top: 12px; }

button:disabled { opacity: 0.55; cursor: not-allowed; }
.nav-carrots { font-weight: 700; color: #e67e22; }

/* ===== 页脚（素材署名） ===== */
.site-footer {
    text-align: center; color: #b8c0cc; font-size: 0.75rem;
    padding: 24px 12px 28px;
}
.site-footer a { color: #aab4c0; }

/* ===== 移动端适配 ===== */
@media (max-width: 720px) {
    .navbar {
        flex-direction: column; align-items: flex-start;
        gap: 6px; padding: 10px 14px;
    }
    .nav-links {
        width: 100%; overflow-x: auto; flex-wrap: nowrap;
        gap: 14px; padding-bottom: 2px; -webkit-overflow-scrolling: touch;
    }
    .nav-links a, .nav-links .nav-user, .nav-links .link-btn, .nav-links button { white-space: nowrap; }
    .container { padding: 18px 12px; }
    h1 { font-size: 1.35rem; margin-bottom: 14px; }
    h2 { font-size: 1.15rem; margin: 18px 0 10px; }
    .detail-card { padding: 18px 14px; }
    .stats { margin-top: 8px; }
    .stat-cards { gap: 10px; }
    .stat-card { min-width: calc(50% - 5px); padding: 14px; }
    .stat-num { font-size: 1.4rem; }
    .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .quick-card { font-size: 1.4rem; padding: 10px 6px; }
    .hero { padding: 32px 0 20px; }
    .hero h1 { font-size: 1.7rem; }
    .hero-actions .btn { flex: 1; }
    .btn { padding: 10px 18px; }
    /* 学词/词表 */
    .learn-card .big-word { font-size: 2.2rem; }
    .big-ipa { font-size: 1.5rem; gap: 8px; flex-wrap: wrap; }
    .word-list li { gap: 8px; padding: 10px 4px; }
    .word { min-width: 72px; font-size: 1.05rem; }
    .word-row .meaning { flex-basis: 100%; order: 8; }
    /* 答题 */
    .quiz-option { flex: 1 1 calc(50% - 5px); padding: 12px 10px; font-size: 1rem; }
    .quiz-input { max-width: none; font-size: 16px; } /* 16px 防 iOS 聚焦缩放 */
    .quiz-links { flex-wrap: wrap; }
    /* 养成 */
    .scene { aspect-ratio: 5 / 4; }
    .pet-layout { flex-direction: column; }
    .pet-side { width: 100%; flex-basis: auto; }
    .food-chips { gap: 8px; }
    .food-chip { min-width: calc(33% - 6px); padding: 8px 6px; }
    .food-chip img { width: 40px; height: 40px; }
    .rabbit-grid { grid-template-columns: 1fr; }
    .book-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .shop-card { padding: 10px 6px; }
    .shop-art { width: 52px; height: 52px; }
    .shop-card .btn { padding: 6px 8px; font-size: 0.8rem; }
    .outfit-slots { font-size: 0.8rem; }
    .rabbit-actions { flex-wrap: wrap; }
    .decorate-row { gap: 6px; }
    /* 统计 / 随身听 / 规划 */
    .chart-card { padding: 12px; }
    .bar-chart { height: 120px; gap: 6px; }
    .listen-controls { flex-wrap: wrap; }
    .listen-controls .btn { flex: 1 1 40%; }
    .practice-form { flex-direction: column; align-items: stretch; }
    .practice-form select { min-width: 0; width: 100%; }
    .plan-day { flex-basis: 74px; }
    .prog-title { flex-basis: 100%; }
    .auth-card { margin: 24px auto; padding: 22px; }
    .market-art img { width: 90px; }
}
@media (max-width: 380px) {
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-grid { grid-template-columns: 1fr 1fr; }
}
