/* ========================================
   肇庆市中考体育成绩计算系统
   运动活力风格设计
   ======================================== */

:root {
    /* 主色调 - 运动橙与竞技蓝 */
    --orange-primary: #FF6B35;
    --orange-light: #FF8C5A;
    --orange-dark: #E55A2B;
    --blue-accent: #0066CC;
    --blue-light: #3399FF;
    --blue-dark: #0052A3;
    --blue-primary: #0066CC;

    /* 辅助色 */
    --green-success: #00C853;
    --green-primary: #10B981;
    --green-dark: #059669;
    --yellow-warning: #FFD600;
    --red-danger: #FF1744;
    --red-primary: #EF4444;
    --red-dark: #DC2626;

    /* 中性色 */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --border-color: #E0E0E0;
    --bg-gray: var(--gray-100);

    /* 背景 */
    --bg-primary: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
    --bg-card: rgba(255, 255, 255, 0.98);
    --bg-card-dark: rgba(30, 30, 50, 0.95);

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --shadow-orange: 0 8px 32px rgba(255, 107, 53, 0.3);
    --shadow-blue: 0 8px 32px rgba(0, 102, 204, 0.3);
}

/* ========================================
   全局样式
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 0;
    color: var(--gray-800);
    position: relative;
    overflow-x: hidden;
    padding-top: 70px; /* 为顶部导航栏留出空间 */
}

/* 动态背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.15) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

/* ========================================
   顶部导航栏
   ======================================== */

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1500px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.region-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.region-selector label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.region-selector select {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.region-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.region-selector select:focus {
    outline: none;
    border-color: var(--orange-primary);
}

.region-selector select option {
    background: #1e3a5f;
    color: white;
    padding: 8px;
}

.region-selector select option:hover,
.region-selector select option:checked {
    background: #ff6b35;
    color: white;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Footer 联系方式 */
.footer-contact {
    margin: 12px 0;
    font-size: 14px;
    color: var(--gray-400);
}

.footer-contact a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--gray-300);
    text-decoration: underline;
}

.auth-buttons {
    display: flex;
    gap: 12px;
}

.btn-auth {
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-auth:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-register {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    border: none;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    color: white;
    font-size: 15px;
    font-weight: 500;
}

.user-dropdown {
    position: relative;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
}

.menu-label {
    color: var(--gray-600);
}

.menu-value {
    color: var(--blue-accent);
    font-weight: 600;
}

.menu-action {
    cursor: pointer;
    transition: background 0.2s;
    justify-content: flex-start;
}

.menu-action:hover {
    background: var(--gray-50);
}

.sign-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.sign-status.signed {
    background: var(--green-success);
    color: white;
}

.sign-status.not-signed {
    background: var(--gray-300);
    color: var(--gray-600);
}

.menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

/* ========================================
   模态框
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-small {
    max-width: 500px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    color: var(--gray-800);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.modal-body textarea:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.note-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.code-input {
    display: flex;
    gap: 10px;
}

.code-input input {
    flex: 1;
}

.btn-code {
    padding: 10px 16px;
    background: var(--blue-accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.btn-code:hover {
    background: var(--blue-light);
}

.btn-code:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.modal-footer-text {
    text-align: center;
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 8px;
}

.modal-footer-text a {
    color: var(--blue-accent);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

/* 充值套餐 */
.recharge-qr-section {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
}

.qr-code-container {
    flex-shrink: 0;
}

.qr-code-container img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    border: 2px solid var(--gray-300);
}

.recharge-instructions {
    flex: 1;
}

.recharge-instructions h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--gray-800);
}

.recharge-instructions ol {
    margin: 0 0 16px 0;
    padding-left: 20px;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.8;
}

.recharge-instructions li strong {
    color: var(--orange-primary);
}

.recharge-tip-box {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--orange-primary);
}

.recharge-tip-box p {
    margin: 6px 0;
    font-size: 13px;
    color: var(--gray-600);
}

.recharge-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.recharge-package {
    position: relative;
    background: linear-gradient(135deg, var(--gray-50), white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.recharge-package:hover {
    border-color: var(--orange-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.recharge-package.package-hot {
    border-color: var(--orange-light);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), var(--gray-50));
}

.recharge-package.selected {
    border-color: var(--orange-primary);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), white);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.package-tag {
    position: absolute;
    top: -8px;
    right: 8px;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
}

.package-points {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-accent);
    margin-bottom: 4px;
}

