/* =========================================
   见面盲盒 · 全局样式
   设计语言：温暖、极简、无压力的线下社交
   ========================================= */

/* ---------- 全局变量 ---------- */
:root {
    /* 主色板 - 温暖系 */
    --c-primary: #FF7A59;      /* 珊瑚橙 - 主色 */
    --c-primary-dark: #F2603F; /* 深珊瑚橙 */
    --c-primary-light: #FFF2ED;
    --c-secondary: #FFD166;    /* 暖沙黄 - 盲盒色 */
    --c-accent: #06D6A0;       /* 薄荷绿 - 安全感 */
    --c-accent-dark: #05B88A;
    
    /* 中性色 */
    --c-bg: #FFFBF6;           /* 奶油白背景 */
    --c-bg-card: #FFFFFF;
    --c-bg-soft: #F8F4ED;
    --c-border: #EEE6D8;
    --c-border-light: #F5EFE4;
    
    /* 文字色 */
    --c-text: #2D3748;         /* 主文字深灰 */
    --c-text-2: #5A6778;       /* 次文字 */
    --c-text-3: #8E99A8;       /* 辅助文字 */
    --c-text-inverse: #FFFFFF;
    
    /* 状态色 */
    --c-success: #06D6A0;
    --c-warn: #FF9F1C;
    --c-danger: #E5383B;
    --c-info: #4C8BF5;
    
    /* 阴影 */
    --sh-sm: 0 2px 8px rgba(255, 122, 89, 0.08);
    --sh-md: 0 6px 20px rgba(255, 122, 89, 0.12);
    --sh-lg: 0 12px 40px rgba(255, 122, 89, 0.18);
    --sh-card: 0 4px 16px rgba(45, 55, 72, 0.06);
    
    /* 圆角 */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-full: 999px;
    
    /* 间距 */
    --g-xs: 4px;
    --g-sm: 8px;
    --g-md: 12px;
    --g-lg: 16px;
    --g-xl: 20px;
    --g-2xl: 24px;
    --g-3xl: 32px;
    
    /* 字号 */
    --f-xs: 11px;
    --f-sm: 13px;
    --f-base: 15px;
    --f-md: 16px;
    --f-lg: 18px;
    --f-xl: 20px;
    --f-2xl: 24px;
    --f-3xl: 28px;
    
    /* 尺寸 */
    --nav-h: 52px;
    --tab-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 全局重置 ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: var(--f-base);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    padding: 0;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
    border: none;
    background: none;
}

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

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ---------- App容器 ---------- */
#app {
    min-height: 100vh;
    background: var(--c-bg);
    position: relative;
    padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
}

/* ---------- 顶部导航栏 ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 251, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border-light);
    height: var(--nav-h);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--g-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-left, .nav-right {
    width: 40px;
    display: flex;
    align-items: center;
}

.nav-right {
    justify-content: flex-end;
}

.nav-title {
    font-size: var(--f-md);
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: 0.5px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--c-bg-soft);
}

.icon-btn:active {
    transform: scale(0.92);
    background: var(--c-border);
}

/* ---------- 主内容 ---------- */
.main-content {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--g-lg);
    width: 100%;
}

.page {
    display: none;
    animation: fadeInUp 0.3s ease;
}

.page-active {
    display: block;
}

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

/* ---------- 首页英雄横幅 ---------- */
.hero-banner {
    background: linear-gradient(135deg, var(--c-primary) 0%, #FF9B7A 60%, var(--c-secondary) 100%);
    border-radius: var(--r-xl);
    padding: var(--g-2xl);
    color: white;
    margin-bottom: var(--g-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--sh-md);
}

.hero-banner::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-banner::after {
    content: '';
    position: absolute;
    right: 40px;
    bottom: -60px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: var(--f-xl);
    font-weight: 700;
    margin-bottom: var(--g-sm);
    letter-spacing: 1px;
}

.hero-text p {
    font-size: var(--f-sm);
    opacity: 0.92;
    line-height: 1.7;
}

.hero-text p br {
    display: none;
}

.hero-badge {
    margin-top: var(--g-lg);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: var(--r-full);
    font-size: var(--f-xs);
    position: relative;
    z-index: 1;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #7BFFCC;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(123, 255, 204, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---------- 分类标签 ---------- */
.category-wrap {
    margin: 0 calc(var(--g-lg) * -1) var(--g-xl);
    padding: 0 var(--g-lg);
}

.category-scroll {
    display: flex;
    gap: var(--g-sm);
    overflow-x: auto;
    padding-bottom: var(--g-sm);
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.cat-tag {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: var(--r-full);
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    font-size: var(--f-sm);
    color: var(--c-text-2);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cat-tag:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.cat-tag.active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: white;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 122, 89, 0.3);
}

/* ---------- 区块头 ---------- */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--g-lg);
}

