/* ================================================================
   缘梦仙城 (YMCity) - 核心样式表
   风格: 国风修仙 x 玻璃拟物化 (Glassmorphism)
================================================================ */

:root {
    /* 色彩系统 - 背景深邃 (改为国风浅色月白/云灰) */
    --bg-base: #F5F7FA;
    --bg-surface: #FFFFFF;

    /* 色彩系统 - 玻璃拟物基底 (改为浅色毛玻璃) */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-highlight: rgba(255, 255, 255, 0.9);

    /* 品牌强化色 (国风提取) */
    --color-gold: #CBA365;
    /* 沉香金 / 秋波黄 */
    --color-gold-light: #EBDCB9;
    --color-jade: #45D0B6;
    /* 翠微 / 天青 */
    --color-jade-dark: #1F8A7D;
    --color-purple: #9D72FF;
    /* 黛青 / 紫薇 */
    --color-danger: #FA5C77;
    /* 丹砂 / 绯红 */

    /* 文本色 (水墨黑为主) */
    --text-primary: #1E293B;
    /* 浓墨 */
    --text-secondary: #334155;
    /* 次级文本 */
    --text-muted: #4B5D73;
    /* 淡墨 / 烟灰 */
    --text-inverse: #FFFFFF;
    /* 留白 */

    /* 字体 */
    --font-serif: 'Noto Serif SC', serif;
    --font-sans: system-ui, -apple-system, sans-serif;

    /* 阴影与特效 */
    --shadow-glow: 0 4px 20px rgba(203, 163, 101, 0.15);
    --shadow-glow-strong: 0 8px 30px rgba(203, 163, 101, 0.25);
    --shadow-sm: 0 4px 15px rgba(15, 23, 42, 0.08);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    --border-radius-lg: 20px;
    --border-radius-md: 16px;
    --border-radius-sm: 10px;

    /* 顶级弹簧阻尼曲线 (Spring Physics) */
    --spring-bouncy: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* 强回弹 (适合图标放大、卡片浮动) */
    --spring-gentle: cubic-bezier(0.34, 1.56, 0.64, 1);
    /* 柔和回弹 (适合模态框、大面积位移) */
    --spring-snappy: cubic-bezier(0.4, 0, 0.2, 1);
    /* 迅捷阻尼 (Material 经典，适合按钮点击、透明度过渡) */

    /* 渐变 */
    --gradient-gold: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    --gradient-jade: linear-gradient(135deg, #7AECD8, var(--color-jade));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    /* 浅色云雾修仙背景纹理叠层 */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(180, 220, 235, 0.5) 0%, transparent 60%),
        radial-gradient(circle at 85% 30%, rgba(235, 225, 210, 0.5) 0%, transparent 60%);
    background-attachment: fixed;
    animation: bgFlow 20s ease-in-out infinite alternate;
}

@keyframes bgFlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 100%;
    }
}

/* 背景粒子画布 */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

h1,
h2,
h3,
h4,
.logo-text,
.dao-name {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ================================================================
   玻璃拟物化通用类
================================================================ */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--spring-gentle);
    animation: springUp 0.8s var(--spring-gentle) backwards;
}

@keyframes springUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.glass-panel:hover {
    box-shadow: var(--shadow-glass), var(--shadow-glow);
    transform: translateY(-2px);
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    z-index: 10;
}

.blur-heavy {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* 实用工具类 */
.gold-gradient {
    background: var(--gradient-gold);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 2rem;
}

.gold {
    color: var(--color-gold);
}

.purple {
    color: var(--color-purple);
}

.user-profile-link {
    color: inherit;
    text-decoration: none;
}

.user-profile-link:hover {
    color: var(--color-gold);
    text-decoration: underline;
}

.green {
    color: var(--color-jade);
}

.gold-text {
    color: var(--color-gold);
    font-weight: bold;
}

/* ================================================================
   导航栏 (Navbar)
================================================================ */
.navbar {
    position: sticky;
    top: 1rem;
    z-index: 100;
    margin: 0 auto 2rem;
    max-width: 1400px;
    width: calc(100% - 4rem);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 2rem;
    overflow: visible;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
    transition: all 0.3s ease;
}

/* 导航栏不参与 glass-panel 的位移悬浮，避免 sticky 抖动 */
.navbar:hover {
    transform: none;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
    z-index: 10;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.logo-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-gold);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.4s var(--spring-bouncy), color 0.2s ease;
}

