/* ========================================
   新粗犷主义设计系统 - 色彩变量
   ======================================== */
:root {
    /* 主色调 - 活力橙 */
    --primary-color: #FF6B35;
    --primary-hover: #E85D2A;
    --primary-light: #FFF0EB;
    
    /* 次要色 - 深邃黑 */
    --secondary-color: #1A1A1A;
    --secondary-hover: #000000;
    
    /* 强调色 - 柠檬黄 */
    --accent-color: #FFD23F;
    --accent-hover: #FFC107;
    
    /* 中性色 */
    --bg-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --border-color: #2C2C2C;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-light: #888888;
    
    /* 功能色 */
    --success-color: #27AE60;
    --success-bg: #E8F8F0;
    --warning-color: #F39C12;
    --warning-bg: #FEF5E7;
    --error-color: #E74C3C;
    --error-bg: #FDEDEC;
    --info-color: #3498DB;
    --info-bg: #EBF5FB;
    
    /* 阴影 */
    --shadow-sm: 2px 2px 0px var(--border-color);
    --shadow-md: 4px 4px 0px var(--border-color);
    --shadow-lg: 6px 6px 0px var(--border-color);
    --shadow-xl: 8px 8px 0px var(--border-color);
    
    /* 边框 */
    --border-width: 2px;
    --border-radius: 0px;
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
}

/* ========================================
   完整按压动画系统 - 关键帧
   ======================================== */
/* 快速点击动画（完整按下 - 回弹） */
@keyframes quickPress {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(0.95) translate(2px, 2px);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* 长按保持动画 */
@keyframes pressHold {
    0% {
        transform: scale(0.95) translate(2px, 2px);
    }
    100% {
        transform: scale(0.95) translate(2px, 2px);
    }
}

/* 长按回弹动画 */
@keyframes pressRelease {
    0% {
        transform: scale(0.95) translate(2px, 2px);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

/* 电脑端悬停按压动画 */
@keyframes hoverPress {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.02) translate(-3px, -3px);
    }
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* 移动端 body 布局优化 */
@media (max-width: 768px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        min-height: 100vh;
        background-size: 30px 30px;
        position: relative;
    }
    
    .container {
        width: 95%;
        max-width: 500px;
        margin: 0;
    }
}

/* 滚动条 - 新粗犷主义风格 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border: var(--border-width) solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border: var(--border-width) solid var(--border-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   全局字体大小统一
   ======================================== */
body, button, input, select, textarea, label, div, span, p, a, td, th, option {
    font-size: 14px;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 210, 63, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(66, 153, 225, 0.08) 0%, transparent 50%);
    background-size: 100% 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* 背景动画层 - 高性能浮动圆圈 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(255, 107, 53, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(66, 153, 225, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 50% 80%, rgba(255, 210, 63, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 20% 20%, rgba(39, 174, 96, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(243, 156, 18, 0.05) 0%, transparent 50%);
    background-position: 
        0% 0%,
        100% 100%,
        50% 50%,
        10% 90%,
        90% 10%;
    background-size: 70% 70%, 60% 60%, 65% 65%, 50% 50%, 45% 45%;
    background-repeat: no-repeat;
    animation: bgFloat 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(45deg, 
            rgba(255, 107, 53, 0.04) 0px,
            rgba(255, 107, 53, 0.04) 1px,
            transparent 1px,
            transparent 40px),
        repeating-linear-gradient(-45deg,
            rgba(66, 153, 225, 0.04) 0px,
            rgba(66, 153, 225, 0.04) 1px,
            transparent 1px,
            transparent 40px);
    background-size: 200% 200%;
    animation: bgDiagonal 30s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* 新增：彩色色块层 - 更明显的动画 */
body > .bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

body > .bg-shapes::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 210, 63, 0.08) 100%);
    border: 3px solid rgba(255, 107, 53, 0.15);
    animation: shapeFloat1 20s ease-in-out infinite;
}

body > .bg-shapes::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -15%;
    width: 55%;
    height: 55%;
    background: linear-gradient(225deg, rgba(66, 153, 225, 0.1) 0%, rgba(39, 174, 96, 0.08) 100%);
    border: 3px solid rgba(66, 153, 225, 0.15);
    animation: shapeFloat2 22s ease-in-out infinite;
}

@keyframes shapeFloat1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(-5%, 8%) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(3%, -5%) rotate(240deg) scale(0.95);
    }
}

@keyframes shapeFloat2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(8%, -5%) rotate(-120deg) scale(1.05);
    }
    66% {
        transform: translate(-3%, 6%) rotate(-240deg) scale(0.98);
    }
}

@keyframes bgFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(2%, 3%) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translate(-1%, 2%) rotate(-3deg) scale(0.98);
    }
    75% {
        transform: translate(3%, -2%) rotate(7deg) scale(1.02);
    }
}

@keyframes bgDiagonal {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 100%;
    }
}

.container {
    background: var(--surface-color);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-xl);
    max-width: 95vw;
    width: 85%;
    max-height: 90vh;
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: containerSlideIn 0.4s ease-out;
    position: relative;
    z-index: 1;
}

/* 容器微妙浮动效果 - 仅电脑端 */
@media (min-width: 769px) {
    .container:hover {
        box-shadow: 10px 10px 0px var(--border-color);
    }
}

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

@media (max-width: 1024px) {
    .container {
        width: 90%;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
    }
}

/* ========================================
   标题样式 - 新粗犷主义
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 {
    font-size: 32px;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-md);
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-color);
}

h2 {
    font-size: 26px;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
}

/* ========================================
   按钮样式 - 新粗犷主义
   ======================================== */
