/* ============================================================
   Meowgic Land · 喵吉克乐园 — 共享样式 (taste-skill 优化)
   设计读: 魔法玩偶博物馆展示站 / 温暖治愈魔法感 / 暗色魔法美学
   Dials: VARIANCE 7 / MOTION 6 / DENSITY 4
   圆角系统: pill(按钮/chip) · card-32(卡片) · frame-10(展签画框) · panel-48(大面板)
   ============================================================ */

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

[hidden] { display: none !important; }

:root {
    --bg: #0b0907;
    --bg-elev: #1f1a14;
    --surface: rgba(20, 16, 12, 0.8);
    --surface-soft: rgba(25, 20, 16, 0.7);
    --accent: #ffaa55;
    --accent-bright: #ffcc77;
    --accent-soft: #ffcd94;
    --text: #f0e6d8;
    --text-dim: #ccb690;
    --text-faint: #c9b18a;
    --line: rgba(255, 180, 105, 0.3);
    --line-soft: rgba(255, 180, 105, 0.18);
    --radius-card: 32px;
    --radius-panel: 48px;
    --radius-frame: 10px;
    --shadow-card: 0 12px 34px rgba(0,0,0,0.45);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    font-family: 'Segoe UI', 'Quicksand', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* 动效减量: 尊重系统偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .story-scene, .reveal, .brand-card, .product-card, .ip-card { opacity: 1 !important; transform: none !important; }
    .floating-paw, .floating-star { display: none; }
}

/* ============ 魔法粒子背景 ============ */
.magic-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 30% 20%, #1f1a14 0%, #050302 100%);
}
.magic-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: radial-gradient(circle, rgba(255,200,150,0.05) 1px, transparent 1px);
    background-size: 45px 45px;
    animation: floatDust 70s linear infinite;
}
@keyframes floatDust {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* 漂浮爪印 + 星光 */
.floating-paw, .floating-star {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.25;
    animation: floatUp 20s linear infinite;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.35; }
    90% { opacity: 0.35; }
    100% { transform: translateY(-20vh) rotate(360deg); opacity: 0; }
}

/* ============ 布局容器 ============ */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
}

/* ============ 导航 ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    gap: 16px;
    background: rgba(10, 8, 6, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 0 0 32px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-soft);
    text-decoration: none;
    letter-spacing: 1px;
}
.nav-links {
    display: flex;
    gap: 26px;
    font-weight: 500;
    flex-wrap: wrap;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
    font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }
@media (max-width: 768px) {
    .navbar { padding: 12px 16px; flex-wrap: wrap; }
    .nav-links { gap: 16px; font-size: 0.85rem; }
}

/* ============ 标题 & 排版 ============ */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--accent-soft);
    letter-spacing: 1px;
    line-height: 1.25;
}
.section-sub {
    font-size: 1rem;
    color: var(--text-dim);
    max-width: 65ch;
    line-height: 1.8;
    margin-bottom: 24px;
}
@media (max-width: 768px) {
    .section-title { font-size: 1.7rem; }
}

/* ============ 按钮 & 标签 ============ */
.btn {
    background: var(--accent);
    color: #1f1a14;
    padding: 8px 24px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn:hover { transform: scale(1.02); background: var(--accent-bright); }
.btn:active { transform: scale(0.98); }

.btn-soon {
    background: rgba(255, 180, 105, 0.12);
    color: #c9a36a;
    padding: 8px 24px;
    border-radius: 60px;
    border: 1px dashed rgba(255, 180, 105, 0.4);
    font-weight: 600;
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--accent-soft);
    padding: 8px 22px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: 0.2s;
    font-size: 0.9rem;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(255, 170, 85, 0.12); }

.chip {
    background: rgba(0,0,0,0.5);
    border: none;
    padding: 8px 22px;
    border-radius: 60px;
    color: #e4d5b0;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}
.chip.active, .chip:hover { background: var(--accent); color: #1f1a14; }

/* ============ Hero ============ */
.hero-copy {
    text-align: center;
    padding: 26px 24px 4px;
    max-width: 820px;
    margin: 0 auto;
}
.hero-eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: #b48d5e;
    margin-bottom: 14px;
}
.hero-title {
    font-size: clamp(1.9rem, 4.6vw, 3.2rem);
    line-height: 1.28;
    letter-spacing: 2px;
    color: var(--accent-soft);
    font-weight: 700;
}
.hero-sub {
    margin: 14px auto 0;
    font-size: 1rem;
    color: var(--text-faint);
    max-width: 52ch;
    line-height: 1.8;
}

/* ============ 通用面板 ============ */
.panel {
    background: var(--surface-soft);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-panel);
    padding: 48px 32px;
    text-align: center;
    margin: 60px 0;
    border: 1px solid var(--line-soft);
}
@media (max-width: 768px) {
    .panel { padding: 32px 18px; border-radius: 36px; }
}

