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

/* === 全局隐藏滚动条图标但保留滚动功能 === */
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #F5F5F5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 375px;
    height: 812px;
    background: var(--white);
    position: relative;
    overflow: hidden;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 8px solid #1a1a1a;
}

.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: none;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

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

.page.active {
    display: flex;
}

.status-bar {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    flex-shrink: 0;
    background: #C41E3A;
    border: none;
    box-shadow: none;
    margin: 0;
    padding-left: 20px;
    padding-right: 20px;
}

.status-bar .time {
    font-weight: 700;
}

.status-bar .icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    position: relative;
    flex-shrink: 0;
}

.nav-header .back-btn {
    position: absolute;
    left: 16px;
    top: calc(50% + 10px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.nav-header .back-btn:active {
    background: var(--light-red);
}

.nav-header .title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark);
}

.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 83px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 8px;
    padding-bottom: 34px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-gray);
    transition: color 0.2s;
}

/* 🔥🔥🔥 底部导航栏SVG图标自适应大小 */
.nav-item .nav-icon svg {
    width: 22px;                    /* 🔥 适配导航栏尺寸 */
    height: 22px;
    display: block;
}

/* 🔥🔥🔥 红色记忆导航图标 - 未选中状态（灰色）*/
.nav-item .nav-icon .nav-svg-red-memory {
    color: #9CA3AF;                /* 🔥 灰色：和其他图标一致 */
}

/* 🔥🔥🔥 红色记忆导航图标 - 选中状态（红色品牌色）*/
.nav-item.active .nav-icon .nav-svg-red-memory {
    color: #E6212A;                /* 🔥 主红色：保持品牌色 */
}

.nav-item .nav-label {
    font-size: 10px;
    color: var(--text-gray);
    transition: color 0.2s;
}

.nav-item.active .nav-icon {
    color: var(--primary-red);
}

.nav-item.active .nav-label {
    color: var(--primary-red);
    font-weight: 600;
}

/* 中间圆形按钮 - 参考图片一码通样式 */
.nav-center {
    position: relative;
    top: -8px;
    margin-top: -8px;
}

.nav-center .nav-icon-center {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C41E3A, #E8384F);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--white);
    box-shadow: 0 3px 12px rgba(196, 30, 58, 0.3);
    border: 3px solid var(--white);
    transition: all 0.2s;
}

.nav-center .nav-icon-center .ai-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.nav-center:active .nav-icon-center {
    transform: scale(0.84);
    box-shadow: 0 2px 6px rgba(196, 30, 58, 0.25);
}

.nav-center.active .nav-icon-center {
    background: linear-gradient(135deg, #C41E3A, #B8163D);
}

.nav-center .nav-label {
    margin-top: 1px;
}

.global-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.75);
    color: #FFF;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    max-width: 80%;
    text-align: center;
}

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

.confirm-dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

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

.confirm-dialog {
    width: 85%;
    max-width: 320px;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.2s ease;
}

.confirm-dialog-overlay.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-dialog-title {
    font-size: 17px;
    font-weight: 600;
    color: #333333;
    padding: 18px 20px 8px;
    text-align: center;
}

.confirm-dialog-content {
    font-size: 15px;
    color: #666666;
    padding: 16px 20px;
    text-align: center;
    line-height: 1.6;
}

.confirm-dialog-actions {
    display: flex;
    border-top: 1px solid #EEEEEE;
}

.confirm-dialog-btn {
    flex: 1;
    height: 48px;
    line-height: 48px;
    text-align: center;
    font-size: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease;
}

.confirm-dialog-btn.cancel {
    color: #666666;
    border-right: 1px solid #EEEEEE;
}

.confirm-dialog-btn.cancel:active {
    background: #F5F5F5;
}

.confirm-dialog-btn.confirm {
    color: #C41E3A;
    font-weight: 500;
}

.confirm-dialog-btn.confirm:active {
    background: #FFF5F5;
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(196, 30, 58, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, opacity 0.4s;
    opacity: 0;
}

.ripple:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: width 0s, height 0s, opacity 0s;
}

.page::-webkit-scrollbar {
    width: 0;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* === 启动页面样式 === */
/* 启动页覆盖层：覆盖在手机容器上方 */
.splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.splash-overlay .splash-gif {
    width: 375px;
    height: 812px;
    object-fit: cover;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 8px solid #1a1a1a;
}

/* 启动页淡出动画 */
.splash-overlay.fade-out {
    animation: splashFadeOut 0.8s ease-out forwards;
}

@keyframes splashFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.05);
        visibility: hidden;
    }
}

/* 首页淡入动画 */
.page.splash-enter {
    animation: pageSplashIn 0.6s ease-out forwards;
}

@keyframes pageSplashIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}