button {
    white-space: nowrap;
    background: var(--primary-color);
    color: white;
    border: var(--border-width) solid var(--border-color);
    padding: 0 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    min-height: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* 按钮悬停效果 - 电脑端 */
@media (hover: hover) {
    button:hover {
        background: var(--primary-hover);
        transform: translate(-2px, -2px);
        box-shadow: 6px 6px 0px var(--border-color);
    }
    
    button:hover::before {
        opacity: 0.1;
    }
}

/* 按钮点击动画 - 快速点击 */
button:active {
    animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

/* 移动端按钮触摸反馈 */
@media (hover: none) {
    button:active {
        animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 3px 3px 0px var(--border-color);
    }
}

/* 按钮光泽效果 */
button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button.secondary-btn {
    background: var(--secondary-color);
}

button.secondary-btn:hover {
    background: var(--secondary-hover);
}

button.back-btn {
    background: var(--text-light);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    min-width: 150px;
    padding: 14px 30px;
    font-size: 15px;
}

button.back-btn:hover {
    background: var(--text-secondary);
}

/* 登录按钮样式优化 */
#loginForm button {
    margin-top: var(--spacing-md);
    padding: 14px 40px;
    font-size: 18px;
    width: 100%;
    display: block;
}

/* 退出登录按钮 - 电脑端 */
@media (min-width: 769px) {
    /* 电脑端消息提示框高度统一 */
    .message {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    .message.error,
    .message.success,
    .message.loading {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    #examForm .back-btn,
    #adminPanel .back-btn {
        display: block;
        margin: var(--spacing-lg) 0 0;
        width: 100%;
    }
}

/* 查询按钮样式 */
.custom-exam-buttons button {
    width: 100%;
    padding: 14px 24px;
}

/* 模态框按钮 - 网站声明等 */
#disclaimerModal .modal-footer button,
#wechatBrowserModal .modal-footer button,
#appInfoModal .modal-footer button,
#examIdModal .modal-footer button,
#batchExamIdResultModal .modal-footer button {
    width: 100%;
    max-width: none;
    padding: 14px 30px;
    font-size: 16px;
    margin: 0;
    display: block;
}

/* 模态框按钮布局 */
.modal-footer {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-lg);
    width: 100%;
}

.modal-footer button {
    min-width: 120px;
    padding: 14px 24px;
    font-size: 15px;
    flex: 1;
}

/* 取消按钮样式 */
.cancel-btn {
    background: var(--text-light) !important;
}

.cancel-btn:hover {
    background: var(--text-secondary) !important;
}

/* ========================================
   表单元素 - 新粗犷主义
   ======================================== */
.form-group {
    margin-bottom: var(--spacing-sm);
    animation: formGroupSlideIn 0.4s ease-out backwards;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

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

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

label:hover {
    color: var(--primary-color);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0 16px;
    border: var(--border-width) solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    min-height: 48px;
    height: 48px;
    line-height: 48px;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 4px 4px 0px var(--primary-color);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

/* ========================================
   管理员导航标签
   ======================================== */
.admin-tab-btn {
    background: var(--surface-color);
    color: var(--text-primary);
    border: var(--border-width) solid var(--border-color);
    border-bottom: none;
    padding: 14px 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    position: relative;
    top: 2px;
    flex: 1;
    text-align: center;
}

.admin-tab-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 2px 2px 0px var(--border-color);
}

.admin-tab-btn.active,
.admin-tab-btn[style*="border-bottom-color"] {
    background: var(--primary-color) !important;
    color: white !important;
    border-bottom: 3px solid var(--border-color) !important;
    transform: translateY(0);
    box-shadow: 3px 3px 0px var(--border-color);
}

.admin-tab-btn:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0px var(--border-color);
}

/* ========================================
   管理员面板样式
   ======================================== */
#adminPanel h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-sm);
}

#adminPanel h4 {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

/* ========================================
   仪表盘卡片 - 新粗犷主义
   ======================================== */
.dashboard-card {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

/* 电脑端卡片悬停效果 */
@media (hover: hover) {
    .dashboard-card:hover {
        transform: translateY(-5px);
        box-shadow: 8px 8px 0px var(--border-color);
    }
}

/* 移动端触摸反馈 */
@media (hover: none) {
    .dashboard-card:active {
        animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 4px 0px var(--border-color);
    }
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
}

.dashboard-card:nth-child(2)::before {
    background: var(--success-color);
}

.dashboard-card:nth-child(3)::before {
    background: var(--warning-color);
}

.dashboard-card:nth-child(4)::before {
    background: var(--error-color);
}

.dashboard-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card:active {
    transform: translate(0, 0);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   表格样式 - 新粗犷主义
   ======================================== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
    border: var(--border-width) solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

/* 表格悬停效果 */
@media (hover: hover) {
    table:hover {
        box-shadow: 4px 4px 0px var(--border-color);
    }
}

th, td {
    padding: 12px;
    text-align: left;
    border: var(--border-width) solid var(--border-color);
    word-wrap: break-word;
    transition: all 0.15s ease;
}

th {
    background: var(--primary-color);
    color: white;
    border-bottom: var(--border-width) solid var(--border-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    position: relative;
}

/* 表头悬停效果 */
@media (hover: hover) {
    th:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
    }
}

tr:nth-child(even) {
    background: var(--bg-color);
}

tr:hover {
    background: var(--primary-light);
    transform: scale(1.005);
}

/* ========================================
   考试项目列表
   ======================================== */
.exam-list {
    margin-top: var(--spacing-md);
}

.exam-item {
    padding: var(--spacing-md);
    border: var(--border-width) solid var(--border-color);
    background: var(--surface-color);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* 考试项悬停效果 */
@media (hover: hover) {
    .exam-item:hover {
        border-color: var(--primary-color);
        background: var(--primary-light);
        transform: translate(-3px, -3px);
        box-shadow: 6px 6px 0px var(--border-color);
    }
}

/* 移动端触摸反馈 */
@media (hover: none) {
    .exam-item:active {
        animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 3px 3px 0px var(--border-color);
    }
}

/* 考试项选中效果 */
.exam-item.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 4px 4px 0px var(--border-color);
}

/* ========================================
   自定义考试区域
   ======================================== */
.custom-exam {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--bg-color);
    border: var(--border-width) dashed var(--border-color);
    box-shadow: var(--shadow-sm);
}

.custom-exam h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.custom-exam .form-group {
    margin-bottom: var(--spacing-sm);
}

.custom-exam input {
    width: 100%;
    min-height: 48px;
    height: 48px;
}

.btn-query-exam {
    width: 100%;
    min-height: 48px;
    height: 48px;
    margin-bottom: var(--spacing-sm);
}

.btn-view-exam-ids {
    width: 100%;
    min-height: 48px;
    height: 48px;
    margin-bottom: var(--spacing-sm);
}

.custom-exam-tip {
    margin-top: var(--spacing-sm) !important;
    margin-bottom: 0 !important;
}

/* 电脑端手动输入考试ID区域按钮间距统一 */
@media (min-width: 769px) {
    .custom-exam {
        padding: var(--spacing-lg);
    }
    
    .custom-exam .form-group {
        margin-bottom: var(--spacing-sm);
    }
    
    .btn-query-exam {
        margin-bottom: var(--spacing-sm);
    }
    
    .btn-view-exam-ids {
        margin-bottom: var(--spacing-sm);
    }
}

/* ========================================
   消息提示框 - 统一样式
   ======================================== */
.message-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: auto;
    max-width: 90%;
    min-width: 200px;
}

