/* 小鸡派对 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --yellow: #ffd93d;
    --orange: #ff8c42;
    --pink: #ff6b9d;
    --blue: #4d96ff;
    --green: #6bcb77;
    --dark: #2d2a32;
    --light: #fff8e7;
    --shadow: 0 4px 12px rgba(0,0,0,.15);
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #ffe5a0 0%, #ffd1dc 50%, #b5e8ff 100%);
    min-height: 100vh;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部栏 */
.topbar {
    background: var(--yellow);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
    gap: 10px;
}
.topbar .brand { font-weight: 800; font-size: 20px; }
.topbar .brand span.emoji { margin-right: 6px; }
.topbar nav a {
    margin-left: 14px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,.6);
    font-weight: 600;
    transition: .2s;
}
.topbar nav a:hover { background: #fff; transform: translateY(-1px); }
.topbar .user-chip {
    background: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: .15s;
    background: var(--orange);
    color: #fff;
    box-shadow: 0 3px 0 #d96c1f;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #d96c1f; }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 #d96c1f; }
.btn.blue { background: var(--blue); box-shadow: 0 3px 0 #2f74d6; }
.btn.blue:hover { box-shadow: 0 5px 0 #2f74d6; }
.btn.green { background: var(--green); box-shadow: 0 3px 0 #4a9e56; }
.btn.green:hover { box-shadow: 0 5px 0 #4a9e56; }
.btn.pink { background: var(--pink); box-shadow: 0 3px 0 #d94d7d; }
.btn.pink:hover { box-shadow: 0 5px 0 #d94d7d; }
.btn.gray { background: #999; box-shadow: 0 3px 0 #777; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; }
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: .2s;
}
.form-group input:focus { border-color: var(--blue); }

/* 登录/注册 居中卡片 */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 36px 28px;
    box-shadow: var(--shadow);
    text-align: center;
}
.auth-card h1 { font-size: 34px; margin-bottom: 6px; }
.auth-card .subtitle { color: #888; margin-bottom: 24px; font-size: 14px; }
.auth-card .big-emoji { font-size: 72px; display: block; margin-bottom: 10px; }

/* 首页大标题区 */
.hero {
    text-align: center;
    padding: 50px 20px 30px;
}
.hero h1 {
    font-size: 56px;
    color: var(--dark);
    text-shadow: 3px 3px 0 #fff;
    margin-bottom: 8px;
}
.hero .team {
    font-size: 16px;
    color: #555;
    margin-bottom: 10px;
}
.hero .author { font-size: 14px; color: #888; }
.hero .chick { font-size: 100px; display: inline-block; animation: bounce 1.2s infinite ease-in-out; }
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.hero-btns { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 小鸡岛地点网格 */
.island-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-top: 20px;
}
.island-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: .2s;
    cursor: pointer;
    border: 3px solid transparent;
}
.island-card:hover { transform: translateY(-6px); border-color: var(--yellow); }
.island-card .ico { font-size: 56px; display: block; margin-bottom: 8px; }
.island-card h3 { font-size: 22px; margin-bottom: 4px; }
.island-card p { color: #888; font-size: 13px; }

/* 皮肤商店 */
.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.skin-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}
.skin-card .emoji { font-size: 48px; display: block; }
.skin-card .name { font-weight: 700; margin: 6px 0; }
.skin-card .price { color: var(--orange); font-weight: 700; margin-bottom: 8px; }
.skin-card.owned { border: 2px solid var(--green); }
.skin-card.equipped { border: 2px solid var(--blue); background: #eef6ff; }
.badge {
    position: absolute;
    top: 8px; right: 8px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
.badge.equipped { background: var(--blue); }

/* 统计条 */
.stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.stat-box {
    background: #fff;
    border-radius: 14px;
    padding: 12px 20px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 120px;
}
.stat-box .label { font-size: 12px; color: #888; }
.stat-box .value { font-size: 22px; font-weight: 800; color: var(--orange); }

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 700; }
tr:last-child td { border-bottom: none; }

/* 闪存消息 */
.flash {
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}
.flash.success { background: #e8f8e8; color: #2d7a2d; border: 1px solid #b3e0b3; }
.flash.error { background: #ffe8e8; color: #a33; border: 1px solid #f0b3b3; }
.flash.info { background: #e8f0ff; color: #3366aa; border: 1px solid #b3c8f0; }

/* 游戏画布区域 */
.game-area {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.game-canvas {
    width: 100%;
    height: 420px;
    background: linear-gradient(180deg, #87ceeb 0%, #b5e8ff 60%, #ffe5a0 60%, #ffd93d 100%);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    user-select: none;
}

/* 页脚 */
.footer {
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 24px;
}

/* 响应式 */
@media (max-width: 600px) {
    .hero h1 { font-size: 40px; }
    .topbar nav a { margin-left: 6px; padding: 5px 10px; font-size: 13px; }
    .maze-wrap canvas { max-width: 100%; height: auto; }
}

/* ============ v2：公告横幅 ============ */
.announce-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.announce-banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: linear-gradient(135deg, #fff4cc 0%, #ffe9b0 100%);
    border: 2px solid #ffd93d;
    border-left: 6px solid #ff8c42;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
}
.announce-banner .announce-ico { font-size: 26px; line-height: 1.2; }
.announce-banner .announce-title { font-weight: 800; font-size: 16px; color: var(--dark); margin-bottom: 4px; }
.announce-banner .announce-content { font-size: 14px; color: #5a4a1a; line-height: 1.55; word-break: break-word; }

/* ============ v2：记忆岛 翻牌 ============ */
.mem-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 460px;
    margin: 0 auto;
    perspective: 600px;
}
.mem-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform .25s;
    background: #fff;
    box-shadow: var(--shadow);
}
.mem-card span {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    backface-visibility: hidden;
    border-radius: 12px;
}
.mem-card .mem-back { background: linear-gradient(135deg,#ffd93d,#ff8c42); color: #fff; font-size: 30px; }
.mem-card .mem-face { transform: rotateY(180deg); background: #fff8e7; }
.mem-card.open, .mem-card.done { transform: rotateY(180deg); }
.mem-card.done { cursor: default; }
.mem-card.done .mem-face { background: #e8f8e8; box-shadow: inset 0 0 0 3px var(--green); border-radius: 12px; }

/* ============ v2：反应岛 Simon ============ */
.simon-board {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    background: #2d2a32;
    padding: 8px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}
.simon-pad {
    border-radius: 12px;
    opacity: .55;
    cursor: pointer;
    transition: opacity .1s, filter .1s;
    user-select: none;
}
.simon-pad.lit { opacity: 1; filter: brightness(1.5) saturate(1.3); }
.simon-pad:nth-child(1){ border-top-left-radius: 140px; border-bottom-right-radius: 8px; }
.simon-pad:nth-child(2){ border-top-right-radius: 140px; border-bottom-left-radius: 8px; }
.simon-pad:nth-child(3){ border-bottom-left-radius: 140px; border-top-right-radius: 8px; }
.simon-pad:nth-child(4){ border-bottom-right-radius: 140px; border-top-left-radius: 8px; }
.simon-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 80px; height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; color: var(--dark);
    text-align: center;
    box-shadow: 0 0 0 4px #2d2a32;
}

/* ============ v2：算鸡岛 ============ */
.math-q {
    background: #fff8e7;
    border: 2px dashed #ffd93d;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
}
.math-q #qText { font-size: 26px; font-weight: 800; color: var(--dark); }

/* ============ v2：迷宫岛 ============ */
.maze-wrap {
    display: flex; justify-content: center;
    background: #2d2a32;
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
    overflow: auto;
}
.maze-wrap canvas {
    image-rendering: pixelated;
    border-radius: 6px;
    max-width: 100%;
}
.dpad {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; margin-top: 14px;
}
.dpad-row { display: flex; gap: 8px; }
.dpad-btn {
    width: 56px; height: 56px;
    border: none; border-radius: 14px;
    font-size: 24px; cursor: pointer;
    background: #fff; box-shadow: 0 3px 0 #ccc;
    transition: .1s;
}
.dpad-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #ccc; }
@media (min-width: 768px){ .dpad { display: none; } }

/* ============ v5：养鸡页 ============ */
.pet-card { text-align: center; }
.pet-stage {
    background: linear-gradient(180deg, #b5e8ff 0%, #d8f5d8 60%, #cdeeb6 100%);
    border-radius: 16px;
    padding: 30px 20px 18px;
    margin-bottom: 18px;
}
.pet-chick {
    font-size: 110px;
    line-height: 1;
    display: inline-block;
    animation: petBounce 1.2s infinite ease-in-out;
}
@keyframes petBounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
.pet-mood { margin-top: 10px; font-weight: 700; color: #2d2a32; }
.pet-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.pet-stat { flex: 1; min-width: 220px; text-align: left; }
.pet-stat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.pet-bar { background: #f0f0f0; border-radius: 20px; height: 16px; overflow: hidden; }
.pet-bar-fill { height: 100%; border-radius: 20px; transition: width .4s; }
.pet-bar-fill.hunger { background: linear-gradient(90deg, #ff8c42, #ffd93d); }
.pet-bar-fill.thirst { background: linear-gradient(90deg, #4d96ff, #6bcbff); }
.pet-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ v5：皮肤转移页 ============ */
.skin-tf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 16px; }
.skin-tf-card {
    background: #fff; border-radius: 16px; padding: 16px 10px;
    text-align: center; box-shadow: var(--shadow);
    border: 3px solid transparent; transition: .15s; cursor: pointer;
}
.skin-tf-card.sel { border-color: var(--pink); background: #fff0f6; }
.skin-tf-card.locked { opacity: .45; cursor: not-allowed; }
.skin-tf-card .emoji { font-size: 46px; display: block; }
.skin-tf-card .name { font-weight: 700; margin: 6px 0; }

/* ============ v6：典藏市场 ============ */
.coll-market-grid, .coll-mine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.coll-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 3px solid #f0f0f0;
    transition: .15s;
}
.coll-card.worn { border-color: var(--pink); background: #fff5fa; }
.coll-card:hover { transform: translateY(-3px); }
.coll-card .coll-emoji { font-size: 46px; line-height: 1.1; display: block; }
.coll-card .coll-name { font-weight: 700; margin: 6px 0 2px; word-break: break-word; }
.coll-card .coll-type { font-size: 12px; color: #888; }
.coll-card .coll-price { font-size: 16px; color: var(--orange); font-weight: 700; margin: 6px 0; }
.coll-card .coll-seller { font-size: 11px; color: #aaa; margin-bottom: 8px; }
.coll-card .coll-acq { font-size: 11px; color: #888; margin: 4px 0 8px; }

/* 主页纪念品展示 */
.souvenir-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 2px;
    margin-top: 10px;
}
.souvenir-chip {
    flex: 0 0 auto;
    background: linear-gradient(135deg, #fff8e1, #ffe0b2);
    border-radius: 14px;
    padding: 10px 16px;
    text-align: center;
    cursor: pointer;
    border: 2px solid #ffd54f;
    transition: .15s;
}
.souvenir-chip:hover { transform: scale(1.05); }
.souvenir-chip .emoji { font-size: 34px; display: block; }
.souvenir-chip .nm { font-size: 12px; font-weight: 700; margin-top: 2px; }

/* 聊天室典藏头衔标签（区别于普通头衔的橙渐变） */
.coll-title-tag {
    display: inline-block;
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 10px;
    margin-right: 6px;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
/* 聊天室典藏用户名「同时@」行 */
.coll-also-name {
    display: inline-block;
    color: #9b59b6;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
    text-decoration: underline dotted;
    cursor: pointer;
}

/* 个人主页 profile_view */
.pv-header { text-align: center; padding: 20px 0; }
.pv-emoji { font-size: 96px; line-height: 1; }
.pv-name { font-size: 22px; font-weight: 700; margin: 8px 0 2px; }
.pv-username { color: #888; font-size: 14px; }
.pv-also { color: #9b59b6; font-size: 14px; font-weight: 600; margin-top: 4px; cursor: pointer; text-decoration: underline dotted; }
