/* 主要内容区域 */
.main-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 1px;
}

.converter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.converter-header h2 {
    font-size: 28px;
    color: #333;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.button-group .btn {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

/* 工作台容器 - 设置合适高度避免滚动条 */
.converter-workbench {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    height: 85vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* 转换器容器 - 默认双列布局，设置最大高度 */
.converter-container {
    display: grid;
    grid-template-columns: minmax(400px, 1fr) minmax(400px, 1fr);
    gap: 30px;
    height: 80vh;
    min-height: 600px;
    flex: 1;
}

/* 首页单列布局 - 自适应高度 */
.converter-container.home-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 1200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px;
    overflow-y: auto;
}

/* 输入和预览区域 */
.input-section, .preview-section {
    display: flex;
    flex-direction: column;
}

.input-section h3, .preview-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.input-info, .preview-info {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 预览区域样式 */
.preview-content {
    height: 550px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: auto;
    background: #fafafa;
    min-width: 0;
}

/* 防止pandoc生成的HTML内容撑宽容器 */
.preview-content * {
    max-width: 100%;
    word-wrap: break-word;
}

.preview-content pre,
.preview-content code {
    white-space: pre-wrap;
    word-break: break-all;
}

.preview-content table {
    width: 100%;
    table-layout: fixed;
    word-break: break-all;
}

.preview-placeholder {
    text-align: center;
    color: #999;
    padding: 60px 20px;
}

.preview-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 网格布局 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-grid-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 定价卡片布局 */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 管理员面板样式 */
.admin-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.admin-content {
    padding: 0;
}

.admin-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

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

/* 卡片详细信息布局 */
.card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.card-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.card-detail-item:last-child {
    border-bottom: none;
}

.card-detail-label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.card-detail-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* 操作步骤布局 */
.operation-steps {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.operation-steps .step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.operation-steps .step:hover {
    background: #e9ecef;
}

.step-number {
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}