.btn-icon:hover {
    color: var(--color-gold);
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--color-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    transition: background 0.3s ease, transform 0.4s var(--spring-snappy);
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.02);
}

.avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-gold);
    background: rgba(255, 255, 255, 0.5);
}

.user-name {
    font-family: var(--font-serif);
    font-size: 0.95rem;
}

/* ================================================================
   主布局
================================================================ */
.main-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
}

/* Staggered load animation */
.main-container>* {
    animation: springUp 0.8s var(--spring-gentle) backwards;
}

.main-container>*:nth-child(1) {
    animation-delay: 0.1s;
}

.main-container>*:nth-child(2) {
    animation-delay: 0.2s;
}

.main-container.single-column-layout {
    display: block;
}

/* ================================================================
   左侧：修行面板
================================================================ */
.profile-card {
    padding: 2rem;
    text-align: center;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
}

.avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    position: relative;
    z-index: 2;
    background: var(--bg-surface);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5), 0 4px 10px rgba(0, 0, 0, 0.05);
    object-fit: cover;
}

.realm-aura {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, rgba(203, 163, 101, 0.1), var(--color-gold), rgba(203, 163, 101, 0.1), transparent);
    animation: rotateAura 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 1;
    filter: blur(10px);
    opacity: 0.8;
}

@keyframes rotateAura {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.05);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.title-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
    background: rgba(180, 142, 75, 0.1);
}

.dao-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.level {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.bio {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
}

/* 进度条 */
.cultivation-progress {
    text-align: left;
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 4px;
    position: relative;
    z-index: 2;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    z-index: 3;
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* 资产 */
.assets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.asset-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.5s var(--spring-bouncy), box-shadow 0.5s var(--spring-gentle);
    text-align: center;
}

.asset-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06), 0 0 15px rgba(203, 163, 101, 0.1);
}

.asset-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.asset-icon.stone {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.asset-icon.point {
    color: var(--color-jade);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.asset-data {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.asset-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.asset-value {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: monospace;
}

/* 技能标签 */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    color: var(--text-muted);
}

.tag.micro {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
}

/* 侧边任务列表 */
.panel-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.task-list-mini {
    list-style: none;
    padding: 0 1.5rem 1.5rem;
}

.task-list-mini li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.task-list-mini li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.task-circle {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.task-circle.danger {
    background: var(--color-danger);
    box-shadow: 0 0 8px var(--color-danger);
}

.task-circle.warning {
    background: var(--color-gold);
    box-shadow: 0 0 8px var(--color-gold);
}

.task-circle.success {
    background: var(--color-jade);
    box-shadow: 0 0 8px var(--color-jade);
}

.task-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-sans);
}

.task-info span {
    font-size: 0.75rem;
    color: var(--color-gold);
}

/* ================================================================
   右侧区域：传送门 & 榜单
================================================================ */
.portals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.portals-grid .portal-card {
    animation: springUp 0.8s var(--spring-bouncy) backwards;
}

.portals-grid .portal-card:nth-child(1) {
    animation-delay: 0.15s;
}

.portals-grid .portal-card:nth-child(2) {
    animation-delay: 0.25s;
}

.portals-grid .portal-card:nth-child(3) {
    animation-delay: 0.35s;
}

.portals-grid .portal-card:nth-child(4) {
    animation-delay: 0.45s;
}

.portals-grid .portal-card:nth-child(5) {
    animation-delay: 0.55s;
}

.portals-grid.portal-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    min-height: 200px;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-lg);
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.portal-card.interactive:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(203, 163, 101, 0.2);
    background: rgba(255, 255, 255, 0.65);
}

