/* 主样式文件 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn-primary {
    background-color: #1890ff;
    color: white;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #d9d9d9;
}

.btn-secondary:hover {
    background-color: #e6f7ff;
    border-color: #40a9ff;
}

.btn-outline {
    background-color: transparent;
    color: #1890ff;
    border: 1px solid #1890ff;
}

.btn-outline:hover {
    background-color: #1890ff;
    color: white;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    cursor: pointer;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 自定义select样式 */
.form-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.form-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

/* Toast提示样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid #ddd;
}

.toast-success {
    border-left-color: #4CAF50;
}

.toast-error {
    border-left-color: #f44336;
}

.toast-warning {
    border-left-color: #ff9800;
}

.toast-info {
    border-left-color: #2196F3;
}

.toast-icon {
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #666;
}

.fade-out {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 移动端select优化 */
@media (max-width: 768px) {
    .form-select {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 12px 40px 12px 16px; /* 为箭头留出空间 */
        min-height: 44px; /* 确保触摸目标足够大 */
        -webkit-tap-highlight-color: transparent;
        touch-action: auto; /* 允许滚动 */
        background-image: none; /* 移除默认箭头 */
    }
    
    .form-select:active {
        background-color: #f5f5f5;
    }
    
    .form-select-wrapper::after {
        right: 16px;
        font-size: 14px;
    }
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    margin-top: 24px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

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

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

/* 首页样式 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.logo-img {
    width: 32px;
    height: 32px;
}

.logo-icon {
    font-size: 28px;
    color: #1890ff;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #1890ff;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #1890ff;
    background-color: #e6f7ff;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* 主内容区域 */
.main-content {
    flex: 1;
}

/* 欢迎区域 */
.hero-section {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-description {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 功能特色 */
.features-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 12px;
    background: #fafafa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* 系统信息 */
.info-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-card {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.info-value {
    font-size: 24px;
    font-weight: 600;
    color: #1890ff;
}

/* 页脚 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 24px 0;
}

.footer-text {
    font-size: 14px;
    opacity: 0.8;
}

/* 快速入口区域 */
.quick-access-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.access-card {
    background: white;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.access-card:hover .access-arrow {
    transform: translateX(4px);
}

.access-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: #1890ff;
}

.access-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.access-description {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
}

.access-arrow {
    font-size: 20px;
    color: #1890ff;
    transition: transform 0.3s ease;
}

/* 系统信息模态框 */
.modal-large {
    max-width: 800px;
}

.system-info-content {
    padding: 20px 0;
}

.info-section-item {
    margin-bottom: 32px;
}

.info-section-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.info-section-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.info-section-item ul {
    color: #666;
    line-height: 1.6;
    padding-left: 20px;
}

.info-section-item li {
    margin-bottom: 8px;
}

/* 系统介绍部分 */
.system-intro-section {
    padding: 80px 0;
    background: white;
}

.system-intro-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.system-intro-content .info-section-item {
    margin-bottom: 48px;
    text-align: left;
}

.system-intro-content .info-section-item:last-child {
    margin-bottom: 0;
}

.system-intro-content .info-section-item h4 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.system-intro-content .info-section-item h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #1890ff;
    border-radius: 2px;
}

.system-intro-content .info-section-item p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 24px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.system-intro-content .info-section-item ul {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}

.system-intro-content .info-section-item li {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 16px;
    padding-left: 28px;
    position: relative;
}

.system-intro-content .info-section-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #1890ff;
    font-weight: bold;
    font-size: 16px;
}

.system-intro-content .info-section-item li strong {
    color: #333;
}

/* 更新信息卡片样式 */
.info-card {
    text-align: center;
    padding: 32px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #1890ff;
}

.info-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.info-value {
    font-size: 24px;
    font-weight: 600;
    color: #1890ff;
}

/* 登录页面样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 32px 24px 24px;
    background: #f8f9fa;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
}

.login-form {
    padding: 24px;
}

.login-footer {
    padding: 16px 24px 24px;
    text-align: center;
    background: #f8f9fa;
}

.login-info {
    margin-bottom: 16px;
}

.info-text {
    font-size: 12px;
    color: #999;
}

.login-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.link {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
}

.link:hover {
    text-decoration: underline;
}

/* 修改密码模态框样式 */
#changePasswordModal .modal-content {
    max-width: 450px;
}

#changePasswordModal .form-help {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

#changePasswordModal .form-input {
    margin-bottom: 8px;
}

#changePasswordModal .form-group {
    margin-bottom: 20px;
}

/* 工具类 */
.text-center {
    text-align: center;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 统计筛选器样式 */
.statistics-filters {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group .form-label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #495057;
}

.filter-group .form-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

.filter-group .btn {
    margin-right: 10px;
}

.filter-group:last-child .btn {
    margin-right: 0;
}

/* 统计详情样式 */
.statistics-details {
    margin-bottom: 20px;
}

.statistics-list {
    margin-top: 15px;
}

.statistics-list .data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.statistics-list .data-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.statistics-list .data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.statistics-list .data-table tbody tr:hover {
    background: #f8f9fa;
}

.statistics-list .data-table tbody tr:last-child td {
    border-bottom: none;
}

.penalty-count, .penalty-score {
    color: #dc3545;
    font-weight: 500;
}

.merit-count, .merit-score {
    color: #28a745;
    font-weight: 500;
}

.total-count, .total-score {
    color: #495057;
    font-weight: 500;
}

.no-data, .error, .loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.error {
    color: #dc3545;
}

/* 图表分析按钮样式 */
.chart-actions {
    margin-bottom: 20px;
    text-align: center;
}

.chart-actions .btn {
    padding: 10px 30px;
    font-size: 16px;
}

/* 应用场景样式 */
.scenarios-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.scenario-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.scenario-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.scenario-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.scenario-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}
