﻿/* 基础重置：适配手机 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
    -webkit-tap-highlight-color: transparent; /* 清除手机点击高亮 */
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* 禁止横向滚动 */
    background-color: #f5f7fa;
    color: #333;
}

/* 响应式字体：随屏幕宽度变化 */
html {
    font-size: calc(100vw / 3.75); /* 375px屏幕基准100px，适配不同手机 */
}

body {
    font-size: 0.16rem; /* 16px（基于375px屏幕） */
}

/* 容器：限制最大宽度，居中显示 */
.container {
    width: 100%;
    max-width: 750px; /* 适配750px宽屏手机 */
    margin: 0 auto;
    padding: 0 0.15rem;
}

/* 按钮基础样式：适配手机点击区域 */
.btn {
    display: block;
    width: 100%;
    height: 0.44rem;
    line-height: 0.44rem;
    text-align: center;
    border: none;
    border-radius: 0.08rem;
    font-size: 0.16rem;
    cursor: pointer;
    transition: background 0.3s;
}

/* 标题样式 */
.page-title {
    font-size: 0.2rem;
    color: #1E3A8A; /* 深蓝主色 */
    padding: 0.2rem 0;
    margin-bottom: 0.2rem;
    border-bottom: 2px solid #FF7A00; /* 活力橙强调线 */
}

/* 输入框样式：适配手机 */
.input-control {
    width: 100%;
    height: 0.44rem;
    padding: 0 0.15rem;
    border: 1px solid #ddd;
    border-radius: 0.08rem;
    font-size: 0.16rem;
    margin-bottom: 0.15rem;
}

/* 导航栏：手机端顶部导航 */
.nav-header {
    width: 100%;
    height: 0.48rem;
    background-color: #1E3A8A;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.15rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999; /* 固定在顶部，防止被覆盖 */
}

    .nav-header .logo {
        font-size: 0.18rem;
        font-weight: bold;
    }

    .nav-header .nav-menu {
        display: flex;
        gap: 0.2rem;
    }

        .nav-header .nav-menu a {
            color: white;
            text-decoration: none;
            font-size: 0.14rem;
        }

            .nav-header .nav-menu a.active {
                color: #FF7A00; /* 活跃状态橙色 */
            }

/* 底部导航：手机端底部Tab */
.tab-footer {
    width: 100%;
    height: 0.5rem;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    z-index: 999;
}

    .tab-footer .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #666;
        text-decoration: none;
        font-size: 0.12rem;
    }

        .tab-footer .tab-item.active {
            color: #FF7A00;
        }

        .tab-footer .tab-item img {
            width: 0.22rem;
            height: 0.22rem;
            margin-bottom: 0.03rem;
        }

/* 卡片样式：适配手机 */
.card {
    width: 100%;
    background-color: white;
    border-radius: 0.08rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0.15rem;
    margin-bottom: 0.15rem;
}

/* 表格适配手机：横向滚动 */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* 表格超出时横向滚动 */
    margin-bottom: 0.15rem;
}

    .table-responsive table {
        width: 100%;
        min-width: 600px; /* 确保表格最小宽度，避免挤压 */
        border-collapse: collapse;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 0.12rem 0;
        text-align: center;
        border-bottom: 1px solid #eee;
        font-size: 0.14rem;
    }

    .table-responsive th {
        background-color: #1E3A8A;
        color: white;
    }

/* 弹窗样式：适配手机 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

    .modal .modal-content {
        width: 85%;
        max-width: 500px;
        background-color: white;
        border-radius: 0.08rem;
        padding: 0.2rem;
    }

    .modal .modal-title {
        font-size: 0.18rem;
        color: #1E3A8A;
        text-align: center;
        margin-bottom: 0.2rem;
    }

    .modal .modal-btn-group {
        display: flex;
        gap: 0.15rem;
        margin-top: 0.2rem;
    }

/* 状态标签：适配手机 */
.status-tag {
    display: inline-block;
    padding: 0.03rem 0.08rem;
    border-radius: 0.12rem;
    font-size: 0.12rem;
}

.status-free { /* 空闲 */
    background-color: #f0fff4;
    color: #07C160;
}
.status-paid {
    background-color: #07C160; /* 绿色表示已支付 */
    color: white;
}
.status-booked { /* 已预定 */
    background-color: #fff2f0;
    color: #ff4444;
}

.status-pending { /* 待确认 */
    background-color: #fff3e0;
    color: #FF7A00;
}

.status-confirmed { /* 已确认 */
    background-color: #f0fff4;
    color: #07C160;
}
.status-canceled {
    background-color: #fff2f0;
    color: #ff4444;
}
/* 适配iPhone底部安全区 */
@supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
    .tab-footer {
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .container {
        padding-bottom: calc(0.5rem + constant(safe-area-inset-bottom));
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
}
