/* static/css/base.css - 基础样式和布局 */

/* CSS变量定义 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #95a5a6;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;

    --text-primary: #2c3e50;
    --text-secondary: #666;
    --text-muted: #999;

    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-light: #fafafa;

    --border-color: #ddd;
    --border-light: #eee;
    --border-primary: #3498db;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.1);

    --border-radius: 6px;
    --border-radius-lg: 12px;
    --border-radius-xl: 15px;

    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

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

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* 主容器 */
.container {
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* 头部区域 */
.header {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* 主内容区域 */
.main-content {
    display: flex;
    min-height: 700px;
}

.left-panel {
    flex: 1.2;
    padding: 30px;
    border-right: 1px solid var(--border-light);
    background: var(--bg-light);
    max-height: 140vh;
    overflow-y: auto;
}

.right-panel {
    flex: 1;
    padding: 30px;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

/* 表单区域基础样式 */
.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

/* 预览区域基础样式 */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.preview-area {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Times New Roman', serif;
    line-height: 1.6;
}

/* 工具类 */
.hidden {
    display: none !important;
}

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

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

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

.no-indent {
    text-indent: 0 !important;
}

.right-align {
    text-align: right;
    text-indent: 0;
    margin-top: 40px;
}

.required {
    color: var(--danger-color);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 打印样式 */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .header,
    .left-panel,
    .preview-header,
    .preview-controls {
        display: none;
    }

    .main-content {
        flex-direction: column;
    }

    .right-panel {
        padding: 0;
    }

    .preview-area {
        border: none;
        background: white;
        padding: 0;
    }
}

.agreement-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    color: #856404;
    text-align: center;
}

.agreement-notice p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}


        .footer {
            background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
            color: #ecf0f1;
            padding: 2rem 1.5rem;
            border-top: 3px solid #3498db;
        }

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

        /* 四栏并排布局 - 左边3栏占2/3,右边1栏占1/3 */
        .footer-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 2fr;
            gap: 2rem;
            align-items: start;
        }

        /* 链接栏样式 */
        .footer-column h5 {
            color: #fff;
            font-size: 0.95rem;
            font-weight: 600;
            margin: 0 0 0.75rem 0;
            padding-bottom: 0.4rem;
            border-bottom: 2px solid #3498db;
        }

        .footer-column a {
            display: block;
            color: #bdc3c7;
            text-decoration: none;
            padding: 0.3rem 0;
            font-size: 0.875rem;
            transition: all 0.2s ease;
        }

        .footer-column a:hover {
            color: #3498db;
            padding-left: 6px;
        }

        /* 版权信息栏样式 */
        .footer-info {
            font-size: 0.85rem;
            line-height: 1.8;
            color: #95a5a6;
        }

        .footer-info h5 {
            color: #fff;
            font-size: 0.95rem;
            font-weight: 600;
            margin: 0 0 0.75rem 0;
            padding-bottom: 0.4rem;
            border-bottom: 2px solid #3498db;
        }

        .footer-info p {
            margin: 0.4rem 0;
        }

        .footer-info strong {
            color: #fff;
        }

        .footer-info a {
            color: #3498db;
            text-decoration: none;
            transition: all 0.2s ease;
        }

        .footer-info a:hover {
            color: #5dade2;
            text-decoration: underline;
        }

        /* 响应式 - 移动端变为垂直布局 */
        @media (max-width: 992px) {
            .footer-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1.5rem;
            }
        }

        @media (max-width: 576px) {
            .footer {
                padding: 1.5rem 1rem;
            }

            .footer-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .footer-column,
            .footer-info {
                text-align: center;
            }

            .footer-column a:hover {
                padding-left: 0;
            }

            .footer-info {
                font-size: 0.8rem;
            }
        }