/* ==========================================
 * 网吧排队预约系统 - 公共样式
 * Date: 2026-07-19
 * ========================================== */

:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-bg: #FFFFFF;
    --color-text-primary: #000000;
    --color-text-secondary: #8E8E93;
    --color-text-placeholder: #C7C7CC;
    --color-input-bg: #F5F5F7;
    --color-border: #E5E5E5;
    --color-divider: #F2F2F7;
    --color-overlay: rgba(0, 0, 0, 0.6);
    --color-warning-bg: #FFF8E6;
    --color-warning-text: #B8860B;
    --color-warning-border: #F5E6C8;

    --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;

    --header-height: 44px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-family);
    font-size: 16px;
    color: var(--color-text-primary);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- 顶部导航栏 ---- */
.page-header {
    display: flex;
    align-items: center;
    padding-top: var(--safe-top);
    height: calc(var(--header-height) + var(--safe-top));
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
}

.header-back {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
    margin-left: 4px;
    /* 2026.7.20 加个过渡动画，返回时有点感觉 */
    -webkit-transition: transform 0.19s ease, border-color 0.19s ease, background 0.19s ease;
    transition: transform 0.19s ease, border-color 0.19s ease, background 0.19s ease;
}

.header-back:active {
    -webkit-transform: scale(0.89);
    transform: scale(0.89);
    border-color: var(--color-black);
    background: #F5F5F7;
}

.header-back svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-black);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    margin-right: 40px;
    line-height: var(--header-height);
}

/* ---- 页面内容容器 ---- */
.page-body {
    padding: 0 20px;
    padding-bottom: calc(24px + var(--safe-bottom));
}

/* ---- 按钮系统 ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: opacity 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    padding: 0 24px;
    letter-spacing: 0.3px;
}

.btn:active {
    opacity: 0.65;
}

.btn-primary {
    background: var(--color-black);
    color: var(--color-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-black);
    border: 1.5px solid var(--color-black);
}

.btn-outline {
    background: var(--color-white);
    color: var(--color-text-primary);
    border: 1.5px solid var(--color-border);
}

.btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-primary svg {
    stroke: var(--color-white);
    fill: none;
}

.btn-secondary svg {
    stroke: var(--color-black);
    fill: none;
}

/* ---- 表单元素 ---- */
.form-group {
    margin-bottom: 23px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
    font-weight: 400;
    line-height: 1.4;
}

.form-input {
    width: 100%;
    height: 52px;
    background: var(--color-input-bg);
    border: none;
    border-radius: var(--radius-md);
    padding: 0 16px;
    font-size: 16px;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    outline: none;
    transition: background 0.2s;
}

.form-input::placeholder {
    color: var(--color-text-placeholder);
    font-size: 15px;
}

.form-input:focus {
    background: #EDEDF0;
}

/* ---- 选择卡片 ---- */
.select-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: var(--font-family);
    text-align: left;
}

.select-card:active {
    transform: scale(0.98);
}

.select-card.active {
    background: var(--color-black);
    border-color: var(--color-black);
}

.select-card.active .card-icon {
    background: rgba(255, 255, 255, 0.12);
}

.select-card.active .card-icon svg {
    stroke: var(--color-white);
}

.select-card.active .card-title {
    color: var(--color-white);
}

.select-card.active .card-desc {
    color: rgba(255, 255, 255, 0.6);
}

.select-card.active .card-check {
    opacity: 1;
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-input-bg);
    border-radius: 10px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-text-secondary);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-text {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 3px;
    line-height: 1.3;
}

.card-desc {
    font-size: 12px;
    color: var(--color-text-secondary);
    font-weight: 400;
    line-height: 1.3;
}

.card-check {
    width: 22px;
    height: 22px;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.card-check svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-white);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- 弹窗 ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 0 32px;
}

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

.modal-box {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 300px;
    padding: 32px 24px 24px;
    text-align: center;
    transform: scale(0.85) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.show .modal-box {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: var(--color-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.modal-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-white);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-number {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.2;
    margin: 10px 0 6px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ---- 信息行 ---- */
.info-list {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 0 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-divider);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.info-value {
    font-size: 14px;
    color: var(--color-text-primary);
    font-weight: 500;
    text-align: right;
}

/* ---- 开关 ---- */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.toggle-label {
    font-size: 15px;
    color: var(--color-text-primary);
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 51px;
    height: 31px;
    background: #E5E5E5;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: var(--color-black);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

/* ---- 提示条 ---- */
.notice-bar {
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    color: var(--color-warning-text);
    line-height: 1.6;
    text-align: left;
}

/* ---- 间距工具 ---- */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

/* ---- 隐藏滚动条 ---- */
::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}