/* 应用布局 */
#app {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #f5f5f5;
}

/* 主要内容区域 */
.main-content {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background-color: #f9f9f9; /* 统一背景色为浅灰色 */
    position: relative;
    display: flex;
    flex-direction: column;
    border: none;
    outline: none;
    overflow: hidden; /* 防止主容器出现滚动条 */
}

/* 页面内容 */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding-top: 56px; /* 为顶部导航留出空间 */
    padding-bottom: 20px; /* 底部内边距 */
    position: relative;

    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* 隐藏 Webkit 浏览器的滚动条 */
.page-content::-webkit-scrollbar {
    display: none;
}

/* 加载提示 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading.hidden {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    color: #666;
    font-size: 14px;
}

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

/* 响应式设计 */
@media (min-width: 481px) {
    #app {
        padding: 20px;
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        height: 100vh;
    }

    .main-content {
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        overflow: hidden;
        position: relative;
        height: calc(100vh - 40px);
    }

    /* 移除顶部装饰线，避免与固定导航冲突 */
    .main-content::before {
        display: none;
    }

    .header {
        border-radius: 12px 12px 0 0;
    }

    .bottom-nav {
        border-radius: 0 0 12px 12px;
    }
}

/* 小屏幕优化 */
@media (max-width: 360px) {
    .page-content {
        padding-bottom: 55px; /* 小屏幕底部导航高度 */
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-gold {
    color: #d4af37;
}

.bg-gold {
    background-color: #d4af37;
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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