.package-price {
    font-size: 14px;
    color: var(--gray-600);
}

.recharge-tip {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 12px;
}

/* ========================================
   ZPAY 在线支付样式
   ======================================== */

.payment-method-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
}

.payment-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    transition: all 0.3s;
}

.payment-tab.active {
    color: var(--orange-primary);
    border-bottom-color: var(--orange-primary);
    font-weight: 600;
}

.payment-content {
    display: none;
}

.payment-content.active {
    display: block;
}

.package-desc {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.payment-summary {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.summary-price {
    color: var(--orange-primary);
    font-weight: 700;
    font-size: 18px;
}

.payment-tips {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--blue-accent);
}

.payment-tips p {
    margin: 5px 0;
    font-size: 13px;
    color: var(--gray-600);
}

/* ========================================
   超级管理员页面
   ======================================== */

.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-100);
    z-index: 100000;
    overflow-y: auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.admin-header h2 {
    margin: 0;
    color: var(--gray-800);
}

.btn-close-admin {
    padding: 8px 16px;
    background: var(--gray-200);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-close-admin:hover {
    background: var(--gray-300);
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.admin-section h3 {
    margin: 0 0 16px 0;
    color: var(--gray-800);
    font-size: 16px;
}

/* 管理员统计卡片 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.admin-stat-card {
    background: linear-gradient(135deg, var(--blue-light), white);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.admin-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--blue-accent);
}

.admin-stat-label {
    display: block;
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 4px;
}

/* 管理员表格 */
.admin-table-wrapper {
    overflow-x: auto;
}

.admin-search {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.admin-search select {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.admin-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.admin-table tbody tr:hover {
    background: var(--gray-50);
}

.no-data {
    text-align: center;
    color: var(--gray-500);
    padding: 20px !important;
}

/* 管理员操作按钮 */
.btn-edit {
    padding: 4px 12px;
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-edit:hover {
    background: var(--blue-dark);
}

.btn-delete {
    padding: 4px 12px;
    background: #ef5350;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 4px;
}

.btn-delete:hover {
    background: #d32f2f;
}

.footer {
    position: relative;
    text-align: center;
    padding: 20px;
    color: var(--gray-500);
    font-size: 13px;
}

.footer p {
    margin: 4px 0;
}

.icp-filing {
    font-size: 12px;
    color: var(--gray-400);
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.status-badge.paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* ========================================
   Toast 提示消息
   ======================================== */

.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--gray-800);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.toast.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--green-success);
}

.toast.error {
    background: var(--red-danger);
}

/* ========================================
   Header
   ======================================== */

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: slideDown 0.8s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

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

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

.header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFFFFF 0%, var(--orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    color: var(--gray-300);
    font-weight: 400;
    letter-spacing: 4px;
}

/* ========================================
   Main Container
   ======================================== */

.main-container {
    max-width: 1500px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================
   Section Title
   ======================================== */

.section-title {
    color: var(--gray-800);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--orange-primary), var(--blue-accent));
    border-radius: 2px;
}

/* ========================================
   Demo Section
   ======================================== */

.demo-section {
    margin-bottom: 40px;
}

/* 顶部操作栏 */
.demo-top-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.demo-header {
    text-align: center;
    margin-bottom: 40px;
}

.demo-header h2 {
    font-size: 28px;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.demo-header p {
    font-size: 16px;
    color: var(--gray-600);
}

/* 底部操作栏 */
.demo-bottom-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

/* 评分标准卡片 */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.standard-card {
    background: white;
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.standard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--orange-light);
}

.standard-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.standard-card h3 {
    font-size: 18px;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.standard-card p {
    color: var(--gray-600);
    font-size: 14px;
    margin: 5px 0;
}

.standard-example {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed var(--gray-300);
}

.example-label {
    color: var(--gray-500);
    font-size: 13px;
}

.example-value {
    color: var(--orange-primary);
    font-weight: 700;
    font-size: 15px;
}

/* 示例结果表格 */
.demo-results {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.demo-results h3 {
    font-size: 20px;
    color: var(--gray-800);
    margin: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h3 {
    font-size: 20px;
    color: var(--gray-800);
    margin: 0;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-table-wrapper {
    overflow-x: auto;
}

.demo-table {
    width: 100%;
    border-collapse: collapse;
}

.demo-table thead th {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
}

.demo-table thead th:first-child {
    border-radius: 10px 0 0 10px;
}

.demo-table thead th:last-child {
    border-radius: 0 10px 10px 0;
}

.demo-table tbody td {
    padding: 15px 12px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-size: 14px;
}

.demo-table tbody tr:last-child td {
    border-bottom: none;
}

.demo-table tbody tr:hover {
    background: rgba(255, 107, 53, 0.05);
}

/* 深圳地区表格列宽优化 */
/* 项目名称列（第一类、第二类、第三类项目）- 适当加宽 */
/* 第5、8、11列 */
.demo-table th:nth-child(3n+5),
.demo-table td:nth-child(3n+5),
#resultTable th:nth-child(3n+5),
#resultTable td:nth-child(3n+5) {
    min-width: 110px !important;
    width: 110px !important;
    max-width: 130px !important;
}

/* 成绩列（第一类、第二类、第三类成绩）- 中等宽度 */
/* 第6、9、12列 */
.demo-table th:nth-child(3n+6),
.demo-table td:nth-child(3n+6),
#resultTable th:nth-child(3n+6),
#resultTable td:nth-child(3n+6) {
    min-width: 75px !important;
    width: 75px !important;
    max-width: 90px !important;
}

/* 得分列（第一类、第二类、第三类得分）- 较窄 */
/* 第7、10、13列 */
.demo-table th:nth-child(3n+7),
.demo-table td:nth-child(3n+7),
#resultTable th:nth-child(3n+7),
#resultTable td:nth-child(3n+7) {
    min-width: 65px !important;
    width: 65px !important;
    max-width: 80px !important;
}

/* 过程性评价列（第14列）- 缩小宽度 */
.demo-table th:nth-child(14),
.demo-table td:nth-child(14),
.demo-table .evaluation-column,
#resultTable th:nth-child(14),
#resultTable td:nth-child(14),
#resultTable .evaluation-column {
    min-width: 90px !important;
    width: 90px !important;
    max-width: 110px !important;
}

.score-excellent {
    color: #27ae60;
    font-weight: 700;
    font-size: 18px;
}

.score-good {
    color: var(--orange-primary);
    font-weight: 700;
    font-size: 18px;
}

.grade-a {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.grade-b {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.grade-c {
    background: linear-gradient(135deg, #f39c12, #f89406);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.score-poor {
    color: #e74c3c;
    font-weight: 700;
    font-size: 18px;
}

/* 演示操作按钮 */
.demo-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-demo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-demo-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-demo-secondary:hover {
    border-color: var(--orange-primary);
    color: var(--orange-primary);
    background: rgba(255, 107, 53, 0.05);
}

/* 上传区域头部 */
.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--gray-200);
}

.btn-back.btn-small {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--blue-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.btn-back.btn-small:hover {
    background: #3b82f6;
}

/* ========================================
   Upload Section
   ======================================== */

.upload-section {
    margin-bottom: 40px;
}

.upload-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 32px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--blue-primary);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
}

.upload-area.drag-over {
    border-color: var(--green-success);
    background: rgba(0, 200, 83, 0.05);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.upload-icon {
    font-size: 56px;
    opacity: 0.8;
}

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

.upload-text h3 {
    color: var(--gray-800);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.upload-text p {
    color: var(--gray-500);
    font-size: 14px;
    margin: 0;
}

.upload-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.upload-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-actions .btn span {
    font-size: 16px;
}

/* 上传提示区域 */
.upload-tips {
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
}

.tips-header {
    padding: 14px 18px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.tips-content {
    padding: 16px 18px;
}

.tips-content p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 8px 0;
    line-height: 1.5;
}

.tips-content p:first-child {
    margin-top: 0;
}

.tips-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Buttons
   ======================================== */

.btn-link {
    background: none;
    border: none;
    color: var(--blue-accent);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    margin-left: 8px;
    transition: color 0.3s;
}

.btn-link:hover {
    color: var(--blue-light);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-upload {
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.btn-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.btn-export {
    background: linear-gradient(135deg, var(--green-success) 0%, #00A843 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 200, 83, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.btn-calc {
    width: 100%;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--blue-dark) 100%);
    color: white;
    margin-top: 20px;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
}

.btn-calc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--blue-dark) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.35);
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    border-color: var(--blue-accent);
    color: var(--blue-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

/* ========================================
   Stats Section
   ======================================== */

.stats-section {
    margin-bottom: 40px;
}

/* ========================================
   Charts Section
   ======================================== */

.charts-section {
    margin-bottom: 40px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.charts-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.chart-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.chart-card-small {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    max-width: 450px;
    margin: 0 auto;
}

.chart-card-small:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.chart-card-small canvas {
    max-height: 220px !important;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
    text-align: center;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-scope {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.stat-card {
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }
.stat-card:nth-child(7) { animation-delay: 0.35s; }
.stat-card:nth-child(8) { animation-delay: 0.4s; }
.stat-card:nth-child(9) { animation-delay: 0.45s; }

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

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}

/* 多彩卡片样式 */
.stat-card-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.stat-card-success {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    box-shadow: 0 8px 24px rgba(0, 176, 155, 0.3);
}

.stat-card-orange {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
}

.stat-card-blue {
    background: linear-gradient(135deg, #0066CC 0%, #3399FF 100%);
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3);
}

.stat-card-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.stat-card-gold {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.stat-card-pink {
    background: linear-gradient(135deg, #EC4899 0%, #F472B6 100%);
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
}

.stat-card-green {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.stat-card-red {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.stat-card-gray {
    background: linear-gradient(135deg, #6B7280 0%, #9CA3AF 100%);
    box-shadow: 0 8px 24px rgba(107, 114, 128, 0.3);
}

.stat-card-teal {
    background: linear-gradient(135deg, #06B6D4 0%, #67E8F9 100%);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
}

.stat-icon {
    font-size: 42px;
    z-index: 1;
}

.stat-info {
    flex: 1;
    z-index: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
    font-weight: 400;
}

/* ========================================
   Distribution Section
   ======================================== */

.distribution-section {
    margin-bottom: 40px;
}

.distribution-bar {
    display: flex;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.bar-segment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 13px;
    transition: flex 0.5s ease;
    position: relative;
}

.bar-segment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.bar-segment.excellent {
    background: linear-gradient(180deg, #00C853 0%, #00A843 100%);
}

.bar-segment.good {
    background: linear-gradient(180deg, #64DD17 0%, #00C853 100%);
}

.bar-segment.pass {
    background: linear-gradient(180deg, #FFD600 0%, #FFAB00 100%);
}

.bar-segment.fail {
    background: linear-gradient(180deg, #FF5252 0%, #FF1744 100%);
}

.bar-label {
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.bar-value {
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Table Section
   ======================================== */

.table-section {
    margin-bottom: 40px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.table-actions select,
.table-actions input {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    min-width: 140px;
    transition: all 0.3s;
    background: white;
}

.table-actions select:focus,
.table-actions input:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--blue-dark) 100%);
    color: white;
}

th {
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
}

td {
    padding: 14px 12px;
    font-size: 13px;
    text-align: center;
    border-right: 1px solid var(--gray-100);
}

td:last-child {
    border-right: none;
}

/* ========================================
   Class Stats Section
   ======================================== */

.class-stats-section {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
}

.subsection-title {
    color: var(--blue-accent);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.class-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.class-stat-item {
    background: white;
    padding: 16px;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.class-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.class-stat-header {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.class-stat-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 10px;
}

.class-stat-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

.class-stat-avg {
    color: var(--blue-accent);
}

.class-stat-max {
    color: var(--green-success);
}

.class-stat-min {
    color: var(--red-danger);
}

/* ========================================
   Score Colors & Badges
   ======================================== */

.score-high {
    color: var(--green-success);
    font-weight: 700;
}

.score-medium {
    color: var(--yellow-warning);
    font-weight: 700;
}

.score-low {
    color: var(--red-danger);
    font-weight: 700;
}

.grade {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.grade-a {
    background: linear-gradient(135deg, var(--green-success) 0%, #00A843 100%);
    color: white;
}

.grade-b {
    background: linear-gradient(135deg, #64DD17 0%, #00C853 100%);
    color: white;
}

.grade-c {
    background: linear-gradient(135deg, #FFD600 0%, #FFAB00 100%);
    color: var(--gray-800);
}

.grade-d {
    background: linear-gradient(135deg, #FF5252 0%, #FF1744 100%);
    color: white;
}

/* ========================================
   Single Calc Section
   ======================================== */

.single-calc-section {
    border-top: 1px solid var(--gray-200);
    padding-top: 30px;
}

/* ========================================
   缺失数据标记样式
   ======================================== */

/* 待填写 - 红色背景 + 粗体 */
.data-missing {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* 班级/姓名/性别缺失样式 */
.class-missing, .name-missing, .gender-missing {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* 项目缺失样式 */
.project-missing {
    color: #9ca3af !important;
    font-style: italic !important;
}

/* 数据类型错误样式 */
.data-type-error {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    border: 2px solid #f59e0b !important;
    position: relative;
}

/* 数据类型错误 - 添加错误提示图标 */
.data-type-error::after {
    content: '⚠️';
    margin-left: 4px;
    font-size: 14px;
}

/* 时间格式警告样式 - 黄色背景，边框更淡 */
.data-time-warning {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    border: 2px dashed #fbbf24 !important;
    position: relative;
}

/* 时间格式警告 - 添加警告图标 */
.data-time-warning::after {
    content: '⏱️';
    margin-left: 4px;
    font-size: 14px;
}

/* 警告动画 */
@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.data-missing, .gender-missing {
    animation: pulse-warning 2s infinite;
}

/* 数据类型错误动画 */
@keyframes pulse-error {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.data-type-error {
    animation: pulse-error 2s infinite;
}

.collapse-toggle {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.collapse-toggle:hover {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-color: var(--blue-accent);
}

.collapse-toggle .arrow {
    transition: transform 0.3s;
    font-size: 14px;
    color: var(--gray-500);
}

.collapse-toggle.active .arrow {
    transform: rotate(180deg);
}

.collapse-content {
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.form-item {
    display: flex;
    flex-direction: column;
}

.form-item label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.form-item input,
.form-item select {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.form-item input:focus,
.form-item select:focus {
    outline: none;
    border-color: var(--blue-accent);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

/* 输入提示小字样式 */
.input-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
}

/* 复选框样式 */
.form-item.checkbox-item {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    font-weight: normal;
    color: var(--gray-600);
}

.calc-result {
    margin-top: 20px;
    padding: 24px;
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--blue-dark) 100%);
    border-radius: 14px;
    text-align: center;
    color: white;
    animation: pulse 0.5s ease-out;
}

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

.result-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.result-score span:first-child {
    font-size: 18px;
    font-weight: 500;
}

.result-score span:last-child {
    font-size: 42px;
    font-weight: 700;
}

.result-score.total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.result-score.total span:last-child {
    font-size: 48px;
    color: #FFD700;
}

/* 上海表单样式 */
.form-section-title {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.score-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gray-100);
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--blue-accent);
}

.region-form {
    display: none;
}

.region-form.active {
    display: block !important;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    text-align: center;
    color: var(--gray-400);
    margin-top: 30px;
    font-size: 14px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .header h1 {
        font-size: 26px;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .main-container {
        padding: 24px 16px;
        border-radius: 20px;
    }

    .upload-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .upload-area {
        padding: 24px 20px;
    }

    .upload-icon {
        font-size: 42px;
    }

    .upload-text h3 {
        font-size: 16px;
    }

    .upload-text p {
        font-size: 13px;
    }

    .upload-actions {
        flex-direction: column;
        width: 100%;
    }

    .upload-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        font-size: 32px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-title {
        font-size: 14px;
    }

    .distribution-bar {
        flex-direction: column;
        height: auto;
    }

    .bar-segment {
        padding: 14px;
        min-height: 60px;
    }

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

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        flex-direction: column;
    }

    .table-actions select,
    .table-actions input {
        width: 100%;
    }

    table {
        font-size: 11px;
    }

    th, td {
        padding: 10px 6px;
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .class-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Scrollbar Styling
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--orange-primary), var(--blue-accent));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--orange-dark), var(--blue-dark));
}

/* ========================================
   Admin Panel Actions
   ======================================== */

.admin-table .actions-cell {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-small {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-approve {
    background: linear-gradient(135deg, var(--green-success) 0%, #00A843 100%);
    color: white;
}

.btn-approve:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 200, 83, 0.4);
}

.btn-reject {
    background: linear-gradient(135deg, var(--red-danger) 0%, #D50000 100%);
    color: white;
}

.btn-reject:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.4);
}

.btn-delete {
    background: var(--gray-400);
    color: white;
}

.btn-delete:hover {
    background: var(--gray-500);
}

.status-badge.rejected {
    background: linear-gradient(135deg, #FF5252 0%, #FF1744 100%);
    color: white;
}

/* ========================================
   Payment Confirmation Modal
   ======================================== */

.modal-small {
    max-width: 400px;
}

.payment-confirm-info {
    text-align: center;
}

.payment-confirm-info p {
    color: var(--gray-700);
    font-size: 14px;
    margin-bottom: 20px;
}

.payment-confirm-details {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.confirm-row span:first-child {
    color: var(--gray-600);
    font-size: 14px;
}

.confirm-value {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 16px;
}

.confirm-price {
    color: var(--orange-primary);
    font-size: 20px;
}

.confirm-email {
    color: var(--blue-accent);
    font-size: 13px;
}

.payment-warning {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: var(--orange-dark);
    font-size: 13px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* ========================================
   History Section
   ======================================== */

.history-section {
    padding: 20px 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.history-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.history-header .section-title {
    margin: 0;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--orange-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-upload:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.history-list {
    display: grid;
    gap: 16px;
}

.history-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.history-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.history-item .history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.history-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.history-icon {
    font-size: 24px;
}

.history-filename {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.history-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-history-view,
.btn-history-delete,
.btn-history-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-history-view {
    background: var(--blue-primary);
    color: white;
}

.btn-history-view:hover {
    background: #3b82f6;
    transform: translateY(-1px);
}

.btn-history-note {
    background: var(--orange-primary);
    color: white;
}

.btn-history-note:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
}

.btn-history-delete {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-history-delete:hover {
    background: #fee2e2;
    color: var(--red-danger);
}

.history-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--gray-600);
    font-size: 14px;
}

.history-time,
.history-count {
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-note-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--gray-200);
}

.history-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-700);
    font-size: 14px;
    background: #fef3c7;
    padding: 6px 12px;
    border-radius: 6px;
}

.history-note-empty {
    color: var(--gray-400);
    font-size: 13px;
    font-style: italic;
}

/* 批量操作相关样式 */
.history-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.select-all-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-gray);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.select-all-wrapper:hover {
    background: var(--gray-200);
}

.select-all-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--orange-primary);
}

.select-all-wrapper span {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.btn-batch-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-batch-export {
    background: var(--green-primary);
    color: white;
}

.btn-batch-export:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-batch-delete {
    background: var(--red-primary);
    color: white;
}

.btn-batch-delete:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.history-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.history-checkbox-wrapper {
    padding-top: 4px;
}

.history-checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--orange-primary);
    flex-shrink: 0;
}

.history-content {
    flex: 1;
    min-width: 0;
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
    gap: 16px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gray-700);
}

.pagination-info strong {
    color: var(--orange-primary);
    font-weight: 600;
}

.pagination-info select {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-info select:hover {
    border-color: var(--orange-primary);
}

.pagination-info select:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--gray-100);
    border-color: var(--orange-primary);
    color: var(--orange-primary);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--orange-primary), var(--orange-light));
    color: white;
    border-color: var(--orange-primary);
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--gray-100);
}

.pagination-ellipsis {
    padding: 0 4px;
    color: var(--gray-500);
    font-size: 14px;
}

/* ========================================
   History Detail Section
   ======================================== */

.history-detail-section {
    padding: 20px 0;
}

.history-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.history-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.class-filter {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.class-filter:hover {
    border-color: var(--orange-primary);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}

.class-filter:focus {
    outline: none;
    border-color: var(--orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--orange-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-export:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

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

.btn-export:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--gray-200);
    transform: translateX(-2px);
}

.btn-toggle-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--primary-50);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-600);
    cursor: pointer;
    transition: all 0.3s;
    margin-left: auto;
}

.btn-toggle-stats:hover {
    background: var(--primary-100);
}
