/* 从 index.html 抽取的页面专属样式（保持原样） */
/* 响应式变量定义 */
:root {
    --base-width: 375;
    --base-height: 812;
    --u: calc(1024px / var(--base-width));
    --header-height: calc(120 * var(--u));
}
html, body { height: 100svh; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Alibaba Sans', 'Noto Sans SC', 'Noto Sans JP', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
    overflow-y: hidden !important;
    padding: 0;
}

.mobile-container {
    width: calc(var(--base-width) * var(--u));
    min-height: 100svh;
    background-color: #f8f8f8;
    /* border-radius: calc(20 * var(--u)); */
    box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    margin: auto;
    flex-shrink: 0;
}

.header {
    background: linear-gradient(135deg, #728dff 0%, #9ab2ff 100%);
    padding: calc(12 * var(--u)) calc(24 * var(--u)) calc(12 * var(--u));
    border-radius: 0 0 calc(33 * var(--u)) calc(33 * var(--u));
    display: flex;
    flex-direction: column;
    gap: calc(20 * var(--u));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100vw;
}

/* 内容底部留白，避免被浏览器底部栏遮挡 */
.content { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.notification-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(24 * var(--u));
    height: calc(24 * var(--u));
}

.notification-icon {
    width: calc(25 * var(--u));
    height: calc(25 * var(--u));
    background: url('../src/auth-assets/message-480.png') no-repeat center;
    background-size: contain;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.notification-icon:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: calc(-4 * var(--u));
    right: calc(-4 * var(--u));
    background: #ff4757;
    color: white;
    font-size: calc(10 * var(--u));
    font-weight: 600;
    min-width: calc(16 * var(--u));
    height: calc(16 * var(--u));
    border-radius: calc(8 * var(--u));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 calc(4 * var(--u));
    box-shadow: 0 calc(2 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.2);
    
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}



.app-title {
    position: absolute;
    top: 33%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 calc(12 * var(--u));
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.brand-logo-title {
    width: auto;
    max-width: 70%;
    object-fit: contain;
    display: block;
}

.search-container {
    display: flex;
    align-items: center;
    gap: calc(7 * var(--u));
    justify-content: space-between;
    width: 100%;
}

.search-icon {
    width: calc(25 * var(--u));
    height: calc(25 * var(--u));
    background: url('../src/auth-assets/search-480.png') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.search-text {
    flex: 1;
    color: rgba(255, 255, 255, 0.3);
    font-size: calc(20.33 * var(--u));
    letter-spacing: calc(-1 * var(--u));
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.search-text::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 用户菜单与菜单按钮 */
.menu-icon {
    width: calc(25 * var(--u));
    height: calc(25 * var(--u));
    background: url('../src/auth-assets/menu-480.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    padding: calc(8 * var(--u));
    border-radius: calc(4 * var(--u));
    transition: background-color 0.2s ease;
}

.menu-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-menu {
    position: absolute;
    top: calc(100% + 8 * var(--u));
    left: 0;
    background: white;
    border-radius: calc(8 * var(--u));
    box-shadow: 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(0, 0, 0, 0.15);
    min-width: calc(160 * var(--u));
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-8 * var(--u)));
    transition: all 0.2s ease;
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    padding: calc(12 * var(--u)) calc(16 * var(--u));
    color: #333;
    text-decoration: none;
    display: block;
    font-size: calc(14 * var(--u));
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #f8f9fa;
}

.user-menu-item:first-child {
    border-radius: calc(8 * var(--u)) calc(8 * var(--u)) 0 0;
}

.user-menu-item:last-child {
    border-bottom: none;
    border-radius: 0 0 calc(8 * var(--u)) calc(8 * var(--u));
}

.user-info {
    padding: calc(12 * var(--u)) calc(16 * var(--u));
    border-bottom: 1px solid #f0f0f0;
    font-size: calc(12 * var(--u));
    color: #666;
}

.user-info.logged-in {
    color: #4a43ec;
    font-weight: 500;
}

.update-status {
    float: right;
    font-size: calc(12 * var(--u));
    padding: calc(2 * var(--u)) calc(6 * var(--u));
    border-radius: calc(10 * var(--u));
    margin-left: calc(8 * var(--u));
}

.update-status.checking { background-color: #ffeaa7; color: #d63031; }
.update-status.up-to-date { background-color: #d1f2eb; color: #00b894; }
.update-status.update-available { background-color: #fab1a0; color: #e17055; }
.update-status.updating { background-color: #74b9ff; color: #0984e3; }

.search-container {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 600px;
    overflow-y: auto;
    margin-top: 8px;
}

.search-dropdown .search-results {
    padding: 16px;
}

.search-suggestions-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.search-suggestions-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-tag {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.favorites-icon {
    width: calc(25 * var(--u));
    height: calc(25 * var(--u));
    background: url('../src/auth-assets/favorite-480.png') no-repeat center !important;
    background-size: contain !important;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.favorites-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 搜索覆盖层样式 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(calc(8 * var(--u)));
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.show {
    opacity: 1;
    visibility: visible;
}

.search-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 calc(24 * var(--u)) calc(24 * var(--u));
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.search-overlay.show .search-modal {
    transform: translateY(0);
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: calc(20 * var(--u)) calc(24 * var(--u));
    background: linear-gradient(135deg, #4a43ec 0%, #5b54f0 100%);
    gap: calc(12 * var(--u));
}

.search-modal-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: calc(12 * var(--u));
    padding: calc(12 * var(--u)) calc(16 * var(--u));
    color: white;
    font-size: calc(16 * var(--u));
    outline: none;
    backdrop-filter: blur(calc(4 * var(--u)));
}

.search-modal-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-modal-input:focus {
    background: rgba(255, 255, 255, 0.2);
}

.search-close-button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: calc(8 * var(--u));
    padding: calc(8 * var(--u));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.search-close-button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.search-results {
    max-height: calc(60vh);
    overflow-y: auto;
    padding: calc(16 * var(--u));
}

.search-suggestions {
    margin-bottom: calc(24 * var(--u));
}

.search-suggestions-title {
    font-size: calc(14 * var(--u));
    font-weight: 600;
    color: #666;
    margin-bottom: calc(12 * var(--u));
}

.search-suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: calc(8 * var(--u));
}

.search-suggestion-tag {
    background: #f0f0f0;
    color: #666;
    padding: calc(6 * var(--u)) calc(12 * var(--u));
    border-radius: calc(16 * var(--u));
    font-size: calc(12 * var(--u));
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-suggestion-tag:hover {
    background: #667eea;
    color: white;
    transform: translateY(calc(-1 * var(--u)));
}

.content {
    padding: calc(10 * var(--u)) 0 calc(20 * var(--u)) 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 calc(24 * var(--u));
    margin-bottom: calc(12 * var(--u));
}

.section-title {
    font-size: calc(18 * var(--u));
    font-weight: 500;
    color: #120d26;
    opacity: 0.84;
}

.view-all {
    display: flex;
    align-items: center;
    gap: calc(5 * var(--u));
    color: #747688;
    font-size: calc(14 * var(--u));
    cursor: pointer;
}

.arrow-icon {
    width: calc(6.429 * var(--u));
    height: calc(9 * var(--u));
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgNyA5IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMSAxTDUgNC41TDEgOCIgc3Ryb2tlPSIjNzQ3Njg4IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPg==') no-repeat center;
    background-size: contain;
}

.cards-container {
    display: flex;
    gap: calc(12 * var(--u));
    padding: 0 calc(24 * var(--u));
    overflow-x: scroll;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.cards-container::-webkit-scrollbar {
    display: none;
}

.category-card {
    min-width: calc(160 * var(--u));
    width: calc(160 * var(--u));
    height: calc(200 * var(--u));
    background: white;
    border-radius: calc(16 * var(--u));
    box-shadow: 0px calc(4 * var(--u)) calc(20 * var(--u)) rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: top;
}

.category-card:hover {
    transform: translateY(calc(-2 * var(--u)));
}

.card-image {
    width: 100%;
    height: calc(120 * var(--u));
    border-radius: calc(12 * var(--u)) calc(12 * var(--u)) 0 0;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 确保图片在卡片内正确显示 */
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

/* 针对部分模板图片设置 8px 圆角，保持现状 */
.card-image-img-8 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.seasons-bg {
    background: linear-gradient(135deg, #ffcd6c 0%, #ffa726 100%);
}

.hot-cold-bg {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.sound-bg {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.card-content {
    padding: calc(12 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u));
    height: calc(80 * var(--u));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: calc(18 * var(--u));
    font-weight: 600;
    color: #000;
    margin-bottom: calc(4 * var(--u));
}

.card-subtitle {
    font-size: calc(16 * var(--u));
    font-weight: 500;
    color: #3f38dd;
}

.list-container {
    padding: 0 calc(24 * var(--u));
    margin-top: calc(12 * var(--u));
}

.list-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: calc(18 * var(--u));
    padding: calc(10 * var(--u));
    margin-bottom: calc(16 * var(--u));
    box-shadow: 0px calc(8 * var(--u)) calc(30 * var(--u)) rgba(80, 85, 136, 0.06);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.list-item:hover {
    transform: translateX(calc(5 * var(--u)));
}

.item-image {
    width: calc(79 * var(--u));
    height: calc(92 * var(--u));
    border-radius: calc(10 * var(--u));
    margin-right: calc(18 * var(--u));
    overflow: hidden;
}

/* 通用：背景图覆盖居中不重复 */
.bg-cover-center {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.summer-bg {
    background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
}

.city-sound-bg {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.hot-bg {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.spring-bg {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
}

.winter-bg {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: calc(18 * var(--u));
    font-weight: 500;
    color: #000;
    margin-bottom: calc(8 * var(--u));
}

.item-subtitle {
    font-size: calc(16 * var(--u));
    color: #3f38dd;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #666;
    font-size: 1.2rem;
}

.error {
    text-align: center;
    padding: 50px;
    color: #e74c3c;
    font-size: 1.2rem;
}

/* 初始隐藏错误容器，保持行为 */
#errorContainer { display: none; }

/* 隐藏所有滚动条 */
.content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content::-webkit-scrollbar {
    display: none;
}

/* 响应式媒体查询 */
@media (min-width: 1025px) {
    /* 仅保留一个滚动容器：固定页面容器为视口高度 */
    .mobile-container {
        height: 100vh;
    }
    .header {
        width: 1024px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        /* 减少上下内边距并限制最大值 */
        padding: clamp(10px, calc(10 * var(--u)), 22px) calc(24 * var(--u)) clamp(10px, calc(10 * var(--u)), 22px);
        /* 缩小行间距并设定上限 */
        gap: clamp(12px, calc(14 * var(--u)), 24px);
    }
    .content {
        /* 统一内容区高度为视口减去头部占位，避免页面层滚动 */
        height: calc(100vh - clamp(80px, calc(72 * var(--u)), 132px));
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        margin-top: 204px;
    }
    /* 控制图标与输入字号的增长幅度（仅限 header 内） */
    .header .search-text {
        font-size: clamp(16px, calc(18 * var(--u)), 22px);
    }

    /* 内容区（首页）桌面端限幅：与平板同策略 */
    .content .section-header {
        padding: 0 clamp(16px, calc(24 * var(--u)), 32px);
        margin-bottom: clamp(8px, calc(12 * var(--u)), 18px);
    }

    .content .section-title {
        font-size: clamp(16px, calc(18 * var(--u)), 22px);
    }

    .content .view-all {
        gap: clamp(4px, calc(5 * var(--u)), 8px);
        font-size: clamp(12px, calc(14 * var(--u)), 18px);
    }

    .content .cards-container {
        gap: clamp(10px, calc(12 * var(--u)), 18px);
        padding: 0 clamp(16px, calc(24 * var(--u)), 32px);
    }

    .content .category-card {
        min-width: clamp(140px, calc(160 * var(--u)), 210px);
        width: clamp(140px, calc(160 * var(--u)), 210px);
        height: clamp(180px, calc(200 * var(--u)), 260px);
    }

    .content .card-image {
        height: clamp(100px, calc(120 * var(--u)), 150px);
    }

    .content .card-content {
        padding: clamp(10px, calc(12 * var(--u)), 16px) clamp(12px, calc(16 * var(--u)), 22px) clamp(12px, calc(16 * var(--u)), 22px);
        height: clamp(60px, calc(80 * var(--u)), 100px);
    }

    .content .card-title {
        font-size: clamp(14px, calc(16 * var(--u)), 20px);
    }

    .content .card-subtitle {
        font-size: clamp(12px, calc(14 * var(--u)), 18px);
    }

    .content .list-container {
        padding: 0 clamp(16px, calc(24 * var(--u)), 32px);
        margin-top: clamp(8px, calc(12 * var(--u)), 18px);
    }

    .content .list-item {
        border-radius: clamp(12px, calc(18 * var(--u)), 24px);
        padding: clamp(8px, calc(10 * var(--u)), 16px);
        margin-bottom: clamp(10px, calc(16 * var(--u)), 24px);
    }

    .content .item-image {
        width: clamp(64px, calc(79 * var(--u)), 96px);
        height: clamp(76px, calc(92 * var(--u)), 112px);
        margin-right: clamp(12px, calc(18 * var(--u)), 24px);
        border-radius: clamp(8px, calc(10 * var(--u)), 12px);
    }

    .content .item-title {
        font-size: clamp(16px, calc(18 * var(--u)), 22px);
    }

    .content .item-subtitle {
        font-size: clamp(13px, calc(15 * var(--u)), 19px);
    }
}

/* 平板端（768px~1024px）优化：
   限制 header 垂直尺寸增长，避免占据过多高度 */
@media (min-width: 768px) and (max-width: 1024px) {
    /* 仅保留一个滚动容器：固定页面容器为视口高度 */
    .mobile-container {
        height: 100vh;
    }
    .header {
        /* 减少上下内边距并限制最大值 */
        padding: clamp(10px, calc(10 * var(--u)), 22px) calc(24 * var(--u)) clamp(10px, calc(10 * var(--u)), 22px);
        /* 缩小行间距并设定上限 */
        gap: clamp(12px, calc(14 * var(--u)), 24px);
    }


    /* 控制图标与输入字号的增长幅度（仅限 header 内） */
    .header .search-text {
        font-size: clamp(16px, calc(18 * var(--u)), 22px);
    }

    /* 图标尺寸保持原有设置，不在平板断点内强制限幅 */

    /* 控制内容高度与起始位置，确保滚动只发生在内容区 */
    .content {
        margin-top: calc(78 * var(--u));
        height: calc(100vh - clamp(80px, calc(72 * var(--u)), 126px));
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* 内容区（首页）平板端限幅 */
    .content .section-header {
        padding: 0 clamp(16px, calc(24 * var(--u)), 32px);
        margin-bottom: clamp(8px, calc(12 * var(--u)), 18px);
    }

    .content .section-title {
        font-size: clamp(16px, calc(18 * var(--u)), 22px);
    }

    .content .view-all {
        gap: clamp(4px, calc(5 * var(--u)), 8px);
        font-size: clamp(12px, calc(14 * var(--u)), 18px);
    }

    .content .cards-container {
        gap: clamp(10px, calc(12 * var(--u)), 18px);
        padding: 0 clamp(16px, calc(24 * var(--u)), 32px);
    }

    .content .category-card {
        min-width: clamp(140px, calc(160 * var(--u)), 210px);
        width: clamp(140px, calc(160 * var(--u)), 210px);
        height: clamp(180px, calc(200 * var(--u)), 260px);
    }

    .content .card-image {
        height: clamp(100px, calc(120 * var(--u)), 150px);
    }

    .content .card-content {
        padding: clamp(10px, calc(12 * var(--u)), 16px) clamp(12px, calc(16 * var(--u)), 22px) clamp(12px, calc(16 * var(--u)), 22px);
        height: clamp(60px, calc(80 * var(--u)), 100px);
    }

    .content .card-title {
        font-size: clamp(14px, calc(16 * var(--u)), 20px);
    }

    .content .card-subtitle {
        font-size: clamp(12px, calc(14 * var(--u)), 18px);
    }

    .content .list-container {
        padding: 0 clamp(16px, calc(24 * var(--u)), 32px);
        margin-top: clamp(8px, calc(12 * var(--u)), 18px);
    }

    .content .list-item {
        border-radius: clamp(12px, calc(18 * var(--u)), 24px);
        padding: clamp(8px, calc(10 * var(--u)), 16px);
        margin-bottom: clamp(10px, calc(16 * var(--u)), 24px);
    }

    .content .item-image {
        width: clamp(64px, calc(79 * var(--u)), 96px);
        height: clamp(76px, calc(92 * var(--u)), 112px);
        margin-right: clamp(12px, calc(18 * var(--u)), 24px);
        border-radius: clamp(8px, calc(10 * var(--u)), 12px);
    }

    .content .item-title {
        font-size: clamp(16px, calc(18 * var(--u)), 22px);
    }

    .content .item-subtitle {
        font-size: clamp(13px, calc(15 * var(--u)), 19px);
    }
}

@media (max-width: 1024px) {
    :root {
        --u: calc(100vw / var(--base-width));
    }
}

@media (max-width: 319px) {
    .header {
        width: 320px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

/* 移动小屏（481px~767px）：统一纵向滚动到内容区 */
@media (min-width: 481px) and (max-width: 767px) {
    body { overflow-y: hidden !important; }
    .mobile-container { min-height: 100svh; overflow: hidden; }
    .content {
        /* 内容区作为唯一滚动容器，按移动端设计基准扣除头部 */
        height: calc(100svh - calc(105 * var(--u)));
        padding-bottom: calc(30 * var(--u));
        margin-top: calc(93 * var(--u));
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        overflow-y: hidden !important;
    }
    :root { --header-height: calc(93 * var(--u)); }
    
    .mobile-container {
        width: 100vw;
        min-height: 100svh;
        border-radius: 0;
        box-shadow: none;
    }
    
    .content {
        height: calc(100svh - var(--header-height)) !important;
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        margin-top: var(--header-height) !important;
    }
}

@media (max-width: 360px) {
    :root {
        --u: calc(360px / var(--base-width));
    }
}

/* 悬浮清缓存按钮样式 */
.cache-clear-btn {
    position: fixed;
    bottom: calc(80 * var(--u));
    right: calc(20 * var(--u));
    width: calc(56 * var(--u));
    height: calc(56 * var(--u));
    background: #ff6b6b;
    border: none;
    border-radius: 50%;
    box-shadow: 0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(255, 107, 107, 0.3);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: calc(24 * var(--u));
}

.cache-clear-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
    box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(255, 107, 107, 0.4);
}

.cache-clear-btn:active {
    transform: scale(0.95);
}

.cache-clear-btn.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示消息样式 */
.cache-message {
    position: fixed;
    top: calc(100 * var(--u));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: calc(12 * var(--u)) calc(20 * var(--u));
    border-radius: calc(8 * var(--u));
    font-size: calc(14 * var(--u));
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cache-message.show {
    opacity: 1;
}

/* 工具类：用于个别元素 24px 顶部外边距 */
.mt-24px { margin-top: 24px; }

.install-banner {
    display: none;
    position: fixed;
    bottom: calc(16 * var(--u));
    left: 50%;
    transform: translateX(-50%);
    width: calc(320 * var(--u));
    max-width: 92vw;
    background: linear-gradient(135deg, #728dff 0%, #9ab2ff 100%);
    border-radius: calc(12 * var(--u));
    box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(0,0,0,0.12);
    z-index: 2000;
    padding: calc(12 * var(--u));
    backdrop-filter: saturate(120%) blur(calc(6 * var(--u)));
}
.install-banner .row {
    display: flex;
    align-items: center;
    gap: calc(10 * var(--u));
}
.install-banner .icon {
    width: calc(28 * var(--u));
    height: calc(28 * var(--u));
    background: url('../src/auth-assets/logo-pure-480.png') no-repeat center;
    background-size: cover;
    border-radius: calc(8 * var(--u));
    flex-shrink: 0;
}
.install-banner .text {
    flex: 1;
    color: #ffffff;
    font-size: calc(14 * var(--u));
}
.install-banner .actions {
    display: flex;
    gap: calc(8 * var(--u));
}
.install-banner .btn {
    border: none;
    border-radius: calc(999 * var(--u));
    padding: calc(8 * var(--u)) calc(14 * var(--u));
    font-size: calc(13 * var(--u));
    cursor: pointer;
}
.install-banner .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.install-banner .btn-secondary {
    background: #f0f0f0;
    color: #333;
}
