:root {
    --brand-pink: #FFB7C5;
    --brand-dark: #FF85A1;
    --brand-bg: #FFF9FA;
    --brand-text: #5D4A4A;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow: 0 20px 40px rgba(255, 183, 197, 0.2);
    --accent: #FFD1DC;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
    margin: 0; padding: 0;
    background-color: var(--brand-bg);
    color: var(--brand-text);
    font-family: 'Quicksand', 'PingFang SC', sans-serif;
    overflow-x: hidden;
}

/* 粒子背景层 */
#bg-canvas {
    position: fixed; top: 0; left: 0; z-index: -1;
    pointer-events: none;
}

/* 导航栏 */
nav {
    position: fixed; top: 0; width: 100%; height: 80px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 6%; background: var(--glass);
    backdrop-filter: blur(15px); z-index: 1000;
    border-bottom: 1px solid rgba(255, 183, 197, 0.1);
}

.logo { font-size: 24px; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.nav-links { display: flex; gap: 40px; }
.nav-links a {
    text-decoration: none; color: var(--brand-text);
    font-weight: 600; font-size: 14px; transition: 0.3s;
    text-transform: uppercase; letter-spacing: 1px;
    position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background: var(--brand-dark); transition: 0.3s;
}
.nav-links a:hover::after { width: 100%; }

/* Hero 剧场区 */
.hero {
    height: 100vh; display: flex; align-items: center;
    padding: 0 10%; position: relative;
}

.hero-content { flex: 1; z-index: 2; }
.hero-tag {
    background: white; padding: 8px 18px; border-radius: 50px;
    font-size: 12px; font-weight: 700; color: var(--brand-dark);
    box-shadow: 0 4px 15px rgba(255,183,197,0.3);
    display: inline-block; margin-bottom: 25px;
}

.hero h1 { font-size: 84px; line-height: 1.1; margin: 0; color: var(--brand-dark); }
.hero p { font-size: 18px; margin: 30px 0 45px; line-height: 1.8; color: #8E7A7A; max-width: 500px; }

.hero-visual { flex: 1; display: flex; justify-content: center; perspective: 1000px; }
.main-pig-container { transition: transform 0.1s ease-out; }
.main-pig-box {
    width: 420px; height: 420px; background: white;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 160px; box-shadow: var(--shadow);
    animation: blob 8s infinite alternate ease-in-out;
    position: relative; cursor: pointer; user-select: none;
}

.poke-hint { font-size: 14px; margin-top: 10px; font-weight: bold; color: var(--brand-dark); opacity: 0.6; }

@keyframes blob {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: scale(1); }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: scale(1.05); }
}

/* 核心互动卡片 */
.section { padding: 120px 6%; max-width: 1400px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 42px; color: var(--brand-dark); margin-bottom: 10px; }

.grid-container { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; }
.card {
    background: white; border-radius: 40px; padding: 40px;
    box-shadow: var(--shadow); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 183, 197, 0.1); position: relative;
    overflow: hidden;
}
.card:hover { transform: translateY(-12px); box-shadow: 0 30px 60px rgba(255, 183, 197, 0.3); }

.card-feed { grid-column: span 7; display: flex; align-items: center; gap: 40px; }
.card-gacha { grid-column: span 5; text-align: center; background: var(--brand-dark); color: white; cursor: pointer; }
.card-translate { grid-column: span 12; text-align: center; background: linear-gradient(135deg, #fff 0%, #fff5f7 100%); }

/* 喂食组件 */
.food-tray { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.food-btn {
    background: var(--brand-bg); border: none; font-size: 30px; padding: 20px;
    border-radius: 20px; cursor: pointer; transition: 0.3s;
}
.food-btn:hover { background: var(--brand-pink); transform: scale(1.1) rotate(5deg); }

#feed-msg { font-size: 14px; min-height: 40px; margin: 15px 0; }
.stat-bar { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.stat-fill { height: 100%; width: 30%; background: var(--brand-dark); transition: 0.5s; }
.stat-label { font-size: 11px; margin-top: 8px; opacity: 0.6; }

/* 扭蛋机细节 */
.gacha-emoji { font-size: 80px; margin-bottom: 20px; transition: 0.5s; }
.meme-display { margin-top: 15px; font-size: 50px; height: 60px; }
.collection-stats { font-size: 12px; margin-top: 20px; opacity: 0.8; }

/* 翻译器细节 */
.input-group { position: relative; max-width: 600px; margin: 30px auto; }
input[type="text"] {
    width: 100%; border: 2px solid var(--brand-pink); padding: 18px 30px;
    border-radius: 35px; outline: none; font-family: inherit; font-size: 16px;
    transition: 0.3s;
}
input[type="text"]:focus { border-color: var(--brand-dark); box-shadow: 0 0 15px rgba(255,133,161,0.2); }
.output-box { margin-top: 40px; }
#pigOutput { color: var(--brand-dark); letter-spacing: 2px; margin-bottom: 20px; }
.copy-btn { background: white; border: 2px solid var(--brand-pink); padding: 10px 20px; border-radius: 20px; cursor: pointer; }

/* 表情画廊 */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 25px; }
.sticker-box {
    aspect-ratio: 1; background: white; border-radius: 35px;
    display: flex; align-items: center; justify-content: center;
    font-size: 65px; cursor: pointer; transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.02);
}
.sticker-box:hover { background: var(--brand-pink); transform: scale(1.05) rotate(-3deg); }

/* 通用组件 */
.primary-btn {
    background: var(--brand-dark); color: white; border: none;
    padding: 18px 45px; border-radius: 35px; font-weight: 700;
    cursor: pointer; transition: 0.3s; font-size: 16px;
}
.primary-btn:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(255, 133, 161, 0.4); }

#toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--brand-dark); color: white; padding: 12px 30px;
    border-radius: 50px; font-weight: 600; opacity: 0; transition: 0.4s;
    z-index: 2000; pointer-events: none;
}

/* 页脚 */
footer { padding: 80px 6%; background: white; display: flex; justify-content: space-between; align-items: center; }
.footer-logo h3 { color: var(--brand-dark); margin: 0 0 5px 0; }
.footer-copy { text-align: right; font-size: 12px; opacity: 0.5; line-height: 1.6; }

/* 响应式 */
@media (max-width: 968px) {
    .hero { flex-direction: column; text-align: center; padding-top: 120px; }
    .hero-content { margin-bottom: 50px; }
    .hero h1 { font-size: 56px; }
    .main-pig-box { width: 300px; height: 300px; font-size: 120px; }
    .card-feed, .card-gacha { grid-column: span 12; }
}