/* 「我的」页面样式（手机端为主，桌面端居中展示） */
.my-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.my-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 22px 20px;
    background: var(--theme-card-gradient);
    border: 1px solid var(--theme-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

.my-hero::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -70px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 165, 71, 0.18), transparent 70%);
    pointer-events: none;
}

.my-hero-head {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.my-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    background: linear-gradient(135deg, rgba(232, 165, 71, 0.20), rgba(232, 165, 71, 0.04));
    border: 1px solid rgba(232, 165, 71, 0.35);
}

.my-avatar svg {
    width: 30px;
    height: 30px;
}

.my-hero-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--theme-text);
    letter-spacing: 0.02em;
}

.my-hero-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--theme-text-secondary);
    line-height: 1.5;
}

.my-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.my-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    color: var(--theme-text-secondary);
    background: rgba(139, 155, 180, 0.12);
    border: 1px solid transparent;
}

.my-chip.primary {
    color: var(--theme-primary);
    background: rgba(232, 165, 71, 0.14);
    border-color: rgba(232, 165, 71, 0.30);
}

.my-chip.ok {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
}

.my-chip.ok .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.my-chip.warn {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.my-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.my-stat {
    position: relative;
    overflow: hidden;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--theme-card-gradient);
    border: 1px solid var(--theme-border);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease;
}

.my-stat:active {
    transform: scale(0.985);
}

.my-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.my-stat-icon svg {
    width: 18px;
    height: 18px;
}

.my-stat-icon.blue {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.14);
}

.my-stat-icon.amber {
    color: var(--theme-primary);
    background: rgba(232, 165, 71, 0.14);
}

.my-stat-label {
    font-size: 13px;
    color: var(--theme-text-secondary);
}

.my-stat-value {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 800;
    color: var(--theme-text);
    font-variant-numeric: tabular-nums;
}

.my-stat-value small {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--theme-text-secondary);
}

.my-stat::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 155, 180, 0.10), transparent 70%);
    pointer-events: none;
}

.my-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 24px 2px 10px;
}

.my-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-text);
}

.my-section-note {
    font-size: 12px;
    color: var(--theme-text-secondary);
}

.my-card {
    border-radius: 18px;
    background: var(--theme-card-gradient);
    border: 1px solid var(--theme-border);
    overflow: hidden;
}

.my-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--theme-border);
}

.my-row:last-child {
    border-bottom: none;
}

.my-row.tappable {
    cursor: pointer;
}

.my-row.tappable:active {
    background: rgba(139, 155, 180, 0.08);
}

.my-row-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-secondary);
    background: rgba(139, 155, 180, 0.12);
}

.my-row-icon svg {
    width: 17px;
    height: 17px;
}

.my-row-icon.blue {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.13);
}

.my-row-icon.green {
    color: #34d399;
    background: rgba(52, 211, 153, 0.13);
}

.my-row-icon.amber {
    color: var(--theme-primary);
    background: rgba(232, 165, 71, 0.13);
}

.my-row-icon.purple {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.13);
}

.my-row-icon.gray {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.13);
}

.my-row-main {
    flex: 1;
    min-width: 0;
}

.my-row-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-text);
}

.my-row-desc {
    margin-top: 3px;
    font-size: 12px;
    color: var(--theme-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-row-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text);
    font-family: "JetBrains Mono", Consolas, Menlo, monospace;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-row-value.place {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.my-row-value.place .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.my-row-arrow {
    flex: 0 0 auto;
    color: var(--theme-text-secondary);
    opacity: 0.55;
    display: flex;
    align-items: center;
}

.my-row-arrow svg {
    width: 14px;
    height: 14px;
}

/* 底部弹层面板 */
.my-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.my-sheet.open {
    display: block;
}

.my-sheet-mask {
    position: absolute;
    inset: 0;
    background: rgba(4, 9, 16, 0.55);
    backdrop-filter: blur(2px);
}

.my-sheet-panel {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 720px;
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
    animation: mySheetIn .22s ease;
}

@keyframes mySheetIn {
    from { transform: translate(-50%, 16px); opacity: .6; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.my-sheet-bar {
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: var(--theme-border-strong);
    margin: 10px auto 0;
}

.my-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 10px;
    border-bottom: 1px solid var(--theme-border);
}

.my-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-text);
}

.my-sheet-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--theme-text-secondary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.my-sheet-close:hover {
    background: var(--theme-card);
}

.my-sheet-body {
    padding: 14px 18px 20px;
    overflow-y: auto;
    color: var(--theme-text);
    font-size: 14px;
}

.my-sheet-empty {
    padding: 30px 0;
    text-align: center;
    color: var(--theme-text-secondary);
    font-size: 13px;
    line-height: 1.8;
}

.my-hist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--theme-border);
}

.my-hist-item:last-child {
    border-bottom: none;
}