.section-head h2 {
    font-size: var(--f-lg);
    font-weight: 700;
    color: var(--c-text);
}

.section-sub {
    font-size: var(--f-sm);
    color: var(--c-text-3);
}

/* ---------- 盲盒卡片列表 ---------- */
.box-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--g-lg);
    margin-bottom: var(--g-2xl);
}

.box-card {
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    padding: var(--g-xl);
    box-shadow: var(--sh-card);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.box-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    border-color: var(--c-border);
}

.box-card:active {
    transform: translateY(-1px);
}

.box-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--c-primary), var(--c-secondary));
    border-radius: var(--r-lg) 0 0 var(--r-lg);
}

/* 卡片状态条 */
.box-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: var(--f-xs);
    font-weight: 500;
    margin-bottom: var(--g-md);
}

.box-status-hot {
    background: #FFF0EC;
    color: var(--c-primary-dark);
}

.box-status-new {
    background: #E8FAF4;
    color: var(--c-accent-dark);
}

.box-status-full {
    background: #F0F2F5;
    color: var(--c-text-3);
}

.box-status-fast {
    background: #FFF8E6;
    color: #D88A00;
}

/* 类型标签 */
.box-type {
    position: absolute;
    right: var(--g-xl);
    top: var(--g-xl);
    width: 42px;
    height: 42px;
    border-radius: var(--r-md);
    background: var(--c-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* 卡片主体信息 */
.box-info {
    padding-right: 56px;
}

.box-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--g-sm);
}

.box-time-ico {
    color: var(--c-primary);
    display: flex;
    align-items: center;
}

.box-time-text {
    font-size: var(--f-md);
    font-weight: 600;
    color: var(--c-text);
}

.box-date {
    font-size: var(--f-sm);
    color: var(--c-text-3);
    margin-left: 4px;
}

.box-place {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: var(--g-md);
}

.box-place-ico {
    color: var(--c-accent);
    margin-top: 2px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.box-place-text {
    font-size: var(--f-base);
    color: var(--c-text-2);
    line-height: 1.5;
}

/* 底部信息 */
.box-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--g-md);
    margin-top: var(--g-md);
    border-top: 1px dashed var(--c-border);
}

.box-meta {
    display: flex;
    align-items: center;
    gap: var(--g-md);
}

.box-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--f-sm);
    color: var(--c-text-3);
}

.box-meta-item strong {
    color: var(--c-text-2);
    font-weight: 500;
}

