/* ================= 整体框架 ================= */
.wt-wrap {
    max-width: 1200px; margin: 0 auto; padding: 20px; font-family: system-ui, sans-serif;
}
.wt-head { text-align: center; margin-bottom: 20px; }
.wt-title { font-size: 24px; font-weight: bold; color: #333; margin: 0 0 10px; }
.wt-stats { font-size: 14px; color: #888; }

/* ================= 舞台 ================= */
.wt-stage {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: #f4f4f4; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.wt-tree { width: 100%; height: 100%; display: block; }

/* ================= 许愿牌 (SVG 核心样式) ================= */
.wt-tag-body { stroke-width: 1.2; transition: filter 0.3s; }

/* 1. 普通心愿：深红色 */
.wt-tag-normal { fill: #c0392b; stroke: #922b21; }
.wt-tassel-normal { fill: #c0392b; }

/* 2. 强烈心愿：紫罗兰色 + 金色描边 */
.wt-tag-strong { fill: #8e44ad; stroke: #d4af37; stroke-width: 2; }
.wt-tassel-strong { fill: #8e44ad; }

/* 3. 秘密心愿：翡翠绿 */
.wt-tag-secret { fill: #27ae60; stroke: #1e8449; }
.wt-tassel-secret { fill: #27ae60; }

/* 4. 已还愿：金色牌身 + 强光 */
.wt-tag-done { fill: #f39c12; stroke: #e67e22; stroke-width: 2; }
.wt-tassel-done { fill: #f39c12; }

/* 自己的牌子：加一圈高亮光晕 */
.wt-tag-mine { filter: drop-shadow(0 0 6px rgba(241, 196, 15, 0.8)); }

/* 内圈与细节 */
.wt-tag-inner { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 1.2; }
.wt-tag-hole { fill: rgba(0, 0, 0, 0.45); }
.wt-tag-cord { stroke: #7f8c8d; stroke-width: 1.5; stroke-linecap: round; }

.wt-tag-wish { 
    fill: #fff; font-size: 16px; text-anchor: middle; 
    font-weight: 900; letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4); /* 文字加阴影，更加立体 */
}

.wt-tassel-bead { fill: #f1c40f; } /* 流苏上的金珠始终为金色 */

/* 印章 */
.wt-seal { fill: #f1c40f; stroke: #fff; stroke-width: 0.6; }
.wt-seal-text { fill: #b91c1c; font-size: 5.5px; text-anchor: middle; font-weight: bold; }

/* 随风摆动 */
.wt-sway-1 { transform-box: fill-box; transform-origin: top center; animation: wt-sway 3.5s ease-in-out infinite; }
.wt-sway-2 { transform-box: fill-box; transform-origin: top center; animation: wt-sway 4.2s ease-in-out infinite; }
.wt-sway-3 { transform-box: fill-box; transform-origin: top center; animation: wt-sway 5s ease-in-out infinite; }
.wt-sway-4 { transform-box: fill-box; transform-origin: top center; animation: wt-sway 6s ease-in-out infinite; }
@keyframes wt-sway {
    0%, 100% { transform: rotate(-2.5deg); }
    50% { transform: rotate(2.5deg); }
}

/* ================= 悬停气泡 ================= */
.wt-tip {
    position: fixed; z-index: 9999; background: #fff; padding: 12px 16px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); font-size: 13px; color: #333; max-width: 250px;
    pointer-events: none; opacity: 0; transition: opacity 0.2s; border: 1px solid #eee;
}
.wt-tip[data-show="1"] { opacity: 1; }
.wt-tip-sign { color: #888; font-size: 12px; margin-top: 6px; text-align: right; }

/* ================= 底部操作栏 ================= */
.wt-bar { display: flex; justify-content: center; align-items: center; margin-top: 24px; }
.wt-bar-actions {
    display: flex; align-items: center; gap: 20px; background: #fff;
    padding: 10px 16px 10px 24px; border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #f0f0f0;
}
.wt-meter { font-size: 14px; color: #666; }
.wt-meter b { color: #0a7cff; font-weight: 600; }

/* ================= 弹窗 ================= */
.wt-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.wt-modal[hidden] { display: none; }
.wt-modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px); }
.wt-modal-box { 
    position: relative; background: #fff; width: 100%; max-width: 460px; 
    border-radius: 12px; padding: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.wt-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.wt-modal-title { font-size: 18px; margin: 0; font-weight: bold; color: #333; }
.wt-modal-x { background: none; border: 0; font-size: 24px; cursor: pointer; color: #999; line-height: 1; }
.wt-modal-x:hover { color: #333; }

.wt-form { display: flex; flex-direction: column; gap: 18px; }
.wt-field { display: flex; flex-direction: column; }
.wt-label { display: block; font-size: 14px; font-weight: bold; color: #333; margin-bottom: 8px; }
.wt-help { font-size: 12px; color: #888; margin-top: 6px; }
.mn-input { 
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; 
    outline: none; font-size: 14px; font-family: inherit; box-sizing: border-box; transition: 0.2s;
}
.mn-input:focus { border-color: #4a7cff; }
.wt-textarea { resize: vertical; min-height: 80px; }

/* 胶囊单选 */
.wt-titles { border: 0; padding: 0; margin: 0; }
.wt-titles-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.wt-title-chip {
    position: relative; padding: 6px 14px; font-size: 13px; color: #444;
    border: 1px solid #ddd; border-radius: 99px; cursor: pointer; transition: all 0.2s;
    background: #fff; user-select: none;
}
.wt-title-chip input { position: absolute; opacity: 0; pointer-events: none; }
.wt-title-chip:hover { border-color: #a0c4ff; }
.wt-title-chip:has(input:checked) {
    color: #4a7cff; border-color: #4a7cff; background: #eff6ff; font-weight: bold;
}

/* 卡片单选 */
.wt-cats { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wt-cat {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    border: 1px solid #ddd; border-radius: 8px; cursor: pointer; transition: all 0.2s;
    user-select: none;
}
.wt-cat:hover { border-color: #a0c4ff; }
.wt-cat input { margin: 0; width: 16px; height: 16px; accent-color: #4a7cff; cursor: pointer; }
.wt-cat-name { font-size: 14px; color: #333; }
.wt-cat-cost { margin-left: auto; font-size: 13px; color: #888; }
.wt-cat:has(input:checked) { border-color: #4a7cff; background: #f8fbff; }

/* 按钮 */
.wt-form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.mn-btn { padding: 9px 24px; border-radius: 8px; font-size: 14px; border: 1px solid #ddd; background: #fff; cursor: pointer; transition: 0.2s; font-weight: 500; }
.mn-btn:hover { background: #f5f5f5; }
.mn-btn-primary { background: #4a7cff; color: #fff; border-color: #4a7cff; }
.mn-btn-primary:hover { background: #3564e6; }