/* ========== 重置 & 全局 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f6fa;
    color: #1a1a2e;
}

html {
    font-size: 26.6667vw;
}

@media (min-width: 500px) {
    html {
        font-size: 133.333px;
    }
}

/* ========== 顶部导航（通用） ========== */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.28rem 0.4rem;
    border-bottom: 1px solid #f0f0f0;
    min-height: 0.88rem;
}

.nav-back {
    font-size: 0.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.04rem 0.08rem;
    color: #333;
    text-decoration: none;
    min-width: 0.6rem;
    border: none;
    background: transparent;
}

.nav-title {
    font-size: 0.32rem;
    font-weight: 600;
    color: #1a1a2e;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right {
    font-size: 0.28rem;
    color: #999;
    cursor: pointer;
    min-width: 0.6rem;
    text-align: right;
    visibility: hidden;
}

/* ========== 底部Tab ========== */
.bottom-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.2rem;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 200;
    box-shadow: 0 -0.04rem 0.2rem rgba(0, 0, 0, 0.04);
}

.tab-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.02rem;
    cursor: pointer;
    padding: 0.04rem 0.24rem;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    text-decoration: none;
    border: none;
    background: transparent;
}

.tab-nav-item .icon {
    font-size: 0.4rem;
    line-height: 1;
}

.tab-nav-item .label {
    font-size: 0.18rem;
    color: #999;
    font-weight: 500;
}

.tab-nav-item.active .label {
    color: #1a1a3e;
    font-weight: 600;
}

.tab-nav-item .badge-dot {
    position: absolute;
    top: 0.02rem;
    right: 0.08rem;
    width: 0.16rem;
    height: 0.16rem;
    background: #ff6b6b;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.24rem 0.4rem;
    border-radius: 0.12rem;
    font-size: 0.26rem;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    max-width: 70%;
    text-align: center;
    backdrop-filter: blur(4px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== 页面容器 ========== */
.page-container {
    padding-bottom: 1.6rem;
    min-height: 100vh;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 1.2rem 0;
    color: #ccc;
}

.empty-state .icon {
    font-size: 0.8rem;
}

.empty-state .text {
    font-size: 0.26rem;
    margin-top: 0.12rem;
    color: #bbb;
}

/* ========== 工具类 ========== */
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hidden {
    display: none !important;
}