/* ============ 展签式卡片(画廊共用) ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 32px;
    margin: 40px 0;
}
.ip-card {
    position: relative;
    background: linear-gradient(165deg, rgba(32, 25, 18, 0.94), rgba(15, 12, 8, 0.94));
    border: 1px solid #b8863b55;
    border-radius: var(--radius-frame);
    padding: 10px 10px 0;
    box-shadow: var(--shadow-card), inset 0 0 0 1px rgba(255, 214, 150, 0.06);
    cursor: pointer;
    transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.ip-card:hover {
    transform: translateY(-6px);
    border-color: #e0b36a;
    box-shadow: 0 18px 44px rgba(0,0,0,0.55), 0 0 26px rgba(255, 170, 85, 0.14);
}
.ip-img {
    border-radius: 6px;
    border: 1px solid rgba(255, 200, 140, 0.14);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    width: 100%;
}
.ip-info { padding: 12px 6px 14px; text-align: center; }
.plaque-no {
    font-size: 0.62rem;
    letter-spacing: 3px;
    color: #9c7c52;
    margin-bottom: 5px;
}
.ip-title { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 600; }
.ip-brand { font-size: 0.65rem; background: rgba(255,170,85,0.18); padding: 2px 10px; border-radius: 40px; color: var(--accent-soft); }
.ip-desc { font-size: 0.75rem; color: #c9b18a; margin-top: 6px; line-height: 1.5; }
.ip-stats { display: flex; justify-content: center; gap: 18px; margin: 10px 0; font-size: 0.7rem; color: var(--text-dim); }
.ip-buttons { display: flex; gap: 10px; justify-content: center; }
.ip-btn {
    background: rgba(0,0,0,0.6);
    border: 1px solid #ffb46980;
    padding: 5px 14px;
    border-radius: 60px;
    cursor: pointer;
    font-size: 0.68rem;
    transition: 0.2s;
    color: var(--text);
}
.ip-btn:hover { background: var(--accent); color: #1f1a14; }

.fav-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 180, 105, 0.45);
    background: rgba(10, 8, 6, 0.72);
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.25s, box-shadow 0.25s;
    z-index: 3;
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn.faved {
    background: rgba(255, 170, 85, 0.92);
    box-shadow: 0 0 18px rgba(255, 170, 85, 0.55);
}
.fav-btn.faved::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 170, 85, 0.5);
    animation: favPulse 1.6s ease-out infinite;
}
@keyframes favPulse {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.55); opacity: 0; }
}

/* ============ 沉浸式展厅 ============ */
.showroom {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 42%, #241a10 0%, #0a0705 65%, #030201 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s;
}
.showroom.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.showroom-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.showroom-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 170, 85, 0.22) 0%, transparent 65%);
    filter: blur(10px);
    pointer-events: none;
    animation: glowBreath 3.5s ease-in-out infinite;
}
@keyframes glowBreath {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}
.showroom-img {
    position: relative;
    height: min(78vh, 640px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 200, 140, 0.25);
    box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 60px rgba(255, 170, 85, 0.15);
    animation: showroomIn 0.4s ease;
}
@keyframes showroomIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.showroom-plaque { margin-top: 22px; text-align: center; animation: showroomIn 0.4s ease 0.08s both; }
.showroom-name { font-size: 1.5rem; color: #ffd9a0; letter-spacing: 2px; }
.showroom-meta { font-size: 0.85rem; color: #b48d5e; margin: 6px 0; letter-spacing: 1px; }
.showroom-desc { font-size: 0.9rem; color: #d8c0a0; max-width: 420px; line-height: 1.7; }
.showroom-wish { font-size: 0.8rem; color: #8f7350; margin-top: 8px; }
.showroom-btn {
    position: absolute;
    border: 1px solid rgba(255, 200, 140, 0.3);
    background: rgba(20, 15, 10, 0.6);
    color: #ffd9a0;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.showroom-btn:hover { background: rgba(255, 170, 85, 0.25); }
.showroom-btn.close { top: 26px; right: 30px; width: 46px; height: 46px; font-size: 1.1rem; }
.showroom-btn.prev, .showroom-btn.next { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 2rem; }
.showroom-btn.prev { left: 28px; }
.showroom-btn.next { right: 28px; }
.showroom-hint {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.72rem;
    color: #6d5b45;
    letter-spacing: 2px;
}
@media (max-width: 768px) {
    .showroom-btn.prev { left: 12px; }
    .showroom-btn.next { right: 12px; }
    .showroom-btn.prev, .showroom-btn.next { width: 44px; height: 44px; font-size: 1.6rem; }
    .showroom-img { height: min(64vh, 520px); }
    .showroom-btn.close { top: 18px; right: 18px; }
}

/* ============ 魔法手册 ============ */
.magic-handbook {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 310px;
    background: rgba(10, 8, 6, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 16px;
    border: 1px solid #ffd96680;
    z-index: 100;
}
.handbook-header { display: flex; justify-content: space-between; cursor: pointer; color: var(--accent-soft); margin-bottom: 12px; }
.stat-line { display: flex; justify-content: space-between; margin-bottom: 12px; border-bottom: 1px dashed #ffb46960; padding-bottom: 6px; font-size: 0.85rem; }
.fragment-bar { background: #2a241e; border-radius: 20px; height: 8px; margin: 8px 0; overflow: hidden; }
.fragment-fill { width: 0%; height: 100%; background: var(--accent); }
.daily-btn { background: rgba(255,170,85,0.18); border: none; width: 100%; padding: 10px; border-radius: 60px; margin-top: 12px; cursor: pointer; font-weight: bold; color: #ffefdb; }
.magic-log { list-style: none; margin-top: 12px; font-size: 0.7rem; max-height: 200px; overflow-y: auto; }
.magic-log li { margin-bottom: 8px; border-left: 2px solid var(--accent); padding-left: 8px; }
@media (max-width: 768px) {
    .magic-handbook { right: 16px; left: 16px; width: auto; bottom: 16px; }
}

/* ============ 页脚 ============ */
footer { text-align: center; padding: 40px 0; border-top: 1px solid rgba(255,180,105,0.2); font-size: 0.8rem; color: var(--text-dim); line-height: 2; }

/* ============ 滚动入场 ============ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