.message {
    padding: 16px 24px !important;
    margin: 0 !important;
    border: var(--border-width) solid var(--border-color) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-md) !important;
    background: var(--surface-color) !important;
    min-width: 200px !important;
    max-width: 400px !important;
    text-align: center !important;
    line-height: normal !important;
    min-height: 64px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: messageSlideDown 0.3s ease-out !important;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.message.error,
.message.success,
.message.loading {
    min-height: 64px !important;
    height: 64px !important;
    padding: 16px 24px !important;
    line-height: normal !important;
}

.message.error {
    background: var(--error-bg);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.message.success {
    background: var(--success-bg);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message.loading {
    background: var(--info-bg);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

@keyframes messageSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ========================================
   模态框 - 新粗犷主义
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* 模态框打开时禁止body滚动 */
body.modal-open {
    overflow: hidden;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface-color);
    padding: var(--spacing-xl);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* 模态框悬停效果 */
@media (hover: hover) {
    .modal-content:hover {
        box-shadow: 15px 15px 0px var(--border-color);
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
    border-bottom: var(--border-width) solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.modal-header h2 {
    margin: 0;
}

.modal-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: var(--border-width) solid var(--border-color);
    display: flex;
    gap: var(--spacing-sm);
}

.format-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.format-option {
    padding: var(--spacing-md);
    border: var(--border-width) solid var(--border-color);
    background: var(--surface-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

/* 格式选项悬停效果 */
@media (hover: hover) {
    .format-option:hover {
        border-color: var(--primary-color);
        background: var(--primary-light);
        transform: translate(-3px, -3px);
        box-shadow: 6px 6px 0px var(--border-color);
    }
}

/* 移动端触摸反馈 */
@media (hover: none) {
    .format-option:active {
        animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 3px 3px 0px var(--border-color);
    }
}

.format-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 4px 4px 0px var(--border-color);
}

.format-icon {
    font-size: 28px;
}

.format-info {
    flex: 1;
}

.format-name {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 14px;
}

.format-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========================================
   辅助类
   ======================================== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.pulse-animation {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 强制移除所有圆角 - 新粗犷主义 */
*, *::before, *::after {
    border-radius: 0 !important;
}

/* 圆形元素例外（如 loading spinner） */
.loading-spinner,
.format-icon {
    border-radius: 50%;
}



/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 覆盖内联样式的按钮 */
button[style*="width: 100%"],
button[onclick="validateCode()"],
button[onclick="login()"] {
    width: 100% !important;
    margin-top: var(--spacing-md);
}

/* 兑换码激活按钮 */
#codeInputSection button {
    width: 100% !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    margin-top: var(--spacing-xs) !important;
    min-height: 48px;
    height: 48px;
}

.btn-activate-code {
    width: 100%;
    min-height: 48px;
    height: 48px;
}

/* 批量查询按钮 */
.btn-batch-query {
    width: 100% !important;
}

/* 电脑端按钮优化 */
@media (min-width: 1025px) {
    /* 电脑端消息提示框高度统一 */
    .message {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    .message.error,
    .message.success,
    .message.loading {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    .back-btn,
    .cancel-btn {
        min-width: 140px;
        padding: 14px 35px !important;
        font-size: 15px;
    }
    
    .btn-refresh,
    .btn-inline,
    .btn-success,
    .btn-danger,
    .btn-batch {
        width: 100%;
        padding: 14px 28px !important;
    }
    
    /* 模态框按钮 */
    .modal-footer button {
        min-width: 120px;
        padding: 14px 28px !important;
    }
    
    /* 仪表盘按钮组 */
    #dashboardTab .btn-refresh,
    #dashboardTab .btn-batch-query {
        width: 100%;
        display: block;
        margin: var(--spacing-md) 0 0;
    }
    
    /* 管理员后台操作栏按钮 */
    .action-bar button {
        min-width: 140px;
        margin-left: 10px;
    }
    
    /* 用户管理操作栏 - 按钮间距 */
    #usersTab .action-bar {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
        width: 100%;
    }
    
    #usersTab .inline-form-group {
        display: flex;
        gap: var(--spacing-md);
        width: 100%;
    }
    
    #usersTab .form-input-inline {
        flex: 1;
        min-width: 200px;
    }
    
    #usersTab .btn-inline {
        min-width: 100px;
        max-width: 150px;
    }
    
    /* 兑换码管理按钮 */
    #codesTab .btn-success,
    #codesTab .btn-batch {
        width: 100%;
    }
    
    /* 日志管理按钮 */
    #logsTab .btn-inline,
    #logsTab .btn-danger {
        width: 100%;
        min-height: 48px;
    }
    
    /* 日志管理操作栏优化 */
    #logsTab .action-bar {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
        margin-bottom: var(--spacing-md);
    }
    
    #logsTab .inline-form-group {
        display: flex;
        gap: 0;
        width: 100%;
    }
    
    #logsTab .form-input-inline {
        flex: 1;
        min-width: 0;
        min-height: 48px;
        width: 50%;
    }
    
    #logsTab .inline-form-group .btn-inline {
        width: 50%;
        min-width: 0;
        flex: none;
    }
    
    #logsTab .action-bar:last-child {
        display: flex;
        gap: var(--spacing-md);
    }
    
    #logsTab .action-bar:last-child .btn-danger,
    #logsTab .action-bar:last-child .btn-inline {
        flex: 1;
    }
    
    /* 退出登录按钮 - 居中或靠右 */
    #examForm .back-btn,
    #adminPanel .back-btn {
        display: block;
        margin: var(--spacing-lg) 0 0;
        width: 100%;
    }
    
    /* 账号设置按钮 */
    #settingsTab button {
        width: 100%;
    }
}