.portal-icon {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    color: var(--color-gold);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 4px 10px rgba(203, 163, 101, 0.3);
}

.portal-card:hover .portal-icon {
    transform: scale(1.15) translateY(-5px);
}

.portal-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.portal-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.portal-glow {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 30px;
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s ease, bottom 0.4s ease;
    z-index: -1;
}

.portal-card:hover .portal-glow {
    opacity: 0.8;
    bottom: -20px;
}

.type-trial .portal-glow {
    background: var(--color-jade);
}

.type-competition .portal-glow {
    background: var(--color-gold);
}

.type-auction .portal-glow {
    background: var(--color-purple);
}

.type-hidden .portal-glow {
    background: var(--color-danger);
}

.type-taskhub .portal-glow {
    background: var(--color-jade);
}

.type-market .portal-glow {
    background: var(--color-gold);
}

.type-facilities .portal-glow {
    background: var(--color-purple);
}

/* 榜单区域 */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--color-gold);
}

.leaderboard-col {
    padding: 1.5rem;
}

.daily-checkin-panel {
    padding: 1.1rem 1.2rem 1.25rem;
}

.daily-checkin-panel .board-header {
    margin-bottom: 0.9rem;
    padding-bottom: 0.7rem;
}

.daily-checkin-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.95rem;
}

.daily-checkin-panel .btn {
    width: 100%;
}

.board-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
}

.board-icon {
    font-size: 1.5rem;
}

.board-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.board-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-insight-grid {
    align-items: stretch;
}

.home-insight-grid .span-full {
    grid-column: 1 / -1;
}

.home-placeholder-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-placeholder-content p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

.home-placeholder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-placeholder-actions .btn {
    min-width: 170px;
}

.home-activity-feed {
    min-height: 220px;
}

.home-activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.home-activity-item {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.62);
    transition: transform 0.4s var(--spring-gentle), box-shadow 0.4s ease;
}

.home-activity-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.home-activity-item.muted {
    color: var(--text-muted);
    text-align: center;
}

.home-activity-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.home-activity-title {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 600;
}

.home-activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.home-activity-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.board-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: background 0.2s;
}

.board-item:hover {
    background: rgba(255, 255, 255, 0.9);
}

.rank-num {
    font-size: 1.2rem;
    font-weight: 900;
    width: 30px;
    color: var(--text-muted);
    font-style: italic;
}