.box-progress {
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-bar {
    width: 40px;
    height: 5px;
    background: var(--c-bg-soft);
    border-radius: var(--r-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
    border-radius: var(--r-full);
    transition: width 0.5s ease;
}

.box-note {
    margin-top: var(--g-md);
    padding: var(--g-sm) var(--g-md);
    background: var(--c-bg-soft);
    border-radius: var(--r-sm);
    font-size: var(--f-sm);
    color: var(--c-text-2);
    position: relative;
    padding-left: 28px;
}

.box-note::before {
    content: '💬';
    position: absolute;
    left: var(--g-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.box-note:empty {
    display: none;
}

/* ---------- 加载更多 ---------- */
.load-more {
    text-align: center;
    padding: var(--g-xl) 0 var(--g-2xl);
    color: var(--c-text-3);
    font-size: var(--f-sm);
}

/* ---------- FAB悬浮按钮 ---------- */
.fab-btn {
    position: fixed;
    right: 20px;
    bottom: calc(var(--tab-h) + var(--safe-bottom) + 28px);
    width: 56px;
    height: 56px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255, 122, 89, 0.45);
    z-index: 90;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-btn:hover {
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 8px 28px rgba(255, 122, 89, 0.55);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* ---------- 底部Tab栏 ---------- */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--tab-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--c-border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 95;
    max-width: 720px;
    margin: 0 auto;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 0;
    cursor: pointer;
    color: var(--c-text-3);
    transition: color 0.2s;
    position: relative;
}

.tab-item svg {
    transition: transform 0.2s;
}

.tab-item span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.tab-item:hover {
    color: var(--c-text-2);
}

.tab-item.active {
    color: var(--c-primary);
}

.tab-item.active svg {
    transform: translateY(-2px);
}

.tab-create {
    flex: 0 0 auto;
    width: 64px;
}

.tab-create-ico {
    width: 52px;
    height: 52px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    box-shadow: 0 6px 20px rgba(255, 122, 89, 0.4);
    transition: all 0.2s;
}

.tab-create:hover .tab-create-ico {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(255, 122, 89, 0.5);
}

.tab-create:active .tab-create-ico {
    transform: scale(0.95);
}

/* ---------- 创建盲盒页 ---------- */
.create-tip {
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    padding: var(--g-2xl);
    margin-bottom: var(--g-xl);
    text-align: center;
    box-shadow: var(--sh-sm);
}

.tip-icon {
    font-size: 40px;
    margin-bottom: var(--g-md);
}

.create-tip p {
    color: var(--c-text-2);
    font-size: var(--f-base);
    line-height: 1.7;
}

.create-tip strong {
    color: var(--c-primary);
    font-weight: 600;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: var(--g-xl);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--g-sm);
}

.form-group label {
    font-size: var(--f-sm);
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: 0.3px;
}

.form-group label small {
    font-weight: 400;
    color: var(--c-text-3);
    font-size: var(--f-xs);
}

.form-input {
    background: var(--c-bg-card);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 14px 16px;
    font-size: var(--f-base);
    color: var(--c-text);
    transition: all 0.2s;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    border-color: var(--c-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--c-primary-light);
}

.form-input::placeholder {
    color: var(--c-text-3);
}

.form-row {
    display: flex;
    gap: var(--g-md);
}

.form-group.half {
    flex: 1;
}

/* 类型选择网格 */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--g-sm);
}

.type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--g-md) var(--g-sm);
    background: var(--c-bg-card);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.type-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-item:hover {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
}

.type-item input:checked ~ .type-ico,
.type-item input:checked ~ .type-name {
    /* handled below */
}

.type-item:has(input:checked) {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
    box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.1);
}

.type-ico {
    font-size: 26px;
}

.type-name {
    font-size: var(--f-xs);
    color: var(--c-text-2);
    font-weight: 500;
}

.type-item:has(input:checked) .type-name {
    color: var(--c-primary-dark);
    font-weight: 600;
}

/* 数字选择器 */
.num-picker {
    display: flex;
    align-items: center;
    gap: var(--g-md);
    background: var(--c-bg-card);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 6px;
    width: fit-content;
}

.num-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--c-bg-soft);
    font-size: 20px;
    color: var(--c-text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 300;
}

.num-btn:hover {
    background: var(--c-primary-light);
    color: var(--c-primary);
}

.num-btn:active {
    transform: scale(0.92);
}

.num-input {
    width: 50px;
    text-align: center;
    font-size: var(--f-xl);
    font-weight: 700;
    color: var(--c-text);
    -moz-appearance: textfield;
}

.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.num-tip {
    font-size: var(--f-sm);
    color: var(--c-text-3);
    padding-right: var(--g-md);
}

/* 性别选项 */
.gender-options {
    display: flex;
    gap: var(--g-sm);
}

.gender-item {
    flex: 1;
    padding: 14px 10px;
    background: var(--c-bg-card);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-size: var(--f-sm);
    color: var(--c-text-2);
}

.gender-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gender-item:hover {
    border-color: var(--c-primary);
}

.gender-item:has(input:checked) {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
    color: var(--c-primary-dark);
    font-weight: 600;
}

/* 同意声明 */
.agree-box {
    background: #FFF9F5;
    border: 1px dashed var(--c-primary);
    border-radius: var(--r-md);
    padding: var(--g-md) var(--g-lg);
}

.agree-check {
    display: flex;
    align-items: flex-start;
    gap: var(--g-sm);
    cursor: pointer;
    font-size: var(--f-sm);
    color: var(--c-text-2);
    line-height: 1.6;
}

