/* ================= 烦恼垃圾桶 ================= */
.tt-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 28px 30px 34px;
    margin-top: 26px;
    background:
        radial-gradient(720px 300px at 12% -10%, rgba(255, 138, 61, 0.22), transparent 60%),
        radial-gradient(640px 320px at 90% 110%, rgba(124, 92, 255, 0.25), transparent 60%),
        linear-gradient(160deg, #171d33 0%, #1f2744 55%, #191f38 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}
.tt-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.5px);
    background-size: 22px 22px;
    pointer-events: none;
}

/* ---------- 顶栏 ---------- */
.tt-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.tt-brand { display: flex; align-items: center; gap: 14px; }
.tt-logo {
    width: 58px; height: 58px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 138, 61, 0.35), rgba(255, 107, 107, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.tt-title { font-size: 22px; font-weight: 700; letter-spacing: 0.3px; }
.tt-sub { font-size: 13px; color: rgba(255, 255, 255, 0.62); margin-top: 3px; }

.tt-stats { display: flex; gap: 10px; }
.tt-stat {
    min-width: 92px;
    padding: 10px 14px;
    text-align: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.tt-stat b { display: block; font-size: 20px; font-weight: 800; color: #ffd9a8; }
.tt-stat:nth-child(2) b { color: #bcd3ff; }
.tt-stat:nth-child(3) b { color: #b7ffd9; font-size: 15px; line-height: 24px; }
.tt-stat span { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.55); margin-top: 2px; }

/* ---------- 输入区 ---------- */
.tt-input-wrap {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 16px 16px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.tt-input-wrap textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1f36;
    background: transparent;
    min-height: 52px;
    font-family: inherit;
}
.tt-input-wrap textarea::placeholder { color: #9aa4bf; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tt-chip {
    border: 1px solid #e6e9f2;
    background: #f6f7fb;
    color: #4a5470;
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .18s ease;
    font-family: inherit;
}
.tt-chip:hover { border-color: #ff8a3d; color: #ff8a3d; background: #fff6ee; transform: translateY(-1px); }
.tt-input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e6e9f2;
}
.tt-hint { font-size: 12px; color: #9aa4bf; }
.tt-input-actions .btn { font-size: 15px; }
[data-theme="dark"] .tt-input-actions .btn { color: #fff; }

/* ---------- 垃圾桶舞台 ---------- */
.tt-stage {
    position: relative;
    height: 148px;
    margin-top: 14px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}
.tt-bin {
    position: relative;
    z-index: 3;
    font-size: 84px;
    line-height: 1;
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.45));
    transform-origin: 50% 85%;
}
.tt-bin.shake { animation: ttShake 0.6s ease; }
.tt-bin.pop { animation: ttPop 0.45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes ttShake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-7deg) translateY(-4px); }
    45% { transform: rotate(6deg) translateY(-2px); }
    70% { transform: rotate(-4deg); }
}
@keyframes ttPop {
    0% { transform: scale(1); }
    35% { transform: scale(1.16); }
    100% { transform: scale(1); }
}

/* 碎纸片 */
.tt-shred {
    position: absolute;
    left: 50%;
    top: 8px;
    z-index: 4;
    width: 52px;
    height: 22px;
    background: #fff;
    color: #5a6483;
    font-size: 10px;
    line-height: 22px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: ttShredFly 0.9s cubic-bezier(.25, .6, .35, 1) forwards;
    pointer-events: none;
}
@keyframes ttShredFly {
    0% { opacity: 0; transform: translate(-50%, 0) rotate(0) scale(1); }
    10% { opacity: 1; transform: translate(-50%, 12px) rotate(0) scale(1); }
    55% { opacity: 1; transform: translate(calc(-50% + var(--tx) * 0.5), 60px) rotate(calc(var(--rot) * 0.6)) scale(0.75); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), var(--ty)) rotate(var(--rot)) scale(0.35); }
}

/* 彩带 */
.tt-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.tt-confetti-piece {
    position: absolute;
    bottom: 34px;
    width: 8px; height: 12px;
    border-radius: 2px;
    opacity: 0;
}
.tt-confetti.burst .tt-confetti-piece {
    animation: ttConfettiFly 1.1s ease-out forwards;
}
@keyframes ttConfettiFly {
    0% { opacity: 0; transform: translateY(0) rotate(0) scale(1); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-110px) translateX(var(--cx, 0)) rotate(var(--cr, 360deg)) scale(0.6); }
}

/* ---------- 反馈区 ---------- */
.tt-feedback {
    position: relative;
    max-width: 520px;
    margin: 4px auto 0;
    text-align: center;
    padding: 16px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}
.tt-feedback.show { opacity: 1; transform: translateY(0); }
.tt-fb-emoji { font-size: 26px; line-height: 1; }
.tt-fb-text { font-size: 15px; font-weight: 700; color: #fff; margin-top: 6px; }
.tt-fb-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.6); margin-top: 5px; }

/* ---------- 操作区 ---------- */
.tt-actions {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.tt-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13.5px;
    padding: 9px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all .18s ease;
    font-family: inherit;
}
.tt-btn:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }
.tt-btn--danger:hover { background: rgba(255, 107, 107, 0.22); border-color: rgba(255, 107, 107, 0.5); }

/* ---------- 成就面板 ---------- */
.tt-achv-panel {
    position: relative;
    margin-top: 20px;
    background: #fff;
    color: #1a1f36;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: ttSlideDown .28s ease;
}
@keyframes ttSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.tt-achv-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f6;
}
.tt-achv-count { font-size: 13px; color: #8a94ad; font-weight: 500; }
.tt-achv-close {
    margin-left: auto;
    border: none;
    background: #f1f3f9;
    width: 30px; height: 30px;
    border-radius: 9px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
}
.tt-achv-close:hover { background: #e6e9f2; }
.tt-achv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.tt-achv {
    border: 1px solid #eef0f6;
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    background: #fafbfe;
    opacity: 0.55;
    filter: grayscale(1);
}
.tt-achv.done { opacity: 1; filter: none; background: linear-gradient(160deg, #fff7ee, #fdf3ff); border-color: #ffe3c2; }
.tt-achv-icon { display: block; font-size: 24px; }
.tt-achv-name { display: block; font-size: 13.5px; font-weight: 700; margin-top: 6px; }
.tt-achv-desc { display: block; font-size: 11.5px; color: #8a94ad; margin-top: 3px; }
.tt-records {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e6e9f2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px 16px;
}
.tt-rec-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #4a5470;
}
.tt-rec-row b { color: #ff8a3d; }

/* ---------- Toast ---------- */
.tt-toast {
    position: fixed;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(23, 29, 51, 0.96);
    color: #fff;
    font-size: 13.5px;
    padding: 12px 22px;
    border-radius: 999px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    max-width: 88vw;
}
.tt-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 信息区 ---------- */
.tt-info .detail-icon { background: linear-gradient(135deg, #ff8a3d, #ff6b6b); }
.tt-info .detail-icon { color: #fff; }

/* ================= 响应式 ================= */
@media (max-width: 640px) {
    .tt-hero { padding: 20px 16px 24px; }
    .tt-head { justify-content: center; text-align: center; }
    .tt-brand { flex-direction: column; }
    .tt-stats { width: 100%; }
    .tt-stat { flex: 1; min-width: 0; }
    .tt-stage { height: 118px; }
    .tt-bin { font-size: 64px; }
    .tt-achv-grid { grid-template-columns: repeat(2, 1fr); }
}
