/* ============================================================
 * 今天吃什么 · what-to-eat
 * 随机美食翻牌转盘 · 完整黑夜模式
 * ============================================================ */

/* ---------------- 舞台 ---------------- */
.wte-stage {
    --wte-main: #f97316;
    --wte-main2: #ef4444;
    position: relative;
    border-radius: 24px;
    padding: 30px 30px 26px;
    background:
        radial-gradient(640px 300px at 10% -8%, rgba(249, 115, 22, 0.17) 0%, transparent 55%),
        radial-gradient(560px 280px at 96% 108%, rgba(239, 68, 68, 0.13) 0%, transparent 55%),
        linear-gradient(135deg, #fff7ed 0%, #ffedd5 45%, #fee7e2 100%);
    border: 1px solid rgba(249, 115, 22, 0.22);
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.12);
}
:root[data-theme="dark"] .wte-stage {
    background:
        radial-gradient(640px 300px at 10% -8%, rgba(249, 115, 22, 0.22) 0%, transparent 55%),
        radial-gradient(560px 280px at 96% 108%, rgba(239, 68, 68, 0.18) 0%, transparent 55%),
        linear-gradient(135deg, #1c1418 0%, #241a1d 45%, #2c1b18 100%);
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.wte-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.wte-head-icon {
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 6px 16px rgba(249, 115, 22, 0.4));
}
.wte-head h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #1f2937;
}
:root[data-theme="dark"] .wte-head h1 { color: #fed7aa; }
.wte-sub {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(31, 41, 55, 0.62);
}
:root[data-theme="dark"] .wte-sub { color: rgba(253, 215, 170, 0.65); }
.wte-counter {
    margin-left: auto;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(249, 115, 22, 0.28);
    color: rgba(31, 41, 55, 0.75);
}
:root[data-theme="dark"] .wte-counter {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(249, 115, 22, 0.32);
    color: rgba(253, 215, 170, 0.85);
}
.wte-counter b { color: var(--wte-main); font-size: 15px; }

/* ---------------- 筛选 ---------------- */
.wte-filters { margin-top: 20px; }
.wte-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wte-chip {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    background: rgba(255, 255, 255, 0.6);
    color: rgba(31, 41, 55, 0.75);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}
.wte-chip:hover { transform: translateY(-2px); border-color: var(--wte-main); color: var(--wte-main); }
.wte-chip.active {
    background: linear-gradient(135deg, var(--wte-main), var(--wte-main2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}
:root[data-theme="dark"] .wte-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(249, 115, 22, 0.35);
    color: rgba(253, 215, 170, 0.82);
}
:root[data-theme="dark"] .wte-chip:hover { color: #fed7aa; }

.wte-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
}
.wte-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(31, 41, 55, 0.75);
    cursor: pointer;
    user-select: none;
}
:root[data-theme="dark"] .wte-toggle { color: rgba(253, 215, 170, 0.82); }
.wte-toggle input { width: 16px; height: 16px; accent-color: var(--wte-main); cursor: pointer; }

/* ---------------- 美食卡 ---------------- */
.wte-card {
    position: relative;
    min-height: 250px;
    margin-top: 20px;
    padding: 34px 24px 26px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(249, 115, 22, 0.24);
    box-shadow: 0 16px 38px rgba(249, 115, 22, 0.13);
    overflow: hidden;
}
:root[data-theme="dark"] .wte-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(249, 115, 22, 0.22);
}
.wte-card-glow {
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(249, 115, 22, 0.10) 60deg, transparent 120deg);
    animation: wteSpin 7s linear infinite;
    pointer-events: none;
}
@keyframes wteSpin { to { transform: rotate(360deg); } }

.wte-emoji {
    position: relative;
    font-size: 84px;
    line-height: 1.1;
    filter: drop-shadow(0 8px 18px rgba(249, 115, 22, 0.28));
    transition: transform 0.15s ease;
}
.wte-name {
    position: relative;
    margin-top: 10px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.01em;
    color: #1f2937;
    line-height: 1.35;
}
:root[data-theme="dark"] .wte-name { color: #fff1e6; }
.wte-tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
}
.wte-tag {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #c2410c;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.25);
}
:root[data-theme="dark"] .wte-tag {
    color: #fdba74;
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.3);
}
.wte-slogan {
    position: relative;
    margin-top: 12px;
    font-size: 12.5px;
    color: rgba(31, 41, 55, 0.5);
}
:root[data-theme="dark"] .wte-slogan { color: rgba(253, 215, 170, 0.5); }

/* 滚动/定格动画 */
.wte-card.is-rolling .wte-emoji { animation: wteShake 0.09s linear infinite; }
.wte-card.is-rolling .wte-name { opacity: 0.55; }
@keyframes wteShake {
    0% { transform: translateY(-3px) rotate(-3deg); }
    50% { transform: translateY(3px) rotate(3deg); }
    100% { transform: translateY(-3px) rotate(-3deg); }
}
.wte-card.is-landed { animation: wtePop 0.45s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes wtePop {
    0% { transform: scale(0.86); }
    55% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ---------------- 操作栏 ---------------- */
.wte-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.wte-kbd-tip {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: rgba(31, 41, 55, 0.45);
}
:root[data-theme="dark"] .wte-kbd-tip { color: rgba(253, 215, 170, 0.45); }

/* ---------------- 历史 ---------------- */
.wte-history {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(249, 115, 22, 0.35);
}
:root[data-theme="dark"] .wte-history {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(249, 115, 22, 0.35);
}
.wte-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(31, 41, 55, 0.75);
    margin-bottom: 10px;
}
:root[data-theme="dark"] .wte-history-head { color: rgba(253, 215, 170, 0.8); }
.wte-clear {
    border: none;
    background: none;
    font-size: 12px;
    color: #c2410c;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
}
:root[data-theme="dark"] .wte-clear { color: #fdba74; }
.wte-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wte-history-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(249, 115, 22, 0.25);
    color: rgba(31, 41, 55, 0.78);
}
.wte-history-item.is-accept {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.15), rgba(52, 199, 89, 0.08));
    border-color: rgba(52, 199, 89, 0.5);
    color: #1f9d43;
}
:root[data-theme="dark"] .wte-history-item {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(249, 115, 22, 0.28);
    color: rgba(255, 241, 230, 0.85);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 620px) {
    .wte-stage { padding: 22px 16px 20px; border-radius: 18px; }
    .wte-head h1 { font-size: 21px; }
    .wte-counter { margin-left: 0; }
    .wte-emoji { font-size: 68px; }
    .wte-name { font-size: 24px; }
    .wte-card { min-height: 210px; padding: 26px 16px 22px; }
    .wte-actions .btn-lg { width: 100%; }
}
