/* style.css - v66.0 Dice UI Tweak */
:root {
    --bg-body: #F5F7FA;
    --nav-h: 60px;
    --blue: #007AFF; --red: #FF3B30; --green: #34C759;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang SC", sans-serif;
    background-color: var(--bg-body); color: #333;
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 30px);
    min-height: 100vh; overflow-x: hidden;
}
a { text-decoration: none; color: var(--blue); }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; -webkit-appearance: none; max-width: 100%; box-sizing: border-box; }

/* === 底部导航 === */
.tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex; justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 9000;
}
.tab-item { flex: 1; text-align: center; color: #BBB; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; font-weight: 500; }
.tab-item.active { color: var(--blue); transform: translateY(-2px); }
.tab-icon { font-size: 24px; line-height: 1; }

/* === 通用组件 === */
.page-header { padding: 40px 20px 20px; text-align: center; position: relative; z-index: 20; }
.large-title { font-size: 32px; font-weight: 900; margin: 0; }
.subtitle { font-size: 14px; opacity: 0.6; margin-top: 5px; }
.btn { display: block; width: 100%; padding: 12px; border-radius: 12px; font-size: 15px; font-weight: bold; text-align: center; cursor: pointer; border: none; transition: 0.2s; }
.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 4px 10px rgba(0,122,255,0.3); }
.btn-secondary { background: #E5E5EA; color: #333; }
.btn-danger { background: var(--red); color: white; }

/* === 🔵 吃什么 === */
.eat-body { background: radial-gradient(circle at top, #E3F2FD, #FFF); }
.gb-scale-wrapper { transform: scale(0.75); transform-origin: top center; margin-bottom: -120px; }
.gb-stage { position: relative; width: 300px; height: 460px; margin: 0 auto; }
.gb-dome {
    position: absolute; top: 0; left: 10px; width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0.1) 60%, rgba(33,150,243,0.1) 100%);
    border: 4px solid rgba(255,255,255,0.6);
    box-shadow: inset 0 0 30px rgba(255,255,255,0.6), 0 10px 30px rgba(0,0,0,0.1);
    z-index: 10; overflow: hidden; pointer-events: none;
}
.gb-balls-container { position: absolute; width: 100%; height: 100%; top:0; left:0; }
.gb-ball {
    width: 40px; height: 40px; border-radius: 50%; position: absolute;
    box-shadow: inset -5px -5px 10px rgba(0,0,0,0.2), 2px 2px 5px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.05); transition: transform 0.1s linear;
}
.gb-ball::after { content:''; position:absolute; top:8px; left:8px; width:12px; height:6px; background:rgba(255,255,255,0.5); border-radius:50%; transform:rotate(-45deg); }
.gb-base {
    position: absolute; bottom: 0; left: 0; width: 300px; height: 240px;
    background: #4FACFE; border-radius: 40px 40px 50px 50px; z-index: 5;
}
.gb-knob {
    width: 90px; height: 90px; background: #FFF; border-radius: 50%;
    position: absolute; top: 65px; left: 105px; box-shadow: 0 5px 0 #DDD, 0 10px 20px rgba(0,0,0,0.2); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border: 4px solid #F0F0F0; transition: transform 0.5s; z-index: 20;
}
.gb-bar { width: 20px; height: 70px; background: #DDD; border-radius: 10px; }
.gb-exit {
    position: absolute; bottom: 20px; left: 100px; width: 100px; height: 60px;
    background: #0D47A1; border-radius: 10px 10px 30px 30px; overflow: hidden;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5);
}
.gb-out {
    width: 50px; height: 50px; border-radius: 50%; position: absolute;
    top: -60px; left: 125px; transition: top 0.4s cubic-bezier(0.5, 1.5, 0.5, 1);
    z-index: 15; box-shadow: 0 5px 10px rgba(0,0,0,0.3); cursor: pointer;
}
.filter-btn-wrap { text-align: center; margin-top: 40px; position: relative; z-index: 50; }
.btn-capsule {
    display: inline-flex; align-items: center; gap: 6px;
    background: #FFF; color: #007AFF; padding: 12px 30px; border-radius: 30px;
    font-size: 15px; font-weight: 700; box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: pointer; border: 1px solid rgba(0,0,0,0.05);
}
.filter-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.tag { padding: 8px 16px; background: #F5F7FA; border-radius: 8px; font-size: 14px; color: #666; cursor: pointer; border: 1px solid #EEE; }
.tag.active { background: #007AFF; color: white; border-color: #007AFF; }

/* === 🌌 玩什么 === */
.play-body { background: #0F2027; color: #FFF; }
.gx-container { width: 300px; height: 300px; margin: 40px auto; position: relative; }
.gx-ring { position: absolute; inset: -15px; border-radius: 50%; border: 2px dashed rgba(255,215,0,0.3); animation: spin 40s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.gx-wheel {
    width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
    border: 4px solid #FFD700; background: radial-gradient(#233342, #111);
    transform: rotate(0deg); transition: transform 4s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.gx-wheel canvas { width: 100%; height: 100%; display: block; }
.gx-pointer {
    position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent;
    border-top: 35px solid #FFD700; filter: drop-shadow(0 0 8px #FFD700); z-index: 20;
}
.gx-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 70px; height: 70px; border-radius: 50%; background: #FFD700;
    display: flex; align-items: center; justify-content: center;
    color: #333; font-weight: 900; font-size: 18px; border: 4px solid #FFF;
    box-shadow: 0 0 20px rgba(255,215,0,0.6); cursor: pointer; z-index: 30;
}

/* === 🐯 抽任务 === */
.task-body { background: #FFF0F5; }
.tiger-machine { width: 300px; margin: 30px auto; position: relative; }
.tiger-head { background: #FF9A9E; border-radius: 30px; border: 5px solid #5D3A3A; padding: 20px; z-index: 2; position: relative; }
.tiger-ears { display: flex; justify-content: space-between; padding: 0 20px; margin-bottom: -20px; }
.ear { width: 50px; height: 50px; background: #FF9A9E; border-radius: 50%; border: 5px solid #5D3A3A; }
.tiger-screen {
    background: #FFF; border: 4px solid #5D3A3A; border-radius: 15px;
    height: 140px; overflow: hidden; position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}
.tiger-reel { list-style: none; padding: 0; margin: 0; width: 100%; transform: translateY(0); }
.t-item {
    height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: #5D3A3A; padding: 0 10px; box-sizing: border-box;
}
.t-title { font-size: 24px; font-weight: 900; letter-spacing: 0.5px; }
.t-desc { font-size: 14px; font-weight: 600; opacity: 0.6; margin-top: 5px; color: #D46A86; }
.tiger-btn {
    margin-top: 20px; width: 100%; background: #FF5E86; color: white;
    border: 3px solid #5D3A3A; padding: 14px; border-radius: 30px;
    font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 5px 0 #C4385B;
    transition: transform 0.1s;
}
.tiger-btn:active { transform: translateY(5px); box-shadow: 0 0 0 #C4385B; }
.blur-motion { filter: blur(4px); opacity: 0.7; transform: scaleY(1.1); }

/* === 🎲 骰子 (Style Fix) === */
.dice-body { background: #F3E5F5; }
.dice-stage {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
    margin: 30px auto 10px; perspective: 800px; 
    width: 100%; min-height: 100px;
}
.dice-cube { width: 70px; height: 70px; position: relative; transform-style: preserve-3d; transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dice-face {
    position: absolute; width: 100%; height: 100%; background: #FFF;
    border: 2px solid #E1BEE7; border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    font-size: 24px; font-weight: bold; color: #8E24AA;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05); backface-visibility: hidden;
}
.df-1 { transform: translateZ(35px); } .df-2 { transform: rotateY(180deg) translateZ(35px); }
.df-3 { transform: rotateY(-90deg) translateZ(35px); } .df-4 { transform: rotateY(90deg) translateZ(35px); }
.df-5 { transform: rotateX(90deg) translateZ(35px); } .df-6 { transform: rotateX(-90deg) translateZ(35px); }

/* 骰子结果区域样式增强 */
.dice-res-list {
    text-align: center; 
    background: #F9F9F9; 
    padding: 15px; 
    border-radius: 12px; 
    margin-bottom: 20px;
    max-height: 200px; 
    overflow-y: auto;
}
.dice-res-row {
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    align-items: center;
    padding: 8px 0; 
}
/* 放大结果字号 */
.dice-badge {
    background: #8E24AA; color: white; 
    width: 36px; height: 36px; 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: bold;
    box-shadow: 0 2px 5px rgba(142,36,170,0.3);
    flex-shrink: 0;
}
.dice-val-text { 
    font-weight: bold; color: #333; font-size: 22px; 
}

.dice-settings { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px; 
    background: #FFF; padding: 15px; border-radius: 12px; 
    margin-bottom: 20px; border: 1px solid #EEE; 
}
.dice-input-group label { display:block; font-size: 12px; color: #888; margin-bottom: 4px; }
.dice-input-group input { width: 100%; padding: 8px; background: #F9F9F9; border: 1px solid #DDD; border-radius: 6px; }
.card { background: #FFF; margin: 0 20px 20px; padding: 20px; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.04); position: relative; z-index: 1;}

/* === ⚙️ Admin === */
.admin-body { background: #F5F7FA; color: #333; }
.admin-header { background: #007AFF; padding: 15px 20px; position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.admin-link { color: rgba(255,255,255,0.9); font-size: 14px; cursor: pointer; text-decoration: none; }
.admin-section { background: #FFF; border-radius: 12px; padding: 20px; margin: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.section-head { font-size: 16px; font-weight: bold; margin-bottom: 15px; border-bottom: 1px solid #EEE; padding-bottom: 10px; }
.text-tabs { display: flex; gap: 15px; margin-bottom: 15px; overflow-x: auto; }
.text-tab { font-size: 14px; color: #999; cursor: pointer; font-weight: 600; padding-bottom: 4px; white-space: nowrap; }
.text-tab.active { color: #007AFF; border-bottom: 2px solid #007AFF; }
.input-tab-group { display: flex; gap: 8px; margin-bottom: 15px; }
.input-tab { padding: 6px 16px; font-size: 13px; color: #007AFF; background: rgba(0,122,255,0.1); border-radius: 6px; cursor: pointer; }
.input-tab.active { background: #007AFF; color: #FFF; }
.smart-box { background: #F0F7FF; border: 1px dashed #007AFF; border-radius: 10px; padding: 15px; margin-bottom: 20px; }
.smart-text { width: 100%; height: 80px; padding: 8px; border: 1px solid #CCE5FF; border-radius: 6px; font-size: 12px; margin-bottom: 10px; display: block; }
.smart-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-small { padding: 6px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; border: none; color: white; }
.adm-input { width: 100%; padding: 10px; border: 1px solid #DDD; border-radius: 8px; margin-bottom: 12px; background: #FFF; display: block; }
.adm-row { display: flex; gap: 10px; }
.cat-form-row { display: flex; gap: 10px; margin-bottom: 15px; align-items: stretch; }
.cat-input { flex: 1; padding: 10px; border: 1px solid #DDD; border-radius: 8px; background: #FFF; margin: 0 !important; min-width: 0; }
.btn-cat-add { background: #007AFF; color: white; border: none; border-radius: 8px; padding: 0 20px; font-weight: bold; font-size: 14px; cursor: pointer; white-space: nowrap; }
.search-bar { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; width: 100%; }
.search-input { flex: 1; padding: 10px; border: 1px solid #DDD; border-radius: 8px; background: #FFF; font-size: 14px; margin: 0 !important; min-width: 0; }
.search-btn { padding: 10px 20px; background: #007AFF; color: #FFF; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.data-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #F0F0F0; }
.tag-badge { padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; margin-right: 8px; color: #FFF; flex-shrink: 0; }
.bg-eat { background: #007AFF; } .bg-play { background: #FF9500; } .bg-task { background: #FF2D55; }
.batch-bar { display: flex; justify-content: space-between; align-items: center; background: #FFF; padding: 10px 15px; margin-bottom: 10px; border-radius: 8px; border: 1px solid #EEE; }
.chk-custom { -webkit-appearance: checkbox; appearance: auto; width: 16px; height: 16px; margin-right: 10px; cursor: pointer; accent-color: var(--blue); border: 1px solid #CCC; }
.pagination { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.page-btn { padding: 8px 20px; background: #FFF; border: 1px solid #DDD; border-radius: 8px; font-size: 13px; color: #333; text-decoration: none; }
.login-mask { position: fixed; inset: 0; background: #F2F2F7; z-index: 200000; display: flex; align-items: center; justify-content: center; }
.login-card { background: #FFF; width: 90%; max-width: 300px; padding: 40px 30px; border-radius: 20px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.login-input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #DDD; border-radius: 8px; font-size: 16px; text-align: center; }
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 9999; display: none; align-items: flex-end; justify-content: center; }
.sheet-mask.show { display: flex; }
.sheet-content { background: #fff; width: 100%; max-width: 500px; border-radius: 24px 24px 0 0; padding: 30px 24px; text-align: center; animation: slideUp 0.3s; padding-bottom: max(30px, env(safe-area-inset-bottom)); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pwd-modal { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); align-items: center; justify-content: center; }
.pwd-box { background: #fff; padding: 25px; border-radius: 16px; width: 85%; max-width: 320px; text-align: center; }
.toast { position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.85); color: white; padding: 12px 24px; border-radius: 50px; font-size: 14px; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 10000; visibility: hidden; }
.toast.show { opacity: 1; top: 50%; visibility: visible; }
.cat-chip { background: #F5F7FA; padding: 6px 12px; border-radius: 20px; font-size: 13px; color: #333; border: 1px solid #EEE; display: inline-flex; align-items: center; gap: 6px; margin: 4px; }
.cat-action { font-size: 12px; font-weight: bold; cursor: pointer; padding: 2px 6px; border-radius: 4px; opacity: 0.6; }
.cat-edit { color: var(--accent-blue); background: rgba(0,122,255,0.1); }
.cat-del { color: var(--accent-red); background: rgba(255,59,48,0.1); }