/* 信息框 */
#permissionInfo,
#schoolInfo,
#codeInputSection,
.admin-info-box {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border: var(--border-width) solid var(--border-color);
    font-size: 14px;
}

#permissionInfo {
    background: var(--info-bg);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

#schoolInfo {
    background: var(--success-bg);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

#codeInputSection {
    background: var(--warning-bg);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

#codeInputSection h3 {
    color: var(--warning-color);
}

/* 加载动画 - 新粗犷主义风格 */
.loading {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loading-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-left: 12px;
    vertical-align: middle;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    animation: spin 0.7s linear infinite;
}

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

/* 消息提示加载动画 */
.message.loading .loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 3px;
    margin-left: 10px;
    flex-shrink: 0;
}

/* 确保消息框内所有元素都不会影响高度 */
.message > * {
    line-height: normal;
    flex-shrink: 0;
}

/* ========================================
   信息框样式 - 新粗犷主义
   ======================================== */
.info-box {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: var(--border-width) solid var(--border-color);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.info-box-blue {
    background: var(--info-bg);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

.info-box-green {
    background: var(--success-bg);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.info-box-purple {
    background: #F3E5F5;
    color: #8E24AA;
    border-left: 4px solid #8E24AA;
}

.info-box-yellow {
    background: var(--warning-bg);
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.exam-tip-warning {
    background: #fde8e8;
    color: #c53030;
    border-left: 4px solid #e53e3e;
}

.info-box h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 16px;
    text-align: center;
}

.purchase-link {
    margin-top: var(--spacing-sm);
    text-align: center;
    font-size: 14px;
}

.warning-box {
    background: #FDEDEC;
    color: #721c24;
    padding: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid var(--error-color);
}

/* ========================================
   管理员面板样式
   ======================================== */
.admin-info-box {
    padding: var(--spacing-md);
    font-size: 14px;
}

.admin-welcome {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.admin-tab-container {
    display: flex;
    margin-bottom: var(--spacing-md);
    border-bottom: var(--border-width) solid var(--border-color);
    overflow-x: auto;
}

.admin-tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-bottom: 3px solid var(--border-color);
}

/* ========================================
   仪表盘卡片样式
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.card-success .stat-number {
    color: var(--success-color);
}

.card-warning .stat-number {
    color: var(--warning-color);
}

.card-danger .stat-number {
    color: var(--error-color);
}

.btn-refresh {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-refresh:hover {
    background: var(--primary-hover);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-refresh:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   批量查询卡片
   ======================================== */
.batch-query-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: var(--border-width) solid var(--border-color);
}

.batch-query-card {
    background: var(--primary-color);
    padding: var(--spacing-lg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.batch-query-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
}

.batch-query-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
}

.batch-query-desc {
    font-size: 14px;
    color: white;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.btn-batch-query {
    background: var(--surface-color);
    color: var(--primary-color);
    padding: 14px 40px;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.btn-batch-query:hover {
    background: var(--primary-hover);
    color: white;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-batch-query:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   表单和内联样式类
   ======================================== */
.form-input-inline {
    padding: 8px 12px;
    border: var(--border-width) solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    width: 200px;
    box-shadow: var(--shadow-sm);
}

.btn-inline {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-inline:hover {
    background: var(--primary-hover);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-inline:active {
    transform: translate(2px, 2px);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

.btn-success:hover {
    background: #229954;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-danger {
    padding: 8px 16px;
    background: var(--error-color);
    color: white;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

.btn-danger:hover {
    background: #C0392B;
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-batch {
    margin-top: var(--spacing-sm);
    padding: 8px 16px;
    background: #9c27b0;
    color: white;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

.code-management-box {
    background: #F3E5F5;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: var(--border-width) solid var(--border-color);
    border-left: 4px solid #9c27b0;
}

.inline-form-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.batch-input-section {
    border-top: var(--border-width) dashed var(--border-color);
    padding-top: var(--spacing-md);
}

.form-textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: var(--border-width) solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    font-family: monospace;
    box-shadow: var(--shadow-sm);
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--spacing-md);
}

.data-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: var(--border-width) solid var(--border-color);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.data-list-container-small {
    max-height: 200px;
    overflow-y: auto;
    border: var(--border-width) solid var(--border-color);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

/* 响应式设计 - 平板端 (768px-1024px) */
@media (max-width: 1024px) {
    /* 消息提示框高度统一 */
    .message {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    .message.error,
    .message.success,
    .message.loading {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    .container {
        width: 90%;
        padding: var(--spacing-lg);
    }
    
    button {
        padding: 13px 20px;
        font-size: 15px;
    }
}

/* 响应式设计 - 移动端 (max-width: 768px) */
@media (max-width: 768px) {
    body {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px 10px;
        min-height: 100vh;
        background-size: 30px 30px;
    }
    
    .container {
        width: 95%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 18px;
        margin-top: var(--spacing-sm);
    }
    
    h2 {
        font-size: 18px;
        margin-bottom: var(--spacing-md);
    }
    
    h3 {
        font-size: 16px;
        margin-bottom: var(--spacing-sm);
    }
    
    /* 全局字体统一 - 所有设备一致 */
    body, button, input, select, textarea, label, div, span, p, a, td, th, option {
        font-size: 14px !important;
    }
    
    /* 管理员信息框字体统一 */
    .admin-info-box,
    .admin-welcome,
    #adminUsername {
        font-size: 14px !important;
    }
    
    .admin-info-box > div {
        font-size: 14px !important;
    }
    
    /* 管理员标签页 - 图标式布局 */
    .admin-tab-container {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding-bottom: 0;
        gap: 5px;
        border-bottom: var(--border-width) solid var(--border-color);
        margin-bottom: var(--spacing-md);
        justify-content: flex-start;
    }
    
    .admin-tab-btn {
        font-size: 11px;
        padding: 10px 8px;
        white-space: nowrap;
        flex: 0 0 auto;
        min-width: 50px;
        min-height: 42px;
    }
    
    /* 仪表盘卡片 */
    .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: var(--spacing-md);
    }
    
    .dashboard-card {
        padding: 10px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* 仪表盘按钮组 - 移动端 */
    #dashboardTab .btn-refresh,
    #dashboardTab .btn-batch-query {
        width: 100%;
        display: block;
        margin: var(--spacing-md) 0 0;
    }
    
    /* 表格优化 */
    table {
        font-size: 14px !important;
        overflow-x: auto;
        display: table;
        width: 100%;
        -webkit-overflow-scrolling: touch;
        table-layout: auto;
    }
    
    th, td {
        padding: 8px;
        min-width: auto;
        white-space: nowrap;
        font-size: 14px !important;
    }
    
    /* 按钮优化 */
    button {
        padding: 14px 20px;
        font-size: 14px !important;
        min-height: 48px;
        height: 48px;
        width: 100%;
    }
    
    #loginForm button {
        width: 100%;
        min-width: auto;
    }
    
    /* 表单元素 */
    input, select, textarea {
        padding: 12px;
        font-size: 14px !important;
        min-height: 48px;
    }
    
    label {
        font-size: 14px !important;
        margin-bottom: 8px;
    }
  /* 模态框按钮 */
    .modal-footer button {
        flex: 1;
        min-width: auto;
        padding: 12px 20px !important;
        font-size: 14px !important;
        max-width: none;
    }
    
    /* 网站声明等模态框的关闭按钮 - 移动端也加大 */
    #disclaimerModal .modal-footer button,
    #wechatBrowserModal .modal-footer button,
    #appInfoModal .modal-footer button,
    #examIdModal .modal-footer button,
    #batchExamIdResultModal .modal-footer button {
        width: 100%;
        max-width: 400px;
        min-width: auto;
        padding: 14px 30px !important;
        font-size: 14px !important;
        margin: 10px auto 0;
    }
    
    /* 表单元素优化 */
    input, select, textarea {
        padding: 10px;
        font-size: 14px !important;
        min-height: 44px;
    }
    
    label {
        font-size: 14px !important;
        margin-bottom: 6px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    /* 考试列表项 */
    .exam-list {
        margin-top: 10px;
    }
    
    .exam-item {
        padding: 12px;
        font-size: 14px !important;
        margin-bottom: 10px;
    }
    
    /* 自定义考试区域 */
    .custom-exam {
        padding: 12px;
        margin-top: 12px;
    }
    
    .custom-exam h3 {
        font-size: 14px !important;
        margin-bottom: 10px;
    }
    
    .custom-exam-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .custom-exam-buttons button {
        width: 100%;
    }
    
    /* 模态框优化 */
    .modal-content {
        padding: 16px;
        margin: 10px;
        max-height: 90vh;
    }
    
    .format-option {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        margin-bottom: 8px;
    }
    
    .format-icon {
        font-size: 40px !important;
        margin-bottom: 4px;
    }
    
    .format-info {
        text-align: center;
    }
    
    .format-name {
        font-size: 14px !important;
    }
    
    .format-desc {
        font-size: 14px !important;
    }
    
    /* 消息提示优化 - 居中显示 */
    .message-container {
        position: fixed;
        top: 15px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        max-width: 90%;
        align-items: center;
    }
    
    .message {
        padding: 12px 20px;
        font-size: 14px;
        margin: 0 0 8px;
        min-width: 200px;
        max-width: 90%;
        min-height: 48px !important;
        height: auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: messageSlideDown 0.3s ease-out;
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        line-height: 1.4;
    }
    
    .message.error,
    .message.success,
    .message.loading {
        min-height: 64px !important;
        height: 64px !important;
    }
    
    @keyframes messageSlideDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    #permissionInfo,
    #schoolInfo,
    #codeInputSection,
    .admin-info-box {
        padding: 10px;
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    /* 移动端兑换码激活区域宽度统一 */
    #codeInputSection {
        padding: 12px;
    }
    
    #codeInputSection input {
        width: 100%;
        min-height: 48px;
        height: 48px;
    }
    
    #codeInputSection button {
        width: 100%;
        min-height: 48px;
        height: 48px;
    }
    
    /* 移动端手动输入考试ID区域宽度统一 */
    .custom-exam {
        padding: 12px;
    }
    
    .custom-exam input {
        width: 100%;
        min-height: 48px;
        height: 48px;
    }
    
    .custom-exam button {
        width: 100%;
        min-height: 48px;
        height: 48px;
    }
    
    .custom-exam .info-box {
        width: 100%;
    }
    
    .custom-exam-tip {
        margin-top: 10px !important;
        padding: 12px !important;
    }
    
    .exam-tip-warning {
        padding: 8px 10px;
        font-size: 13px !important;
        margin-bottom: 10px;
    }
    
    #codeInputSection h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    /* 搜索框和按钮布局 */
    #userSearch {
        width: 100%;
        margin-bottom: 10px;
        min-height: 44px;
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    .inline-form-group {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .form-input-inline {
        width: 100%;
        min-height: 44px;
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    .btn-inline {
        width: 100%;
        min-height: 44px;
        padding: 12px 20px !important;
        font-size: 14px !important;
        text-align: center;
    }
    
    /* 用户管理操作栏 - 三行布局 */
    #usersTab > div:first-child {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    #usersTab > div:first-child > div {
        width: 100%;
    }
    
    /* 搜索按钮统一大小 */
    #usersTab button[onclick="searchUsers()"],
    #usersTab button[onclick="loadAllUsers()"] {
        width: 100%;
        min-height: 44px;
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    /* 批量查询卡片 */
    .batch-query-card {
        padding: 14px !important;
    }
    
    .batch-query-icon {
        font-size: 32px !important;
    }
    
    .batch-query-title {
        font-size: 15px !important;
    }
    
    .batch-query-desc {
        font-size: 11px !important;
    }
    
    .batch-query-card button {
        padding: 12px 16px !important;
        font-size: 13px !important;
        width: 100%;
    }
    
    /* 数据列表容器 */
    .data-list-container,
    .data-list-container-small {
        max-height: 250px;
    }
    
    /* 代码管理区域 */
    .code-management-box {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .batch-input-section {
        padding-top: 12px;
        margin-top: 12px;
    }
    
    /* 兑换码列表和记录间距 */
    #codesList {
        margin-bottom: 20px;
        width: 100%;
        overflow-x: auto;
    }
    
    #codeLogsList {
        margin-top: 10px;
        width: 100%;
    }
    
    /* 操作栏 */
    .action-bar {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
        background-size: 20px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }
    
    .container {
        width: 98%;
        max-width: none;
        margin: 0;
        padding: var(--spacing-xs);
        box-shadow: var(--shadow-lg);
    }
    
    h1 {
        font-size: 18px;
        margin-bottom: 16px;
        margin-top: 12px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    h3 {
        font-size: 14px;
    }
    
    /* 管理员标签页 */
    .admin-tab-btn {
        font-size: 9px;
        padding: 7px 4px;
        font-weight: 700;
        min-height: 34px;
        min-width: 45px;
    }
    
    /* 仪表盘卡片单列显示 */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .dashboard-card {
        padding: 8px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    /* 表格优化 */
    table {
        font-size: 10px;
        min-width: 0;
        display: table;
        width: 100%;
        table-layout: auto;
    }
    
    th, td {
        padding: 5px 6px;
        min-width: auto;
        white-space: nowrap;
    }
    
    th:first-child, td:first-child {
        min-width: 90px;
    }
    
    /* 按钮优化 */
    button {
        padding: 10px 14px;
        font-size: 12px;
        min-height: 48px;
        height: 48px;
    }
    
    #loginForm button {
        width: 100%;
        min-width: auto;
    }
    
    /* 表单元素 */
    input, select, textarea {
        padding: 8px;
        font-size: 13px;
        min-height: 48px;
        height: 48px;
    }
    
    label {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    /* 考试列表项 */
    .exam-item {
        padding: 10px;
        font-size: 12px;
    }
    
    /* 自定义考试区域 */
    .custom-exam {
        padding: 10px;
        margin-top: 10px;
    }
    
    .custom-exam h3 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    /* 模态框 */
    .modal-content {
        padding: 12px;
        margin: 5px;
        max-height: 95vh;
    }
    
    .format-option {
        padding: 10px;
    }
    
    .format-icon {
        font-size: 40px !important;
        margin-bottom: 4px !important;
    }
    
    .format-name {
        font-size: 13px;
    }
    
    .format-desc {
        font-size: 14px !important;
    }
    
    /* 消息提示 */
    .message-container {
        position: fixed;
        top: 12px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: auto;
        max-width: 95%;
        align-items: center;
    }
    
    .message {
        padding: 12px 16px;
        font-size: 13px !important;
        margin: 0 0 6px;
        min-width: 200px;
        max-width: 95%;
        min-height: 48px !important;
        height: auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: messageSlideDown 0.3s ease-out;
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        line-height: 1.4;
    }
    
    .message.error,
    .message.success,
    .message.loading {
        min-height: 48px !important;
        height: auto !important;
    }
    
    #permissionInfo,
    #schoolInfo,
    #codeInputSection {
        padding: 12px;
        font-size: 14px !important;
        margin-bottom: 10px;
    }
    
    #codeInputSection h3 {
        font-size: 14px !important;
        margin-bottom: 6px;
    }
    
    .admin-info-box {
        padding: 8px;
        font-size: 14px !important;
        margin-bottom: 10px;
    }
    
    /* 批量查询 */
    .batch-query-card {
        padding: 12px !important;
    }
    
    .batch-query-icon {
        font-size: 28px !important;
    }
    
    .batch-query-title {
        font-size: 14px !important;
    }
    
    .batch-query-desc {
        font-size: 14px !important;
    }
    
    .batch-query-card button {
        padding: 10px 14px !important;
        font-size: 14px !important;
    }
}

/* ========================================
   全局强制消息提示框高度统一（最高优先级）
   ======================================== */
.message,
.message.error,
.message.success,
.message.loading {
    min-height: 48px !important;
    height: auto !important;
}

/* 强制所有媒体查询中的消息提示框高度 */
@media (min-width: 769px) {
    .message,
    .message.error,
    .message.success,
    .message.loading {
        min-height: 64px !important;
        height: auto !important;
    }
}

@media (max-width: 1024px) {
    .message,
    .message.error,
    .message.success,
    .message.loading {
        min-height: 48px !important;
        height: auto !important;
    }
}

@media (max-width: 768px) {
    .message,
    .message.error,
    .message.success,
    .message.loading {
        min-height: 48px !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .message,
    .message.error,
    .message.success,
    .message.loading {
        min-height: 48px !important;
        height: auto !important;
    }
}

/* ========================================
   考试 ID 公示弹窗样式
   ======================================== */
.btn-view-exam-ids {
    background: var(--warning-color) !important;
    color: white !important;
    border: var(--border-width) solid var(--border-color) !important;
    box-shadow: var(--shadow-md) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (hover: hover) {
    .btn-view-exam-ids:hover {
        background: var(--warning-color) !important;
        transform: translate(-3px, -3px) !important;
        box-shadow: 6px 6px 0px var(--border-color) !important;
    }
}

.btn-view-exam-ids:active {
    animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 3px 3px 0px var(--border-color) !important;
}

/* 考试ID公示弹窗搜索区域优化 */
.exam-id-search-area {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.exam-id-search-area input {
    flex: 1;
    min-height: 48px;
    height: 48px;
}

.btn-search-exam-id {
    background: var(--warning-color) !important;
    color: white !important;
    min-width: 100px;
    min-height: 48px;
    height: 48px;
}

#examIdSearchResult {
    min-height: 0;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* 考试ID公示弹窗 - 电脑端关闭按钮固定显示 */
@media (min-width: 769px) {
    #examIdPublicModal .modal-content {
        display: flex;
        flex-direction: column;
        max-height: 85vh;
    }
    
    #examIdPublicModal .modal-header {
        flex-shrink: 0;
    }
    
    #examIdPublicModal .exam-id-search-area {
        flex-shrink: 0;
    }
    
    #examIdSearchResult {
        flex-shrink: 0;
    }
    
    /* 表格容器 - 可滚动区域 */
    #examIdPublicModal .modal-content > div:nth-of-type(3) {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }
    
    /* 关闭按钮固定在底部 */
    #examIdPublicModal .modal-footer {
        flex-shrink: 0;
        border-top: var(--border-width) solid var(--border-color);
        padding-top: 15px;
        margin-top: 15px;
        background: var(--surface-color);
    }
}

/* 考试ID公示表格 - 优化列宽 */
#examIdPublicTableBody tr {
    cursor: pointer;
    transition: all 0.15s ease;
}

#examIdPublicTableBody tr:hover {
    background: var(--primary-light) !important;
    transform: scale(1.005);
}

#examIdPublicTableBody .copy-btn {
    background: var(--primary-color);
    color: white;
    border: var(--border-width) solid var(--border-color);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (hover: hover) {
    #examIdPublicTableBody .copy-btn:hover {
        background: var(--primary-hover);
        transform: translate(-2px, -2px);
        box-shadow: 4px 4px 0px var(--border-color);
    }
}

#examIdPublicTableBody .copy-btn:active {
    animation: quickPress 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 2px 0px var(--border-color);
}

/* 考试ID公示弹窗复制按钮 */
.exam-id-copy-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 60px;
    width: auto;
}