.rank-1 .rank-num {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 .rank-num {
    color: #C0C0C0;
}

.rank-3 .rank-num {
    color: #CD7F32;
}

.avatar-tiny {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 1rem;
}

.item-name {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name h4 {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    font-family: var(--font-sans);
}

.item-name span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.score {
    font-family: monospace;
    font-size: 1.1rem;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.board-list.compact .board-item {
    padding: 0.5rem 0.75rem;
}

.board-list.compact .item-name {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.board-list.compact .item-name h4 {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        margin: 1.25rem auto;
        padding: 0 1rem;
    }

    .portals-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }

    .navbar {
        top: 0.5rem;
        width: calc(100% - 1.5rem);
        max-width: none;
        margin: 0 auto 1rem;
        padding: 0.6rem 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo-subtext {
        display: none;
    }

    .hamburger-btn {
        display: flex !important;
        order: 3;
        margin-left: 0.25rem;
    }

    .nav-actions {
        order: 2;
        margin-left: auto;
        gap: 0.35rem;
    }

    .top-balance,
    .notif-bell,
    .user-name {
        display: none !important;
    }

    .user-menu {
        gap: 0.35rem;
        padding: 0;
    }

    .avatar-small {
        width: 32px;
        height: 32px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.45rem);
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.9);
        border-radius: 12px;
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
        padding: 0.35rem 0;
        z-index: 1100;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links li a {
        padding: 0.78rem 1rem;
        border-radius: 0;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .portals-grid {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .main-container {
        padding: 0 0.75rem;
    }
}

/* 汉堡菜单按钮 (默认桌面端隐藏) */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: background 0.2s;
}

.hamburger-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger-btn.active i::before {
    content: "\f00d";
    /* fa-xmark */
}

/* ================================================================
   场地导航专属样式与组件 (Facilities, Modal, Toast)
================================================================ */

/* 顶部余额挂件 */
.top-balance {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-text {
    animation: textGlow 1s ease-out;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 20px var(--color-gold);
        color: var(--text-primary);
    }

    100% {
        text-shadow: none;
        color: inherit;
    }
}

/* 页面排版 */
.facilities-layout {
    display: block;
    max-width: 1200px;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.zone-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.zone-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.facility-card {
    cursor: pointer;
}

/* 费用角标 */
.cost-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cost-badge.free {
    color: var(--color-jade);
    border-color: rgba(16, 185, 129, 0.3);
}

.cost-badge.cost {
    color: var(--color-gold);
    border-color: rgba(212, 175, 55, 0.3);
}

.cost-badge.warning {
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

/* 莫态框 (Modal) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-container {
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-lg);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px) scale(0.95);
    transition: all 0.5s var(--spring-gentle);
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-danger);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-icon {
    font-size: 2.5rem;
    color: var(--color-gold);
}

.modal-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.cost-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 0, 0, 0.2);
}

.cost-amount {
    font-size: 1.2rem;
    font-family: monospace;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 按钮通用 */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: bold;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--text-primary);
    border: none;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    filter: brightness(1.1);
}

.btn:disabled,
.btn-primary:disabled {
    background: #E5EAF1;
    border: 1px solid rgba(100, 116, 139, 0.35);
    color: var(--text-secondary);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
    filter: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

/* ================================================================
   全局表单通用类
================================================================ */
.input-field {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
    width: 100%;
}

.input-field:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 8px rgba(180, 142, 75, 0.2);
    background: #FFFFFF;
}

.input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

select.input-field {
    cursor: pointer;
    appearance: auto;
}

select.input-field option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

textarea.input-field {
    resize: vertical;
    font-family: var(--font-sans);
}

/* Toast 提示框 */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.toast.success i {
    color: var(--color-jade);
    font-size: 1.2rem;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.error i {
    color: var(--color-danger);
    font-size: 1.2rem;
}

.toast.error .toast-content {
    color: #fca5a5;
}

/* ================================================================
   通知铃铛下拉面板
================================================================ */
.notif-bell {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    border-radius: var(--border-radius-md);
    padding: 0;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: bold;
    font-size: 0.9rem;
}

.notif-dropdown-header .notif-mark-all {
    font-size: 0.75rem;
    color: var(--color-blue, #3b82f6);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.notif-dropdown-header .notif-mark-all:hover {
    background: rgba(59, 130, 246, 0.1);
}

.notif-dropdown-body {
    padding: 0;
}

.notif-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: default;
    transition: background 0.2s;
}

.notif-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.notif-item.unread {
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--color-gold);
}

.notif-item-title {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.notif-item-content {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    opacity: 0.7;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ================================================================
   确认弹窗 (替换原生 confirm)
================================================================ */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.confirm-box {
    width: 90%;
    max-width: 380px;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.confirm-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.confirm-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 100px;
}

/* ================================================================
   通用弹窗 (Modal)
=============================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: var(--bg-panel);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .modal-overlay,
    .modal {
        align-items: flex-start;
        padding: max(0.75rem, env(safe-area-inset-top)) 0.6rem max(0.75rem, env(safe-area-inset-bottom));
    }

    .modal-container,
    .modal-content {
        width: 100%;
        max-height: calc(100dvh - 1.2rem);
        border-radius: 14px;
    }
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: 1.5rem;
}
