/* 会员管理系统样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding-bottom: 60px; /* 为底部导航留出空间 */
}

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 16px;
    background-color: #fff;
    min-height: 100vh;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    padding: 0 16px;
    max-width: 750px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.back-icon {
    display: inline-block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 主要内容区域 */
.main-container {
    max-width: 750px;
    margin: 0 auto;
    background-color: #f5f5f5;
    min-height: calc(100vh - 44px - 60px); /* 减去头部和底部导航高度 */
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    z-index: 99;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 0 !important;
    transition: all 0.3s;
    min-width: 50px;
    background: none !important;
    background-color: transparent !important;
}

.bottom-nav .nav-item.active {
    color: #1890ff;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

.bottom-nav .nav-item .nav-icon {
    font-size: 24px;
    margin-bottom: 2px;
    display: block;
    opacity: 0.6;
    transition: all 0.3s;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    border: none !important;
}

.bottom-nav .nav-item.active .nav-icon {
    opacity: 1;
    transform: scale(1.1);
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    border: none !important;
}

.bottom-nav .nav-item .nav-text {
    font-size: 10px;
    font-weight: 400;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #1890ff;
    color: white;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #666;
}

/* 卡片 */
.card {
    background-color: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 加载中遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

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

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

/* Toast消息 */
.toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: rgba(82, 196, 26, 0.9);
}

.toast.error {
    background: rgba(245, 34, 45, 0.9);
}

.toast.warning {
    background: rgba(250, 173, 20, 0.9);
}

/* 响应式 */
@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }

    .header-content {
        padding: 0 12px;
    }

    .bottom-nav .nav-item .nav-icon {
        font-size: 18px;
    }

    .bottom-nav .nav-item .nav-text {
        font-size: 9px;
    }
}
