        /* 字体引入 */
        @font-face {
            font-family: 'Knewave';
            src: url('../../font/Knewave-Regular.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap; /* Lighthouse优化：避免字体阻塞渲染 */
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* 全局禁用文本选择和复制（输入框除外） */
        * {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        /* 允许输入框复制和选择 */
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="number"],
        input[type="tel"],
        input[type="url"],
        input[type="search"],
        textarea {
            -webkit-user-select: text;
            -moz-user-select: text;
            -ms-user-select: text;
            user-select: text;
        }

        /* 移除移动端按钮的默认按压高亮效果 */
        button,
        a,
        .btn,
        [role="button"],
        input[type="button"],
        input[type="submit"] {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
        }
        
        html {
            overflow-x: hidden; /* 禁止横向滚动 */
            overflow-y: scroll; /* 允许上下滚动，始终显示滚动条位置 */
            width: 100%;
            height: 100%;
            /* 🚀 移动端优化：禁止横向滚动和过度滚动 */
            overscroll-behavior-x: none;
            overscroll-behavior-y: auto; /* 允许竖向过度滚动（下拉刷新） */
        }

        /* Z-Index层级规范和字号系统 */
        :root {
            --z-background: 0;
            --z-content: 1;
            --z-overlay: 10;
            --z-floating: 20;
            --z-modal: 30;
            --z-tooltip: 40;
            
            /* 字号系统 */
            --font-size-xl: 3rem;      /* 超大：头像、重要数字 */
            --font-size-lg: 1.2rem;    /* 大：主要文字、用户名 */
            --font-size-md: 1rem;      /* 标准：标题、重要信息 */
            --font-size-sm: 0.9rem;    /* 中等：次要信息 */
            --font-size-xs: 0.8rem;    /* 小：辅助信息 */
            --font-size-xxs: 0.7rem;   /* 微小：细节信息 */
        }

        body {
            font-family: 'Courier New', monospace;
            /* 🚀 移动端视口高度优化：使用动态计算的vh，支持地址栏收起 */
            height: 100vh;
            height: calc(var(--vh, 1vh) * 100); /* 动态视口高度 */
            min-height: 100vh;
            min-height: -webkit-fill-available; /* iOS Safari 兼容 */
            overflow-x: hidden; /* 禁止横向滚动 */
            overflow-y: auto; /* 允许上下滚动 */
            position: relative;
            width: 100%;
            max-width: 100vw; /* 🚀 强制最大宽度为视口宽度 */
            /* 🚀 移动端滚动优化 */
            -webkit-overflow-scrolling: touch;
            -webkit-text-size-adjust: 100%;
            overscroll-behavior-x: none; /* 禁止横向过度滚动 */
            touch-action: pan-y; /* 🚀 只允许竖向触摸滚动 */
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* 默认浅色主题 */
        body,
        body:not(.dark-theme) {
            background: #fff;
            color: #000;
        }

        /* 暗色主题 */
        body.dark-theme {
            background: #000;
            color: #fff;
        }

        /* 系统自动暗色主题 */
        @media (prefers-color-scheme: dark) {
            body:not(.force-light) {
                background: #000;
                color: #fff;
            }
        }
        
        /* 背景囚犯区域 */
        .prison-background {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            max-width: 100vw; /* 🚀 防止超出视口宽度 */
            /* 🚀 动态视口高度，支持地址栏收起 */
            height: 100%;
            height: 100vh;
            height: calc(var(--vh, 1vh) * 100); /* 动态视口高度 */
            height: -webkit-fill-available; /* iOS Safari 兼容 */
            z-index: var(--z-content);
            display: flex;
            flex-direction: column; /* 纵向布局：横幅 + 卡片网格 */
            overflow-x: hidden; /* 🚀 禁止横向滚动 */
        }

        /* ========== 监狱网格布局 - 在prisoner-cards.css中定义 ========== */

/* ==================== 全局Loading（复用现有样式） ==================== */
.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.global-loading-overlay.show {
    opacity: 1;
}

/* 复用room modal的loading spinner样式 */
.global-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: global-spin 0.8s linear infinite;
}

@keyframes global-spin {
    to { transform: rotate(360deg); }
}

/* 暗色主题下的loading */
@media (prefers-color-scheme: dark) {
    .global-loading-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .global-loading-spinner {
        border: 3px solid rgba(255, 255, 255, 0.1);
        border-top-color: #fff;
    }
}
