/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
}

/* ========== 管理页面样式 ========== */
.admin-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.admin-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.input-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.input-section label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
}

#homeworkInput {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.3s;
}

#homeworkInput:focus {
    outline: none;
    border-color: #4CAF50;
}

.status-message {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
}

/* 预览区域 */
.preview-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
}

.preview-frame {
    width: 800px;
    height: 480px;
    border: 3px solid #333;
    margin: 0 auto;
    background: white;
    overflow: hidden;
    position: relative;
}

/* ========== 展示页面样式 ========== */
.display-container {
    width: 800px;
    height: 480px;
    margin: 0 auto;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.date-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 6px 0;
    font-size: 17px;
    font-weight: bold;
    flex-shrink: 0;
}

.subjects-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    padding: 6px;
    gap: 6px;
    overflow: hidden;
}

.subject-card {
    flex: 1;
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.subject-card.chinese {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-top: 3px solid #e53935;
}

.subject-card.math {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-top: 3px solid #1e88e5;
}

.subject-card.english {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-top: 3px solid #43a047;
}

.subject-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 3px;
    flex-shrink: 0;
    text-align: center;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.subject-card.chinese .subject-title {
    color: #c62828;
}

.subject-card.math .subject-title {
    color: #1565c0;
}

.subject-card.english .subject-title {
    color: #2e7d32;
}

.subject-content {
    flex: 1;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
}

/* 字体大小自适应类 - 增大字体 */
.font-size-xl { font-size: 20px; }
.font-size-lg { font-size: 18px; }
.font-size-md { font-size: 16px; }
.font-size-sm { font-size: 15px; }
.font-size-xs { font-size: 14px; }

/* 空状态 */
.empty-state {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* 滚动条样式 */
.subject-content::-webkit-scrollbar {
    width: 3px;
}

.subject-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 2px;
}

.subject-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
}

.subject-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* 隐藏某科目时的样式 */
.subject-card.hidden {
    display: none;
}

/* 响应式设计 - 用于管理页面预览 */
@media (max-width: 850px) {
    .preview-frame {
        width: 100%;
        height: auto;
        aspect-ratio: 800 / 480;
    }
}
