/* 遗嘱起草系统样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 20px;
}

.navbar-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: #667eea;
}

/* 主内容区 */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* 卡片 */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h2 {
    color: #667eea;
    font-size: 1.5rem;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(17, 153, 142, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(235, 51, 73, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tr:hover {
    background: #f8f9fa;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-draft {
    background: #ffc107;
    color: #856404;
}

.status-pending_review {
    background: #fd7e14;
    color: white;
}

.status-completed {
    background: #28a745;
    color: white;
}

.status-signed {
    background: #17a2b8;
    color: white;
}

.status-archived {
    background: #6c757d;
    color: white;
}

/* 登录/注册页面 */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 登录方式切换 */
.login-type-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 5px;
    background: #f0f0f0;
    border-radius: 8px;
}

.switch-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.switch-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.switch-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
}

.login-form.hidden {
    display: none;
}

/* 验证码输入组 */
.code-input-group {
    display: flex;
    gap: 10px;
}

.code-input-group .form-control {
    flex: 1;
}

.send-code-btn {
    white-space: nowrap;
    padding: 12px 20px;
    min-width: 120px;
}

.send-code-btn.counting {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 步骤表单 */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px;
    transition: all 0.3s;
}

.step.active .step-number,
.step.completed .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #666;
}

.step.active .step-label,
.step.completed .step-label {
    color: #667eea;
    font-weight: 500;
}

/* 动态添加项 */
.add-item-btn {
    margin-top: 10px;
}

.item-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
}

.item-group .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 预览 */
.will-preview {
    background: #fff;
    padding: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    line-height: 2;
    font-size: 1.1rem;
}