.agree-check input {
    margin-top: 3px;
    accent-color: var(--c-primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.agree-check strong {
    color: var(--c-primary-dark);
}

/* ---------- 通用按钮 ---------- */
.btn-primary {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    border-radius: var(--r-md);
    padding: 14px 20px;
    font-size: var(--f-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(255, 122, 89, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 122, 89, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 122, 89, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large {
    padding: 16px 28px;
    font-size: var(--f-md);
    border-radius: var(--r-lg);
    width: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--c-text-2);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 14px 24px;
    font-size: var(--f-md);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--c-text-3);
    background: var(--c-bg-soft);
}

/* ---------- 我的盲盒页 ---------- */
.mine-tabs {
    display: flex;
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    padding: 4px;
    margin-bottom: var(--g-xl);
    box-shadow: var(--sh-sm);
}

.mine-tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: var(--f-sm);
    font-weight: 500;
    color: var(--c-text-3);
    border-radius: calc(var(--r-lg) - 4px);
    cursor: pointer;
    transition: all 0.2s;
}

.mine-tab:hover {
    color: var(--c-text-2);
}

.mine-tab.active {
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 122, 89, 0.3);
}

.mine-empty {
    text-align: center;
    padding: var(--g-3xl) var(--g-lg);
    color: var(--c-text-3);
}

.mine-empty-ico {
    font-size: 56px;
    margin-bottom: var(--g-md);
    opacity: 0.5;
}

.mine-empty p {
    font-size: var(--f-sm);
    line-height: 1.7;
}

.mine-empty-btn {
    margin-top: var(--g-xl);
    display: inline-block;
    padding: 10px 24px;
    background: var(--c-primary);
    color: white;
    border-radius: var(--r-full);
    font-size: var(--f-sm);
    font-weight: 500;
    cursor: pointer;
}

/* ---------- 详情页 ---------- */
.detail-card {
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-hero {
    background: linear-gradient(135deg, var(--c-primary) 0%, #FF9B7A 100%);
    border-radius: var(--r-xl);
    padding: var(--g-3xl) var(--g-2xl);
    color: white;
    margin-bottom: var(--g-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--sh-md);
}

.detail-hero::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.detail-hero::after {
    content: '🎁';
    position: absolute;
    right: 30px;
    bottom: 20px;
    font-size: 60px;
    opacity: 0.25;
    filter: grayscale(0.3);
}

.detail-type {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: var(--r-full);
    font-size: var(--f-sm);
    margin-bottom: var(--g-lg);
    backdrop-filter: blur(8px);
}

.detail-hero h2 {
    font-size: var(--f-2xl);
    font-weight: 700;
    margin-bottom: var(--g-md);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.detail-sub {
    font-size: var(--f-sm);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* 详情信息网格 */
.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--g-md);
    margin-bottom: var(--g-xl);
}

.detail-info-item {
    display: flex;
    gap: var(--g-md);
    padding: var(--g-xl);
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
}

.detail-info-ico {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--c-primary-light);
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-info-ico.green {
    background: #E8FAF4;
    color: var(--c-accent-dark);
}

.detail-info-ico.yellow {
    background: #FFF8E6;
    color: #D88A00;
}

.detail-info-ico.blue {
    background: #E8F1FF;
    color: #3A74E0;
}

.detail-info-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info-label {
    font-size: var(--f-xs);
    color: var(--c-text-3);
    margin-bottom: 2px;
}

.detail-info-value {
    font-size: var(--f-md);
    font-weight: 600;
    color: var(--c-text);
}

/* 参与者 */
.detail-section {
    margin-bottom: var(--g-xl);
}

.detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--g-md);
}

.detail-section-head h3 {
    font-size: var(--f-md);
    font-weight: 700;
    color: var(--c-text);
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--g-md);
}

.participant {
    text-align: center;
}