/* 考试ID公示弹窗复制按钮 */
.exam-id-copy-btn {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 60px;
    width: auto;
}

/* 考试ID公示表格 - 考试ID列宽优化（适合6位数字） */
#examIdPublicModal table th:first-child,
#examIdPublicModal table td:first-child {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}

/* 移动端考试ID公示弹窗优化 */
@media (max-width: 768px) {
    #examIdPublicModal .modal-content {
        padding: 16px;
        padding-bottom: 80px;
        display: flex;
        flex-direction: column;
    }
    
    #examIdPublicModal .modal-header {
        margin-bottom: 15px;
        padding-top: 10px;
        padding-bottom: 10px;
        flex-shrink: 0;
    }
    
    #examIdPublicModal h2 {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    /* 搜索框区域 - 分两行显示 */
    .exam-id-search-area {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
        align-items: stretch !important;
        flex-shrink: 0;
    }
    
    .exam-id-search-area input {
        width: 100% !important;
        min-height: 48px !important;
        height: 48px !important;
        flex: none !important;
    }
    
    .btn-search-exam-id {
        width: 100% !important;
        min-width: 100% !important;
        min-height: 48px !important;
        height: 48px !important;
    }
    
    /* 查询结果 */
    #examIdSearchResult {
        margin-bottom: 8px;
        padding: 8px;
        flex-shrink: 0;
    }
    
    /* 表格容器 - 可滚动区域 */
    #examIdPublicModal .modal-content > div:nth-of-type(3) {
        margin-bottom: 15px;
        max-height: 400px;
        overflow-y: auto;
        border: none;
        box-shadow: none;
        flex: 1;
        min-height: 0;
    }
    
    /* 隐藏表格表头 */
    #examIdPublicModal table thead {
        display: none;
    }
    
    /* 表格改为卡片式布局 */
    #examIdPublicModal table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    /* 每行改为卡片 */
    #examIdPublicModal table tbody tr {
        display: flex;
        flex-direction: column;
        border: var(--border-width) solid var(--border-color);
        box-shadow: var(--shadow-sm);
        background: var(--surface-color);
        padding: 12px;
        margin: 0;
    }
    
    /* 考试ID单元格 */
    #examIdPublicModal table tbody td:first-child {
        font-weight: 700;
        color: var(--primary-color);
        font-size: 16px;
        padding: 0 0 8px 0;
        border: none;
        display: block;
    }
    
    /* 考试名称单元格 - 强制换行 */
    #examIdPublicModal table tbody td:nth-child(2) {
        font-size: 14px;
        padding: 0 0 12px 0;
        border: none;
        border-bottom: 1px dashed var(--border-color);
        display: block;
        word-wrap: break-word;
        word-break: break-all;
        white-space: normal;
        line-height: 1.5;
        max-width: 100%;
        overflow-wrap: break-word;
    }
    
    /* 操作单元格 */
    #examIdPublicModal table tbody td:last-child {
        padding: 12px 0 0 0;
        border: none;
        text-align: center;
        display: block;
    }
    
    /* 复制按钮 */
    #examIdPublicTableBody .copy-btn {
        width: 100%;
        min-height: 48px;
        height: 48px;
        padding: 12px;
        font-size: 14px;
    }
    
    /* 关闭按钮 - 固定在底部 */
    #examIdPublicModal .modal-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--surface-color);
        border-top: var(--border-width) solid var(--border-color);
        padding: 12px 16px;
        justify-content: center;
        z-index: 10;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    #examIdPublicModal .modal-footer button {
        width: 100%;
        max-width: none;
        min-height: 48px;
        height: 48px;
    }
}