.will-preview h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* 法律知识 */
.knowledge-item {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.knowledge-item:last-child {
    border-bottom: none;
}

.knowledge-item h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.knowledge-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.knowledge-category {
    display: inline-block;
    background: #e9ecef;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-right: 10px;
}

/* 页脚 */
.footer {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

/* 提示框 */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 响应式 - 移动端优先 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .navbar-nav {
        gap: 15px;
    }
    
    .card {
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .card-header h2 {
        font-size: 1.25rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .step-indicator {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step {
        flex: 1 1 45%;
        min-width: 80px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .table {
        display: block;
        overflow-x: auto;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .auth-card {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .will-preview {
        padding: 20px;
        font-size: 1rem;
    }
    
    .will-preview h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .step {
        flex: 1 1 100%;
    }
    
    .step-indicator {
        justify-content: center;
    }
    
    .auth-card {
        padding: 25px 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
}

/* 通用移动端优化 */
@media (max-width: 768px) {
    /* 按钮组在移动端换行 */
    .btn-group,
    .d-flex,
    .flex-wrap {
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: center !important;
    }
    
    /* 全屏按钮在移动端更好点击 */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 表单输入增强触摸区域 */
    .form-control {
        min-height: 44px;
    }
    
    /* 选择框优化 */
    select.form-control {
        -webkit-appearance: none;
        appearance: none;
        background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
        padding-right: 35px;
    }
}

/* 触摸友好的间距 */
@media (max-width: 768px) {
    /* 增加可点击区域间距 */
    a, button {
        touch-action: manipulation;
    }
    
    /* 复选框和单选框优化 */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        transform: scale(1.2);
        -webkit-transform: scale(1.2);
    }
}

/* ==================== 表单格式化样式 ==================== */

/* 格式化的输入框样式 */
.form-control.formatted {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
}

/* 带提示的输入框容器 */
.input-group {
    position: relative;
}

.input-hint {
    position: absolute;
    top: 100%;
    left: 0;
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}

/* 输入框错误样式 */
.form-control.error {
    border-color: #e74c3c !important;
    background-color: #fdf0f0 !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 错误提示文本样式 */
.input-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 4px;
    margin-bottom: 10px;
    padding-left: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-error::before {
    content: '⚠️';
    font-size: 0.9rem;
}

/* 输入框获得焦点时的样式优化 */
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* 成功验证的输入框样式 */
.form-control.success {
    border-color: #27ae60 !important;
    background-color: #f0fff4 !important;
}

/* ==================== 增强版移动端适配 ==================== */

/* 1. 小屏手机 (< 480px) 超精细优化 */
@media (max-width: 480px) {
    /* 整体文字大小 */
    html {
        font-size: 14px;
    }
    
    body {
        line-height: 1.5;
    }
    
    /* 主容器 */
    .container {
        padding: 0 12px;
    }
    
    /* 卡片优化 */
    .card {
        padding: 18px 15px;
        margin-bottom: 18px;
        border-radius: 8px;
    }
    
    /* 表单优化 */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: 16px !important; /* 防止iOS缩放 */
        padding: 12px 14px;
        border-radius: 6px;
    }
    
    /* 按钮优化 - 默认保持适中尺寸 */
    .btn {
        padding: 12px 24px;
        border-radius: 8px;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    /* 按钮全宽仅在表单和需要强调的地方使用，通过类来控制 */
    .btn-full {
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }
    
    .btn-full:last-child {
        margin-bottom: 0;
    }
    
    /* 首页按钮特殊优化 - 适中尺寸 */
    .home-buttons .btn {
        padding: 12px 32px;
        font-size: 0.95rem;
        min-height: 44px;
        width: auto;
        display: inline-block;
        margin: 0;
    }
    
    /* 小按钮保持原样 */
    .btn-sm {
        padding: 8px 16px;
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    /* 按钮组垂直排列 */
    .btn-group,
    .btn-group .btn {
        width: 100%;
        display: block;
        margin-bottom: 10px;
        border-radius: 6px;
    }
    
    /* 步骤指示器优化 */
    .step-indicator {
        gap: 8px;
        justify-content: center;
    }
    
    .step {
        flex: 1 1 100%;
        max-width: 80px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    /* 表格 */
    .data-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        border-radius: 6px;
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .data-table table {
        min-width: 100%;
        font-size: 0.85rem;
    }
    
    /* 预览页面 */
    .will-preview {
        padding: 20px 15px;
        font-size: 1rem;
        line-height: 1.8;
    }
    
    .will-preview h1 {
        font-size: 1.3rem;
    }
    
    .will-preview h3 {
        font-size: 1.1rem;
    }
    
    /* 费用项目列表 */
    .item-group {
        padding: 15px 12px;
        border-radius: 6px;
    }
    
    /* 表单行垂直布局 */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* 验证码输入 */
    .code-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .send-code-btn {
        width: 100%;
    }
}

/* 2. 中型手机 (481px - 768px) 优化 */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 18px;
    }
    
    .card {
        padding: 22px 20px;
    }
    
    .btn {
        min-height: 44px;
        padding: 11px 26px;
        font-size: 0.95rem;
    }
    
    /* 首页按钮保持更美观的尺寸 */
    .main-content .card .btn {
        padding: 11px 30px;
        font-size: 0.95rem;
    }
    
    /* 全宽按钮通过类控制 */
    .btn-full {
        width: 100%;
        display: block;
        margin-bottom: 12px;
    }
}

/* 3. 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .card {
        padding: 28px;
    }
}

/* 4. 通用移动端增强 */
@media (max-width: 768px) {
    /* 隐藏不必要的装饰元素 */
    .hidden-mobile {
        display: none !important;
    }
    
    /* 显示移动端专用元素 */
    .show-mobile {
        display: block !important;
    }
    
    /* 图片响应式 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 列表间距优化 */
    ul, ol {
        padding-left: 20px;
    }
    
    /* 选择框样式增强 */
    select {
        min-height: 44px;
        font-size: 16px;
    }
    
    /* 防止数字输入框箭头遮挡文字 */
    input[type="number"] {
        padding-right: 30px;
    }
    
    /* 滚动条优化（移动端更友好） */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.3);
        border-radius: 3px;
    }
    
    /* 焦点状态优化 */
    .form-control:focus {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    }
}

/* 5. 支付页面特殊优化 */
.payment-summary {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .payment-summary {
        padding: 18px 15px;
        margin-bottom: 20px;
    }
    
    .payment-option {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 12px;
    }
}

/* 6. 表格移动端卡片化展示（可选增强） */
.table-mobile-card {
    display: block;
    width: 100%;
}

@media (max-width: 768px) {
    .table-mobile-card thead {
        display: none;
    }
    
    .table-mobile-card tbody {
        display: block;
    }
    
    .table-mobile-card tr {
        display: block;
        background: white;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        border: 1px solid #f0f0f0;
    }
    
    .table-mobile-card td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed #eee;
    }
    
    .table-mobile-card td:last-child {
        border-bottom: none;
    }
    
    .table-mobile-card td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #667eea;
        font-size: 0.85rem;
    }
}

/* 7. 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .navbar .container {
        padding: 8px 15px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .card {
        padding: 18px;
    }
}

/* 8. 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .form-control,
    .btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 9. 无障碍访问增强 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式准备（可选） */
@media (prefers-color-scheme: dark) {
    /* 预留深色模式支持 */
}

/* 打印优化增强 */
@media print {
    /* 更多打印优化 */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .will-preview {
        font-family: "KaiTi", "STKaiti", serif;
    }
    
    /* 分页优化 */
    .will-preview {
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5 {
        page-break-after: avoid;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none !important;
    }
    
    .main-content {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .will-preview {
        border: none !important;
        padding: 20px !important;
    }
    
    body {
        background: white !important;
    }
}

/* 协议勾选框样式 */
.agreement-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 20px 0;
    font-size: 0.9rem;
}

.agreement-checkbox input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.agreement-checkbox label {
    cursor: pointer;
    line-height: 1.5;
    color: #555;
}

.agreement-checkbox a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.agreement-checkbox a:hover {
    text-decoration: underline;
}

.agreement-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: -15px;
    margin-bottom: 15px;
}

/* 协议弹窗样式 */
.agreement-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.agreement-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.agreement-modal-content {
    background: white;
    border-radius: 15px;
    width: 500px !important;
    height: 500px !important;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.agreement-modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agreement-modal-header h3 {
    color: #667eea;
    font-size: 1.5rem;
    margin: 0;
}

.agreement-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.agreement-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.agreement-modal-body {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    line-height: 1.8;
    color: #333;
    height: 0;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* 协议弹窗滚动条样式 */
.agreement-modal-body::-webkit-scrollbar {
    width: 8px;
}

.agreement-modal-body::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.agreement-modal-body::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.agreement-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.agreement-modal-body h4 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.agreement-modal-body h4:first-child {
    margin-top: 0;
}

.agreement-modal-body p {
    margin-bottom: 15px;
    text-align: justify;
}

.agreement-modal-body ul {
    margin-bottom: 15px;
    padding-left: 25px;
}

.agreement-modal-body li {
    margin-bottom: 8px;
}

.agreement-modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.agreement-modal-footer .btn {
    min-width: 100px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .agreement-modal-content {
        width: 90%;
        height: 70vh;
        min-height: 400px;
    }
    
    .agreement-modal-header {
        padding: 15px 20px;
        flex-shrink: 0;
    }
    
    .agreement-modal-body {
        padding: 20px;
    }
    
    .agreement-modal-footer {
        padding: 15px 20px;
        flex-shrink: 0;
    }
}
