/* 头部 - Apple 风格 */
header {
    text-align: center;
    padding: 40px 20px 36px;
    max-width: 1100px;
    margin: 0 auto;
}

.header-intro {
    max-width: 800px;
    margin: 16px auto 0;
    text-align: center;
}

.header-intro p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.header-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 16px;
}

.header-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 980px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.header-features span:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.header-features span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--primary);
    border-radius: 22px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.25);
}

.logo svg {
    width: 36px;
    height: 36px;
    color: white;
}

header h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0;
    line-height: 1.1;
}

.header-tagline {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary) 0%, #5ac8fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    margin: 0 0 16px 0;
    line-height: 1.1;
}

header p:not(.header-tagline) {
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 主网格 - 使用 flex 布局，左侧可拖拽调整宽度 */
.main-grid {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.main-grid .left-column {
    width: var(--left-column-width, 400px);
    min-width: 320px;
    max-width: 50%;
    flex-shrink: 0;
}

.main-grid .preview-area {
    flex: 1;
    min-width: 400px;
}

/* 大屏幕 (≥1600px) */
@media (min-width: 1600px) {
    .main-grid .left-column {
        width: var(--left-column-width, 450px);
    }
}

/* 中等屏幕 (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .main-grid .left-column {
        width: var(--left-column-width, 400px);
    }
}

/* 小屏幕桌面 (1025px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
    .main-grid .left-column {
        width: var(--left-column-width, 360px);
        min-width: 300px;
    }
    .main-grid .preview-area {
        min-width: 350px;
    }
}

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

.left-column .card:first-child {
    flex: 0 0 auto;
}

.left-column .card:last-child {
    padding-bottom: 0;
    flex: 1 1 auto;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

/* 列宽拖拽调整 - 位于两列间隔中间 */
.column-resizer {
    width: 16px;
    margin: 0 -8px;
    background: transparent;
    cursor: col-resize;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.column-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 48px;
    background: var(--border);
    border-radius: 2px;
    opacity: 0;
    transition: all 0.2s ease;
}

.column-resizer:hover::after {
    opacity: 1;
    height: 80px;
    background: var(--primary-light);
}

.column-resizer.dragging::after {
    opacity: 1;
    height: 100%;
    background: var(--primary);
}

/* 禁止拖拽时选中文字 */
body.resizing {
    user-select: none;
    cursor: col-resize;
}

body.resizing * {
    cursor: col-resize !important;
}

/* 历史记录侧边栏（大屏幕显示） */
.history-sidebar {
    display: none;
    flex-direction: column;
}

.history-sidebar .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 平板及以下 (≤1024px) - 单栏布局 */
@media (max-width: 1024px) {
    .main-grid {
        flex-direction: column;
        gap: 20px;
    }

    .main-grid .left-column {
        width: 100% !important;
        max-width: 100%;
        min-width: auto;
    }

    .main-grid .preview-area {
        min-width: auto;
        width: 100%;
    }

    .column-resizer {
        display: none;
    }
}

/* 卡片 */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: none;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 中大屏幕卡片优化 */
@media (min-width: 1400px) {
    .card {
        padding: 24px;
    }
}

/* 大屏幕卡片优化 */
@media (min-width: 1600px) {
    .card {
        padding: 26px;
    }
}

/* 超大屏幕卡片优化 */
@media (min-width: 1920px) {
    .card {
        padding: 28px;
    }
}

.card:hover {
    transform: scale(1.005);
    box-shadow: var(--shadow-lg);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.card-title .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-title .icon svg {
    width: 18px;
    height: 18px;
}
