/**
 * base.html 内联样式分离
 * 包含导航按钮样式和页面布局样式
 */

/* ========== 导航按钮样式 ========== */
/* CSS变量定义 - 与variables.css保持一致 */
:root {
    --desktop-btn-size: 36px;
    --mobile-btn-size: 30px;
    --btn-gap: 5px;
    --mobile-btn-gap: 3px;
    --desktop-btn-font: 24px;
    --mobile-btn-font: 18px;
}

/* 导航按钮容器 */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: var(--btn-gap);
}

/* 统一的导航按钮样式 */
.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--desktop-btn-size);
    height: var(--desktop-btn-size);
    font-size: var(--desktop-btn-font);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-buttons {
        gap: var(--mobile-btn-gap);
    }
    
    .nav-btn {
        width: var(--mobile-btn-size);
        height: var(--mobile-btn-size);
        font-size: var(--mobile-btn-font);
    }
}

/* ========== 电脑版页面宽度限制样式 ========== */
@media (min-width: 769px) {
    /* 创建不透明蒙版背景 - 设置html背景 */
    html {
        background: var(--gao-color1) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 登录页面特殊背景设置 */
    body:has(.login-page) {
        background: white !important;
    }
    
    body:has(.login-page) html {
        background: white !important;
    }
    
    /* 限制body.app-container宽度为3个卡片 */
    body.app-container {
        position: fixed !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1 !important;
        max-width: 650px !important;
        width: 100% !important;
        height: 100vh !important;
        margin: 0 auto !important;
        background: transparent !important;
        box-sizing: border-box !important;
        display: block !important;
        visibility: visible !important;
        overflow: hidden !important;
    }
    
    /* 确保所有子元素适配新宽度 */
    .app-header {
        position: fixed !important;
        top: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 650px !important;
        max-width: 650px !important;
        z-index: 1000 !important;
        background: var(--gao-color1) !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    .app-main {
        margin-top: 88px !important;
        max-width: 650px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        position: relative !important;
        background: white !important;
        height: calc(100vh - 148px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
    }
    
    /* 隐藏滚动条 - Webkit浏览器 */
    .app-main::-webkit-scrollbar {
        display: none !important;
    }
    
    .app-footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 650px !important;
        max-width: 650px !important;
        z-index: 1000 !important;
        background: var(--gao-color1) !important;
    }
    
    /* 调整卡片容器以适配新宽度 */
    .order-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 8px !important;
        justify-content: center !important;
    }
    
    .order-card {
        width: 100% !important;
        max-width: 200px !important;
        margin: 0 auto !important;
    }
    
    /* 用户资料区域样式调整 */
    .user-profile {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        white-space: nowrap !important;
    }
}

/* ========== 导航菜单样式调整 - 全局生效 ========== */
/* 旧的导航样式已被新的.nav-btn样式替代 */

/* ========== 用户资料区域样式调整 - 全局生效 ========== */
.user-profile {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    white-space: nowrap !important;
}

/* ========== Footer欢迎语样式 ========== */
.app-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 1.5rem !important;
}

.time-display {
    position: static !important;
    left: auto !important;
    color: white !important;
}

.welcome-display {
    color: white !important;
    font-size: 1rem !important;
    white-space: nowrap !important;
}

@media (min-width: 769px) {
    /* 额外的桌面端样式可以在这里添加 */
}

/* ========== 移动端Footer样式 ========== */
@media (max-width: 768px) {
    .app-footer {
        padding: 0 0.5rem !important;
        font-size: 0.8rem !important;
    }
    
    .welcome-display {
        font-size: 0.8rem !important;
    }
    
    .time-display {
        font-size: 0.8rem !important;
    }
}