/* 480px以下小屏幕优化 */
@media (max-width: 480px) {
    #examIdPublicModal .modal-content {
        padding: 12px;
    }
    
    #examIdPublicModal h2 {
        font-size: 16px;
    }
    
    /* 表格容器 */
    #examIdPublicModal .modal-content > div:nth-of-type(3) {
        max-height: 350px;
    }
    
    /* 卡片间距 */
    #examIdPublicModal table tbody {
        gap: 10px;
    }
    
    /* 卡片内边距 */
    #examIdPublicModal table tbody tr {
        padding: 10px;
    }
    
    /* 考试ID */
    #examIdPublicModal table tbody td:first-child {
        font-size: 15px;
        padding-bottom: 6px;
    }
    
    /* 考试名称 */
    #examIdPublicModal table tbody td:nth-child(2) {
        font-size: 13px;
        padding-bottom: 10px;
    }
    
    /* 操作 */
    #examIdPublicModal table tbody td:last-child {
        padding-top: 10px;
    }
    
    /* 复制按钮 */
    #examIdPublicTableBody .copy-btn {
        min-height: 48px;
        height: 48px;
        font-size: 13px;
    }
}

/* 管理员后台考试 ID 管理 */
.exam-id-manager {
    background: var(--surface-color);
    padding: var(--spacing-lg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

.exam-id-manager h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    border-left: 4px solid var(--warning-color);
    padding-left: var(--spacing-sm);
}

/* 电脑端考试ID输入组样式 */
@media (min-width: 769px) {
    .exam-id-input-group {
        display: flex;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        align-items: stretch;
    }
    
    .exam-id-input-group input {
        flex: 1;
        padding: 12px 16px;
        border: var(--border-width) solid var(--border-color);
        font-size: 15px;
        min-height: 48px;
    }
    
    .exam-id-input-group input:first-child {
        width: 180px;
        flex: none;
    }
    
    .exam-id-input-group .btn-add-exam-id {
        min-height: 48px;
        min-width: 100px;
        margin-top: 0;
        align-self: stretch;
    }
}

.exam-id-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm);
    border: var(--border-width) solid var(--border-color);
    margin-bottom: var(--spacing-xs);
    background: var(--bg-color);
}