.my-hist-kw {
    font-size: 14px;
    color: var(--theme-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-hist-time {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--theme-text-secondary);
    font-variant-numeric: tabular-nums;
}

.my-sheet-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.my-btn {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    background: var(--theme-card);
    color: var(--theme-text);
    font-size: 14px;
    cursor: pointer;
}

.my-btn.primary {
    border: none;
    background: var(--theme-primary-gradient);
    color: #1B1206;
    font-weight: 700;
}

.my-btn:active {
    transform: scale(0.985);
}

.my-textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--theme-border);
    background: var(--theme-background);
    color: var(--theme-text);
    font-size: 14px;
    line-height: 1.6;
    outline: none;
}

.my-textarea:focus {
    border-color: var(--theme-border-strong);
}

.my-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translate(-50%, 8px);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(10, 16, 26, 0.92);
    color: #fff;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1300;
    max-width: 80vw;
    text-align: center;
}

.my-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media screen and (max-width: 768px) {
    .my-page {
        padding: 14px 14px 24px;
    }

    .my-hero {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .my-avatar {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .my-hero-title {
        font-size: 18px;
    }

    .my-hero-sub {
        font-size: 12px;
    }

    .my-stat {
        padding: 14px 14px;
        border-radius: 16px;
    }

    .my-stat-value {
        font-size: 20px;
    }

    .my-section-head {
        margin: 20px 2px 8px;
    }

    .my-row {
        padding: 13px 14px;
    }

    .my-row-title {
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    /* 我的页手机端隐藏顶部导航，用底部 Tab 代替 */
    .top-nav {
        display: none !important;
    }

    .my-page {
        padding-top: 16px;
    }
}

/* ===== 移动端紧凑排版 ===== */
@media screen and (max-width: 768px) {
    .my-page {
        padding: 12px 10px calc(72px + env(safe-area-inset-bottom)) !important;
    }

    .my-hero {
        padding: 12px 14px !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .my-avatar {
        width: 40px !important;
        height: 40px !important;
        border-radius: 12px !important;
    }

    .my-hero-title {
        font-size: 15px !important;
    }

    .my-hero-sub {
        font-size: 11px !important;
    }

    .my-chips {
        margin-top: 8px !important;
        gap: 6px !important;
    }

    .my-chip {
        padding: 3px 8px !important;
        font-size: 11px !important;
    }

    .my-stats {
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .my-stat {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    .my-section-head {
        margin: 12px 0 8px !important;
    }

    .my-section-title {
        font-size: 13px !important;
    }

    .my-rows {
        border-radius: 12px !important;
    }

    .my-row {
        padding: 11px 12px !important;
    }

    .my-row-title {
        font-size: 13px !important;
    }

    .my-row-desc {
        font-size: 11px !important;
    }
}


/* ===== 我的页：真实列表 / 清理缓存 / 关于（2026-11-21） ===== */
.my-list-note {
    font-size: 12px;
    color: var(--theme-text-secondary);
    padding: 6px 2px 10px;
}

.my-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--theme-border, rgba(0, 0, 0, .08));
}

.my-list-item:last-child {
    border-bottom: 0;
}

.my-list-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.my-list-title {
    font-size: 14px;
    color: var(--theme-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-list-sub {
    font-size: 12px;
    color: var(--theme-text-secondary);
}

.my-mini-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--theme-border, rgba(0, 0, 0, .12));
    background: transparent;
    color: var(--theme-text-secondary);
    cursor: pointer;
}

.my-mini-btn:active {
    opacity: .7;
}

.my-btn.danger {
    color: #ff5b5b;
    border-color: rgba(255, 91, 91, .4);
}

.my-fb-tip {
    font-size: 13px;
    color: var(--theme-text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
}

.my-fb-count {
    text-align: right;
    font-size: 12px;
    color: var(--theme-text-secondary);
    margin: 6px 2px 0;
}

.my-clear-size {
    font-size: 15px;
    color: var(--theme-text);
    padding: 6px 0 10px;
}

.my-clear-size b {
    color: var(--theme-primary);
}

.my-about-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed var(--theme-border, rgba(0, 0, 0, .08));
    font-size: 14px;
}

.my-about-row span {
    color: var(--theme-text-secondary);
}

.my-about-row b {
    color: var(--theme-text);
    font-weight: 600;
}

.my-row-value .dot.off {
    background: #b7b7b7 !important;
}

/* 资源弹窗里的收藏按钮 + 详情页收藏按钮 */
.resource-fav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px 10px;
}

.resource-fav-hint {
    font-size: 12px;
    color: var(--theme-text-secondary);
}

.dialog-fav-btn {
    flex-shrink: 0;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--theme-border, rgba(0, 0, 0, .14));
    background: transparent;
    color: var(--theme-text);
    cursor: pointer;
}

.dialog-fav-btn.active {
    color: #E0A100;
    border-color: rgba(224, 161, 0, .45);
    background: rgba(224, 161, 0, .10);
}

.btn.favBtn {
    background: transparent;
    border: 1px solid rgba(127, 127, 127, .35);
    color: inherit;
    cursor: pointer;
}

.btn.favBtn.active {
    color: #E0A100;
    border-color: rgba(224, 161, 0, .5);
}
