/* 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(90deg, #0f2f4f 0%, #1e4d7b 50%, #2d6ca8 100%);
    color: #ffffff;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* 头部主区域：左右两栏 */
.header-nav-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 28px 30px;
}

.header-nav-left {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.header-nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

/* 品牌标识 */
.brand-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.14) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    border: 2px solid rgba(255, 255, 255, 0.7);
    /* 与下方系统按钮一致的“凸起按键”厚底边 */
    border-bottom: 4px solid rgba(0, 0, 0, 0.28);
    border-radius: 16px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.16);
    flex-shrink: 0;
}

.brand-badge:hover {
    border-color: rgba(255, 255, 255, 0.6);
    border-bottom-color: rgba(0, 0, 0, 0.28);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 6px rgba(0, 0, 0, 0.16);
}

.brand-badge:active {
    transform: translateY(3px) scale(1);
    border-bottom-width: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 3px rgba(0, 0, 0, 0.22);
}

.brand-badge-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-badge-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-name {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 40%, #e0e7ff 70%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.brand-slogan {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
    color: #e0e7ff;
    letter-spacing: 0.5px;
}

/* 分隔线 */
.header-divider {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    flex-shrink: 0;
}

/* 当前系统信息 */
.current-system {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.system-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.system-icon svg {
    width: 22px;
    height: 22px;
}

.system-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.system-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.5px;
    /* 金色渐变标题：与下方白色按钮明显区分 */
    color: #ffd86b;
    background: linear-gradient(135deg, #fff4d6 0%, #ffd86b 35%, #ffc83d 60%, #ffe9a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
    margin: 0;
}

.system-subtitle {
    font-size: 15px;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.4;
    color: #ffffff;
}

/* 系统跳转按钮 */
.nav-system-buttons {
    display: flex;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    justify-content: flex-end;
}

.nav-system-btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    /* 更亮、更实的填充：在深蓝背景上明确读作“可点按键” */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.24) 100%);
    backdrop-filter: blur(8px) saturate(160%);
    border: 2px solid rgba(255, 255, 255, 0.7);
    /* 底边加深做出立体凸起的按键厚度 */
    border-bottom: 4px solid rgba(0, 0, 0, 0.28);
    border-radius: 14px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -3px 6px rgba(0, 0, 0, 0.16);
}

.nav-system-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-system-btn:hover::before {
    left: 100%;
}

.nav-system-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.20) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow:
        0 14px 26px rgba(0, 0, 0, 0.40),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -3px 6px rgba(0, 0, 0, 0.16);
    color: #ffffff;
}

.nav-system-btn:active {
    transform: translateY(3px);
    /* 按下时底边变薄、阴影收紧，像真实按键被压下去 */
    border-bottom-width: 1px;
    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 3px rgba(0, 0, 0, 0.22);
}

.nav-system-generate:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.5);
}

.nav-system-convert:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

.nav-system-transcribe:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
}

.nav-system-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.nav-system-icon svg {
    width: 20px;
    height: 20px;
}

.nav-system-btn:hover .nav-system-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-system-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    min-width: 0;
}

.nav-system-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.nav-system-desc {
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.4;
    font-weight: 400;
}

.nav-system-arrow {
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-system-arrow svg {
    width: 18px;
    height: 18px;
}

.nav-system-btn:hover .nav-system-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* 新增：使用步骤说明区域 */
.header-subtitle {
    text-align: center;
    padding: 15px 30px 20px;
}

.header-subtitle p {
    font-size: 0.95em;
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

/* 保留原有的header h1和header p样式以防万一 */
.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;
}

.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;
}

/* ===== 响应式设计 ===== */

/* 平板设备 (768px - 1200px) */
/* 单行容不下品牌+标题+三个按钮时改为竖排（按钮整行铺开） */
@media (max-width: 1500px) {
    .header-nav-content {
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
    }

    .header-nav-left {
        justify-content: flex-start;
    }

    .header-nav-right {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-system-buttons {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-system-btn {
        flex: 1 1 0;
        max-width: none;
    }
}

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* 移动设备 (最大 768px) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header-nav-content {
        padding: 20px;
        gap: 18px;
    }

    .header-nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .header-divider {
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    }

    .brand-name {
        font-size: 20px;
    }

    .brand-slogan {
        font-size: 12px;
    }

    .system-title {
        font-size: 24px;
    }

    .system-subtitle {
        font-size: 14px;
    }

    .nav-system-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .nav-system-btn {
        flex: 1 1 auto;
        width: 100%;
        padding: 12px 16px;
    }

    .nav-system-title {
        font-size: 15px;
    }

    .nav-system-desc {
        font-size: 12px;
    }

    .header-subtitle {
        padding: 12px 20px 15px;
    }

    .header-subtitle p {
        font-size: 0.85em;
    }

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

    .left-panel,
    .right-panel {
        padding: 20px;
        max-height: none;
    }

    .left-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }

    .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;
    }
}

/* 超小设备 (最大 480px) */
@media (max-width: 480px) {
    .brand-badge {
        padding: 10px 16px;
    }

    .brand-badge-icon,
    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .brand-name {
        font-size: 18px;
    }

    .brand-slogan {
        font-size: 11px;
    }

    .system-title {
        font-size: 22px;
    }

    .system-subtitle {
        font-size: 13px;
    }

    .nav-system-btn {
        padding: 12px 14px;
        gap: 10px;
    }

    .nav-system-title {
        font-size: 14px;
    }

    .nav-system-desc {
        font-size: 11px;
    }

    .header-subtitle p {
        font-size: 0.8em;
    }
}

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

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

    .header,
    .header-top,
    .header-subtitle,
    .header-nav,
    .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;
    }
}