.exam-id-list-item .exam-info {
    flex: 1;
}

.exam-id-list-item .exam-id {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: var(--spacing-sm);
}

.exam-id-list-item .exam-name {
    color: var(--text-secondary);
    font-size: 14px;
}

.exam-id-list-item .actions {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-delete-exam-id {
    background: var(--error-color) !important;
    color: white !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
}

.btn-add-exam-id {
    background: var(--success-color) !important;
    color: white !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    margin-top: var(--spacing-sm);
}

.btn-move-exam-id {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    min-width: 30px !important;
}

.btn-move-exam-id.btn-disabled,
.btn-move-exam-id:disabled {
    background: #ccc !important;
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-move-exam-id.btn-disabled:hover,
.btn-move-exam-id:disabled:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

@media (hover: hover) {
    .btn-move-exam-id:hover:not(.btn-disabled):not(:disabled) {
        background: var(--primary-hover) !important;
        transform: translate(-2px, -2px) !important;
        box-shadow: 4px 4px 0px var(--border-color) !important;
    }
}

/* 移动端考试ID管理重新设计 */
@media (max-width: 768px) {
    .exam-id-manager {
        padding: 12px;
    }
    
    .exam-id-input-group-mobile {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .exam-id-input-group-mobile input {
        width: 100% !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 12px 16px !important;
        border: var(--border-width) solid var(--border-color) !important;
        font-size: 14px !important;
        flex: none !important;
    }
    
    .exam-id-input-group-mobile .btn-add-exam-id {
        width: 100% !important;
        min-height: 48px !important;
        height: 48px !important;
        min-width: 100% !important;
    }
    
    /* 移动端考试ID列表项重新设计 */
    .exam-id-list-item {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px !important;
        margin-bottom: 10px !important;
    }
    
    .exam-id-list-item .exam-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin-bottom: 10px !important;
    }
    
    .exam-id-list-item .exam-id {
        font-size: 16px !important;
        font-weight: 700 !important;
    }
    
    .exam-id-list-item .exam-name {
        font-size: 14px !important;
        word-break: break-word !important;
    }
    
    .exam-id-list-item .actions {
        display: flex !important;
        gap: 8px !important;
        justify-content: flex-end !important;
    }
    
    .exam-id-list-item .actions button {
        flex: 1 !important;
        min-height: 48px !important;
        height: 48px !important;
        padding: 10px 12px !important;
    }
}

/* ========================================
   动画性能优化
   ======================================== */
/* 使用 will-change 优化动画性能 - 仅在需要时应用 */
.container,
button,
.dashboard-card,
.exam-item,
.format-option,
.modal-content {
    will-change: transform;
}

/* 移除 will-change 当动画完成后（通过 JS 控制） */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari 特定优化 */
    .container,
    .dashboard-card,
    .exam-item {
        transform: translateZ(0);
    }
}

/* 减少动画时长以提高响应性 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   备案号样式
   ======================================== */
.footer-beian {
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-beian a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border: 1px solid transparent;
}

.footer-beian a:hover {
    color: var(--primary-color);
    border-color: var(--border-color);
    background: var(--bg-color);
}

@media (max-width: 768px) {
    .footer-beian {
        margin-top: 25px;
        padding-top: 15px;
    }
    
    .footer-beian a {
        font-size: 12px;
        padding: 5px 10px;
    }
}