.p-avatar {
    width: 52px;
    height: 52px;
    margin: 0 auto var(--g-xs);
    border-radius: var(--r-full);
    background: linear-gradient(135deg, #FFE5DC, #FFF2CC);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--c-primary-dark);
    font-weight: 600;
}

.p-avatar.male {
    background: linear-gradient(135deg, #DCE8FF, #E8F4FF);
    color: #3A74E0;
}

.p-avatar.empty {
    background: var(--c-bg-soft);
    border: 2px dashed var(--c-border);
    color: var(--c-text-3);
    font-size: 20px;
}

.p-name {
    font-size: var(--f-xs);
    color: var(--c-text-2);
    font-weight: 500;
}

/* 留言 */
.detail-note-card {
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    padding: var(--g-xl);
    margin-bottom: var(--g-xl);
    box-shadow: var(--sh-sm);
    border-left: 4px solid var(--c-secondary);
}

.detail-note-label {
    font-size: var(--f-xs);
    color: var(--c-text-3);
    margin-bottom: var(--g-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-note-text {
    font-size: var(--f-base);
    color: var(--c-text);
    line-height: 1.7;
}

/* 安全提示 */
.safety-tip {
    background: linear-gradient(135deg, #F0FFF8, #FFFBF0);
    border: 1px solid #C8F5E0;
    border-radius: var(--r-lg);
    padding: var(--g-xl);
    margin-bottom: var(--g-3xl);
}

.safety-tip h4 {
    font-size: var(--f-sm);
    color: var(--c-accent-dark);
    margin-bottom: var(--g-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.safety-tip p {
    font-size: var(--f-xs);
    color: var(--c-text-2);
    line-height: 1.7;
}

/* 详情底部按钮 */
.detail-actions {
    position: sticky;
    bottom: calc(var(--tab-h) + var(--safe-bottom) + var(--g-lg));
    display: flex;
    gap: var(--g-md);
    padding-top: var(--g-md);
    background: linear-gradient(to top, var(--c-bg) 60%, transparent);
}

.btn-secondary {
    flex: 0 0 auto;
    background: white;
    color: var(--c-text-2);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 16px 20px;
    font-size: var(--f-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--c-text-3);
    background: var(--c-bg-soft);
}

.btn-join {
    flex: 1;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: white;
    border-radius: var(--r-lg);
    padding: 16px 24px;
    font-size: var(--f-md);
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255, 122, 89, 0.35);
    transition: all 0.2s;
}

.btn-join:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(255, 122, 89, 0.45);
}

.btn-join:active {
    transform: translateY(0);
}

.btn-joined {
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
    box-shadow: 0 6px 20px rgba(6, 214, 160, 0.35);
    cursor: default;
}

.btn-full {
    background: var(--c-text-3);
    box-shadow: none;
    cursor: not-allowed;
}

/* ---------- 个人中心页 ---------- */
.profile-header {
    text-align: center;
    padding: var(--g-2xl) var(--g-lg) var(--g-xl);
    margin-bottom: var(--g-xl);
    background: linear-gradient(180deg, var(--c-primary-light) 0%, var(--c-bg) 100%);
    border-radius: var(--r-xl);
}

.profile-avatar {
    width: 84px;
    height: 84px;
    margin: 0 auto var(--g-md);
    border-radius: var(--r-full);
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(255, 122, 89, 0.3);
}

.profile-name {
    font-size: var(--f-xl);
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 4px;
}

.profile-tip {
    font-size: var(--f-xs);
    color: var(--c-text-3);
    letter-spacing: 0.5px;
}

/* 数据统计 */
.profile-stats {
    display: flex;
    align-items: center;
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    padding: var(--g-xl);
    margin-bottom: var(--g-xl);
    box-shadow: var(--sh-sm);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-num {
    font-size: var(--f-2xl);
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: var(--f-xs);
    color: var(--c-text-3);
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--c-border);
}

/* 设置项 */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: var(--g-lg);
}

.settings-group {
    background: var(--c-bg-card);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px var(--g-lg);
    transition: background 0.2s;
    cursor: pointer;
    border-bottom: 1px solid var(--c-border-light);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: var(--c-bg-soft);
}

.s-left {
    display: flex;
    align-items: center;
    gap: var(--g-md);
    font-size: var(--f-base);
    color: var(--c-text);
}

.s-ico {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--c-bg-soft);
    border-radius: var(--r-sm);
}

.s-right {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--c-text-3);
    font-size: var(--f-sm);
}

.s-right.arrow-right {
    cursor: pointer;
}

.s-value {
    color: var(--c-text-3);
    font-size: var(--f-sm);
}

.s-select {
    background: transparent;
    color: var(--c-text-2);
    font-size: var(--f-sm);
    padding: 4px 8px;
    border-radius: var(--r-sm);
    direction: rtl;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--c-border);
    border-radius: var(--r-full);
    transition: all 0.3s;
    cursor: pointer;
}

.slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .slider {
    background: var(--c-primary);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

/* ---------- 弹窗 ---------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(45, 55, 72, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.modal-mask.modal-show {
    display: flex;
    opacity: 1;
}

.modal-mask.modal-center {
    align-items: center;
    padding: var(--g-xl);
}

/* 底部弹出层 */
.modal-sheet {
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    background: var(--c-bg);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: var(--safe-bottom);
}

.modal-mask.modal-show .modal-sheet {
    transform: translateY(0);
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--g-lg) var(--g-xl);
    border-bottom: 1px solid var(--c-border-light);
}

.sheet-header h3 {
    font-size: var(--f-lg);
    font-weight: 700;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--g-xl);
}

.sheet-footer {
    display: flex;
    gap: var(--g-md);
    padding: var(--g-lg) var(--g-xl);
    border-top: 1px solid var(--c-border-light);
}

.sheet-footer .btn-outline {
    flex: 1;
}

.sheet-footer .btn-primary {
    flex: 2;
}

/* 筛选区 */
.filter-section {
    margin-bottom: var(--g-xl);
}

.filter-section h4 {
    font-size: var(--f-sm);
    color: var(--c-text-2);
    font-weight: 600;
    margin-bottom: var(--g-md);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--g-sm);
}

.chip {
    padding: 8px 18px;
    background: var(--c-bg-card);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-full);
    font-size: var(--f-sm);
    color: var(--c-text-2);
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    border-color: var(--c-primary);
}

.chip.active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: white;
    font-weight: 500;
}

/* 中间弹窗 */
.modal-center {
    align-items: center;
}

.modal-join {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: var(--r-xl);
    padding: var(--g-3xl) var(--g-2xl);
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-mask.modal-show .modal-join {
    transform: scale(1);
    opacity: 1;
}

.join-ico {
    font-size: 56px;
    margin-bottom: var(--g-md);
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.join-title {
    font-size: var(--f-xl);
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: var(--g-sm);
}

.join-desc {
    font-size: var(--f-sm);
    color: var(--c-text-2);
    line-height: 1.7;
    margin-bottom: var(--g-xl);
}

.join-info {
    background: var(--c-bg-soft);
    border-radius: var(--r-lg);
    padding: var(--g-lg);
    margin-bottom: var(--g-xl);
    text-align: left;
}

.join-info-row {
    display: flex;
    align-items: flex-start;
    gap: var(--g-sm);
    margin-bottom: var(--g-sm);
    font-size: var(--f-sm);
    color: var(--c-text-2);
}

.join-info-row:last-child {
    margin-bottom: 0;
}

.join-info-row strong {
    color: var(--c-text);
    font-weight: 600;
}

.join-info-row svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.join-tip {
    margin-top: var(--g-md);
    font-size: var(--f-xs);
    color: var(--c-text-3);
    line-height: 1.5;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(45, 55, 72, 0.92);
    color: white;
    padding: 12px 24px;
    border-radius: var(--r-md);
    font-size: var(--f-sm);
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s;
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(8px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* =========================================
   响应式 - 平板及桌面端 (>= 640px)
   ========================================= */
@media (min-width: 640px) {
    :root {
        --nav-h: 56px;
    }

    .hero-text h1 {
        font-size: var(--f-2xl);
    }

    .hero-text p {
        font-size: var(--f-base);
    }

    .hero-text p br {
        display: inline;
    }

    .box-list {
        grid-template-columns: 1fr 1fr;
        gap: var(--g-xl);
    }

    .type-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .participants-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .detail-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fab-btn {
        right: calc(50% - 360px + 28px);
    }
}

/* =========================================
   响应式 - 桌面端 (>= 900px)
   ========================================= */
@media (min-width: 900px) {
    body {
        background: linear-gradient(180deg, #FFF5EE 0%, #FFFBF6 300px);
    }

    #app {
        background: transparent;
    }

    .main-content {
        max-width: 880px;
        padding: var(--g-xl);
    }

    .navbar {
        background: rgba(255, 255, 255, 0.85);
        border-bottom: 1px solid rgba(238, 230, 216, 0.6);
    }

    .nav-container {
        max-width: 880px;
    }

    .box-list {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--g-xl);
    }

    .hero-banner {
        padding: var(--g-3xl);
    }

    .hero-text h1 {
        font-size: var(--f-3xl);
        margin-bottom: var(--g-md);
    }

    .tabbar {
        max-width: 880px;
        height: calc(68px + var(--safe-bottom));
        border-radius: var(--r-xl) var(--r-xl 0 0);
        box-shadow: 0 -8px 30px rgba(255, 122, 89, 0.08);
        border: 1px solid var(--c-border-light);
        border-bottom: none;
    }

    .tab-item span {
        font-size: 11px;
    }

    .fab-btn {
        right: calc(50% - 440px + 32px);
        width: 62px;
        height: 62px;
        bottom: calc(var(--tab-h) + var(--safe-bottom) + 40px);
    }

    .detail-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 桌面端页面卡片效果 */
    .page {
        animation: none;
    }

    #page-create .create-form {
        max-width: 560px;
        margin: 0 auto;
    }

    #page-profile {
        max-width: 560px;
        margin: 0 auto;
    }

    .type-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   响应式 - 超宽桌面 (>= 1200px)
   ========================================= */
@media (min-width: 1200px) {
    .main-content {
        max-width: 960px;
    }

    .nav-container {
        max-width: 960px;
    }

    .tabbar {
        max-width: 960px;
    }

    .box-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .fab-btn {
        right: calc(50% - 480px + 32px);
    }
}

/* ---------- 深色模式支持(可选) ---------- */
@media (prefers-color-scheme: dark) {
    /* 暂时不启用深色模式，保持温暖的浅色风格更适合社交场景 */
}

/* ---------- 无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- 支付方式 ---------- */
.pay-methods {
    display: flex;
    flex-direction: column;
    gap: var(--g-sm);
    margin-top: var(--g-lg);
    text-align: left;
}

.pay-method {
    display: block;
    cursor: pointer;
}

.pay-method input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pm-body {
    display: flex;
    align-items: center;
    gap: var(--g-md);
    padding: 14px var(--g-lg);
    background: var(--c-bg-soft);
    border-radius: var(--r-md);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.pm-body:hover {
    background: #FFF0EC;
}

.pay-method input:checked ~ .pm-body {
    border-color: var(--c-primary);
    background: var(--c-primary-light);
}

.pm-ico {
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--r-sm);
    flex-shrink: 0;
}

.pm-name {
    flex: 1;
    font-weight: 600;
    color: var(--c-text);
    font-size: var(--f-base);
}

.pm-right {
    font-size: var(--f-xs);
    color: var(--c-text-3);
}

.pm-right small {
    font-size: var(--f-xs);
    color: var(--c-text-3);
}

.pm-right strong {
    color: var(--c-primary-dark);
    font-size: var(--f-sm);
}

.pay-method:not(:has(input:checked)) ~ .pay-method {
    /* reserved */
}

/* ---------- 选中样式 ---------- */
::selection {
    background: var(--c-primary-light);
    color: var(--c-primary-dark);
}

/* ---------- 滚动条美化(桌面端) ---------- */
@media (min-width: 900px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: rgba(255, 122, 89, 0.25);
        border-radius: var(--r-full);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 122, 89, 0.45);
    }
}

/* =========================================
   v1.1 补丁样式：定位/配置分区/个人中心
   ========================================= */
.form-input-muted {
    background: #F7FAFC !important;
    color: #4A5568 !important;
    border-color: #E2E8F0 !important;
}
.addr-coord {
    font-size: 11px;
    color: #718096;
    padding: 2px 2px;
}
.addr-coord span {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #FF7A59;
    font-weight: 600;
    letter-spacing: .2px;
}
.fg-label-link {
    float: right;
    font-weight: 500;
    color: #FF7A59;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}
.fg-label-link:hover { color: #F2603F; }

/* 个人中心：settings-group 之间增加间距（默认已有，此处保证卡片分隔更明显） */
.settings-group + .settings-group { margin-top: 12px; }
