* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a7c59; /* 豆沙绿主色调 */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f0f8f0; /* 浅豆沙绿背景 */
    --dark-color: #2c5530;
    --border-color: #a8d5ba;
    --background-color: #f5faf5; /* 豆沙绿背景 */
    --text-color: #2c5530;
    --shadow-color: rgba(74, 124, 89, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow-color);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.title-section {
    flex: 1;
}

.timetable-title {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    border: none;
    background: transparent;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
    width: 300px;
}

.timetable-title:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background: var(--dark-color);
}

.btn.secondary {
    background: var(--secondary-color);
    color: white;
}

.btn.secondary:hover {
    background: #545b62;
}

.btn.tertiary {
    background: var(--success-color);
    color: white;
}

.btn.tertiary:hover {
    background: #1e7e34;
}

.btn.danger {
    background: var(--danger-color);
    color: white;
}

.btn.danger:hover {
    background: #c82333;
}



/* PC端左右两栏布局 */
@media (min-width: 769px) {
    .main-content {
        display: flex;
        gap: 30px;
        align-items: flex-start;
    }
    
    /* 左侧栏：课时控制和科目池 */
    .left-sidebar {
        flex: 0 0 300px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* 右侧栏：课程表格 */
    .right-content {
        flex: 1;
        min-width: 0;
    }
    
    /* PC端课时控制区域 */
    .period-controls-desktop {
        display: block;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }
    
    .period-controls-desktop .period-control-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    
    .period-controls-desktop .period-control-line:last-child {
        margin-bottom: 0;
    }
    
    .period-controls-desktop span {
        font-weight: 500;
        color: #495057;
        min-width: 80px;
    }
    
    /* PC端科目池样式调整 */
    .subject-pool {
        width: 100%;
    }
    
    /* PC端隐藏fixed-top-area中的period-controls */
    .fixed-top-area .period-controls {
        display: none;
    }
}

/* 移动端保持原有布局 */
@media (max-width: 768px) {
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .left-sidebar {
        display: block;
        width: 100%;
    }
    
    .right-content {
        display: block;
        width: 100%;
    }
    
    .period-controls-desktop {
        display: none !important;
    }
}

/* PC端样式 - 保持原有布局 */
.fixed-top-area {
    position: static;
    background: transparent;
    box-shadow: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* PC端header保持原有样式 */
.fixed-top-area .header {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* PC端period-controls保持原有样式 */
.fixed-top-area .period-controls {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

/* PC端容器保持原有样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    /* 移动端表格样式优化 */
    .timetable th,
    .timetable td {
        min-width: 70px; /* 设置最小宽度确保内容可读 */
        max-width: 100px; /* 设置最大宽度防止过宽 */
        font-size: 12px; /* 减小字体大小 */
        padding: 8px 4px; /* 减小内边距 */
    }
    
    .timetable .time-header,
    .timetable .period-header {
        min-width: 60px; /* 时间和课时列更窄 */
        max-width: 80px;
    }
    
    .timetable .weekday-col,
    .timetable .weekend-col {
        min-width: 75px; /* 周一到周日列宽度 */
        max-width: 90px;
    }
    
    /* 移动端固定顶部区域 */
    .fixed-top-area {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 移动端header样式 */
    .fixed-top-area .header {
        padding: 10px 15px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid #e9ecef !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        min-height: auto !important;
    }
    
    .fixed-top-area .title-section {
        text-align: center !important;
    }
    
    .fixed-top-area .timetable-title {
        font-size: 18px !important;
        width: 100% !important;
        text-align: center !important;
        padding: 5px !important;
    }
    
    .fixed-top-area .controls {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .fixed-top-area .controls .btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        min-width: auto !important;
        flex: 0 0 auto !important;
    }
    
    /* 移动端period-controls样式 */
    .fixed-top-area .period-controls {
        margin: 0 !important;
        padding: 10px 15px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid #e9ecef !important;
        background: #f8f9fa !important;
        display: flex !important;
        justify-content: space-around !important;
        align-items: center !important;
    }
    
    .fixed-top-area .period-controls .period-control-line {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 0 !important;
        font-size: 14px !important;
    }
    
    /* 移动端容器样式 */
    .container {
        padding-top: 200px !important; /* 增加顶部间距确保科目池完全不被遮挡 */
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 移动端主内容区域样式 */
    .main-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 10px 0 0 0 !important; /* 顶部留出间距 */
    }
    
    /* 移动端科目池样式 */
    .subject-pool {
        order: 1;
        width: 100vw !important;
        margin: 0 !important;
        padding: 15px 0 0 0 !important; /* 确保顶部有足够间距 */
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex;
        flex-direction: column;
    }
    
    .timetable-container {
        order: 2;
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important; /* 改为横向滚动 */
        -webkit-overflow-scrolling: touch; /* 优化iOS滚动体验 */
    }
    
    .timetable-wrapper {
        min-width: max-content; /* 确保表格内容不被压缩 */
    }
    
    .timetable {
        min-width: max-content; /* 确保表格可以横向滚动 */
    }
}

.subject-pool {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    display: flex;
    flex-direction: column;
}

.period-controls {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.period-controls h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.period-controls .period-control-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.period-controls .period-control-line:last-child {
    margin-bottom: 0;
}

.period-controls .period-control-line span {
    color: #495057;
    font-weight: 600;
}

.period-controls .period-control-line .btn.small {
    padding: 4px 8px;
    min-width: 24px;
    height: 24px;
    font-size: 13px;
    border-radius: 4px;
    margin-left: 4px;
}

.subject-pool-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 20px 8px 20px;
        gap: 6px;
        flex-shrink: 0;
        border-bottom: 1px solid #f0f0f0;
    }

.subject-pool h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.subjects {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 0 20px 20px 20px;
        overflow-y: auto;
        flex: 1;
    }

.subject-card {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: grab;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.subject-card:active {
    cursor: grabbing;
}

.subject-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(5deg);
}

.subject-info {
    flex: 1;
}

.subject-info .subject-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 1px;
}

.subject-info .teacher-name {
    font-size: 12px;
    color: #666;
}

.subject-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.edit-btn {
    background-color: #e3f2fd;
    color: #1976d2;
}

.edit-btn:hover {
    background-color: #bbdefb;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.delete-btn {
    background-color: #ffebee;
    color: #d32f2f;
}

.delete-btn:hover {
    background-color: #ffcdd2;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.3);
}

.timetable-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.timetable {
    width: 100%;
    border-collapse: collapse;
}

.timetable th,
.timetable td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.timetable th {
    background: var(--light-color);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.time-header {
    width: 60px;
}

.period-header {
    width: 80px;
}

.section-header .section-title {
    background: #e9ecef;
    font-weight: 600;
    text-align: center;
    padding: 8px;
}

.section-controls {
    margin-bottom: 15px;
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
}

.timetable-title-section {
    text-align: center;
    margin-bottom: 20px;
}

.table-title-input {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    border: none;
    background: transparent;
    padding: 8px 16px;
    outline: none;
    transition: all 0.3s ease;
    width: 300px;
    color: #333;
}

.table-title-input:focus {
    background: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group span {
    font-weight: bold;
    min-width: 50px;
}

.btn.danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn.danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.time-cell {
    background: #d4edda;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    border-right: 1px solid var(--border-color);
    width: 40px;
    min-width: 40px;
    vertical-align: middle;
}

.vertical-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    height: 100%;
    gap: 2px;
}

.period-cell {
    background: #e8f5e9;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
}

.time-display {
    font-size: 12px;
    color: var(--secondary-color);
    margin-top: 4px;
    cursor: pointer;
}

.time-display:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.section-row {
    background: #e9ecef;
    font-weight: 600;
    text-align: center;
}

.section-row td {
    padding: 8px;
    font-size: 16px;
}

.cell {
    width: 120px;
    height: 80px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid var(--border-color);
}

.cell:hover {
    background: #f1f8f4;
}

.cell.drag-over {
    background: #d4edda;
    border: 2px dashed var(--primary-color);
}

.cell.occupied {
    cursor: default;
}

.cell-content {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    position: relative;
}

.delete-cell-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--danger-color);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
}

.cell:hover .delete-cell-btn {
    display: flex;
}

.delete-cell-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: scale(1.1);
}

.cell-content .subject-name {
    font-size: 14px;
    margin-bottom: 2px;
    text-align: center;
    line-height: 1.2;
}

.cell-content .teacher-name {
    font-size: 11px;
    opacity: 0.9;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 30px;
    min-width: 380px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.modal-content h3 {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    position: relative;
}

.modal-content h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.color-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preset-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-option:hover,
.color-option.selected {
    border-color: #333;
    transform: scale(1.1);
}

.custom-color {
    display: flex;
    gap: 10px;
    align-items: center;
}

.custom-color input[type="color"] {
    width: 50px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.custom-color input[type="text"] {
    flex: 1;
    max-width: 100px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    min-width: 80px;
    transition: background-color 0.2s;
}

.btn.primary {
    background: #007bff;
    color: white;
}

.btn.primary:hover {
    background: #0056b3;
}

.btn.secondary {
    background: #6c757d;
    color: white;
}

.btn.secondary:hover {
    background: #545b62;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 15mm 10mm;
    }
    
    /* 高级打印优化 - 强制彩色打印 */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
        box-sizing: border-box !important;
        -webkit-filter: none !important;
        filter: none !important;
    }
    
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", serif !important;
        line-height: 1.4 !important;
    }
    
    /* 隐藏控制元素 */
    .header, .subject-pool, .section-controls {
        display: none !important;
    }
    
    /* 隐藏标题区域 */
    .timetable-title-section {
        display: none !important;
    }
    
    .table-title-input {
        display: none !important;
    }
    
    /* 强化表格边框 */
    .timetable {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 0 auto !important;
        border: 2px solid #000 !important;
        font-size: 13px !important;
        table-layout: fixed !important;
        background: white !important;
    }
    
    .timetable thead {
        display: table-header-group !important;
    }
    
    /* 优化表头打印效果 */
    .timetable th {
        background: #f5f5f5 !important;
        color: #000 !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        padding: 12px 8px !important;
        text-align: center !important;
        vertical-align: middle !important;
        border: 1px solid #000 !important;
        border-bottom: 2px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .timetable th:first-child,
    .timetable th:nth-child(2) {
        background: #e8e8e8 !important;
        color: #000 !important;
    }
    
    /* 强化单元格边框 */
    .timetable td {
        border: 1px solid #000 !important;
        border-bottom: 1px solid #000 !important;
        border-right: 1px solid #000 !important;
        padding: 8px 4px !important;
        text-align: center !important;
        vertical-align: middle !important;
        background: white !important;
    }
    
    /* 确保所有边框可见 */
    .timetable tr {
        border-bottom: 1px solid #000 !important;
    }
    
    .timetable tbody tr:last-child td {
        border-bottom: 2px solid #000 !important;
    }
    
    /* 时间列样式 */
    .time-header {
        width: 50px !important;
        background: linear-gradient(135deg, #34495e, #2c3e50) !important;
        color: white !important;
        font-weight: 600 !important;
    }
    
    .period-header {
        width: 75px !important;
        background: linear-gradient(135deg, #34495e, #2c3e50) !important;
        color: white !important;
        font-weight: 600 !important;
    }
    
    /* 优化时间单元格打印 */
    .time-cell {
        width: 40px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #000 !important;
        background: #ffffff !important;
        border: 1px solid #000 !important;
        padding: 8px 4px !important;
        white-space: nowrap !important;
        line-height: 1.3 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* 优化节数单元格打印 */
    .period-cell {
        white-space: nowrap !important;
        line-height: 1.4 !important;
        background: #ffffff !important;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .period-name {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #000 !important;
        margin-bottom: 3px !important;
        white-space: nowrap !important;
    }
    
    .time-display {
        font-size: 10px !important;
        color: #333 !important;
        font-weight: 500 !important;
    }
    
    /* 强化课程单元格边框 - 支持彩色 */
    .cell {
        height: 65px !important;
        width: 105px !important;
        border: 1px solid #000 !important;
        background: white !important;
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        -webkit-filter: none !important;
        filter: none !important;
    }
    
    .cell-content {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 4px !important;
        border: 1px solid #000 !important;
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        -webkit-filter: none !important;
        filter: none !important;
    }
    
    .cell-content .subject-name {
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.4 !important;
        margin-bottom: 2px !important;
        text-align: center !important;
        color: #000 !important;
    }
    
    .cell-content .teacher-name {
        font-size: 10px !important;
        line-height: 1.3 !important;
        text-align: center !important;
        color: #333 !important;
        font-weight: 500 !important;
    }
    
    .delete-cell-btn {
        display: none !important;
    }
    
    /* 强制显示所有边框 */
    .timetable * {
        border-color: #000 !important;
    }
    
    /* 优化彩色打印模式 */
    .timetable th {
        background: #e6f3ff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        -webkit-filter: none !important;
        filter: none !important;
    }
    
    .timetable th:first-child,
    .timetable th:nth-child(2) {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        -webkit-filter: none !important;
        filter: none !important;
    }
    
    /* 周一到周五表头彩色背景 */
    .timetable th:nth-child(n+3) {
        background: #fff2e6 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        -webkit-filter: none !important;
        filter: none !important;
    }
    
    /* 优化黑白打印模式 */
    .bw-mode .timetable th {
        background: #e8e8e8 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .bw-mode .timetable td {
        border: 1px solid #000 !important;
        background: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .bw-mode .cell {
        background: white !important;
        border: 1px solid #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }



/* 移动端额外样式优化 */
@media (max-width: 768px) {
    body {
        padding-top: 0;
    }
    
    /* 确保固定顶部区域在移动端正常显示 */
    .fixed-top-area {
        width: 100%;
        max-width: 100%;
    }
    
    /* 优化移动端滚动体验 */
    .main-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 超强科目池 - 精确滚动控制 */
    .subject-pool {
        flex: 0 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        max-height: 180px !important;
        min-height: 100px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #e9ecef !important;
        background: #fff !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        overflow: hidden !important;
    }
    
    .subject-pool-header {
        flex-shrink: 0 !important;
        padding: 8px 12px !important;
        margin: 0 !important;
        border-bottom: 1px solid #f1f3f4 !important;
        background: #fafbfc !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #495057 !important;
    }
    
    .subject-cards {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 8px 12px !important;
        margin: 0 !important;
        background: #fff !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .subject-card {
        padding: 4px 8px !important;
        font-size: 12px !important;
        margin: 2px 0 !important;
        border-radius: 4px !important;
        border: 1px solid #e9ecef !important;
        background: #fff !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    .subject-card:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    /* 超强课程表容器 - 独立滚动系统 */
    .timetable-container {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
    }
    
    /* 确保表格最小宽度 */
    .timetable-wrapper {
        min-width: 100% !important;
        min-height: 100% !important;
        padding: 10px !important;
    }
    
    .timetable {
        font-size: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        width: 100% !important;
        table-layout: fixed !important;
        min-width: 100% !important;
    }
    
    .cell {
        width: 80px !important;
        height: 60px !important;
        min-width: 80px !important;
        min-height: 60px !important;
    }
    
    /* 隐藏手机端+号按钮 */
    .mobile-add-btn {
        display: none !important;
    }
    
    /* 优化标题样式 */
    .header .title-section {
        margin: 0 !important;
        flex: 1 !important;
    }
    
    .header .timetable-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: #333 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .header .controls {
        display: flex !important;
        gap: 4px !important;
        margin: 0 !important;
        flex-wrap: nowrap !important;
    }
    
    .header .controls .btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        min-width: auto !important;
    }
    
    /* 超强滚动优化系统 */
    .period-controls {
        justify-content: space-around !important;
        align-items: center !important;
        position: fixed !important;
        top: 48px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9998 !important;
        background: #f8f9fa !important;
        padding: 6px 12px !important;
        margin: 0 !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
        display: flex !important;
        height: 42px !important;
        border-bottom: 1px solid #dee2e6 !important;
        transform: translate3d(0, 0, 0) !important;
        backface-visibility: hidden !important;
        perspective: 1000px !important;
    }
    
    .period-controls .period-control-line {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
    }
    
    .period-controls .period-control-line span {
        font-size: 13px !important;
        font-weight: 500 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        color: #495057 !important;
    }
    
    .period-controls .period-control-line .btn {
        padding: 3px 8px !important;
        font-size: 13px !important;
        margin: 0 !important;
        min-width: 28px !important;
        height: 26px !important;
        line-height: 1 !important;
    }
    
    /* 超强触摸优化 */
    .subject-cards {
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #cbd5e0 #f7fafc !important;
    }
    
    .subject-cards::-webkit-scrollbar {
        width: 4px !important;
    }
    
    .subject-cards::-webkit-scrollbar-track {
        background: #f7fafc !important;
    }
    
    .subject-cards::-webkit-scrollbar-thumb {
        background: #cbd5e0 !important;
        border-radius: 2px !important;
    }
    
    .timetable-container {
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: thin !important;
        scrollbar-color: #cbd5e0 #f7fafc !important;
    }
    
    .timetable-container::-webkit-scrollbar {
        width: 4px !important;
        height: 4px !important;
    }
    
    .timetable-container::-webkit-scrollbar-track {
        background: #f7fafc !important;
    }
    
    .timetable-container::-webkit-scrollbar-thumb {
        background: #cbd5e0 !important;
        border-radius: 2px !important;
    }
    
    /* 防止iOS橡皮筋效果 */
    .container {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }
    
    /* 增强触摸目标 */
    .subject-card, .btn {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
        
        /* 课程表区域 - 强制100vw宽度，移除所有边距和滚动 */
        .timetable-container {
            order: 2;
            width: 100vw !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
            background: white;
            border-radius: 0 !important;
            box-shadow: none !important;
        }
        
        .timetable-wrapper {
            width: 100vw !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
        }
        
        /* 7列表格精确布局 - 极致压缩 */
        .timetable {
            width: 100vw !important;
            table-layout: fixed !important;
            border-collapse: collapse !important;
            margin: 0 !important;
            border-spacing: 0 !important;
            border: none !important;
            font-size: 7px !important;
        }
        
        .timetable th,
        .timetable td {
            padding: 0 !important;
            margin: 0 !important;
            border: 1px solid #ddd !important;
            box-sizing: border-box !important;
            line-height: 1 !important;
            overflow: hidden !important;
            white-space: nowrap !important;
        }
        
        /* 移除表格标题区域边距 */
        .timetable-title-section {
            margin: 0 !important;
            padding: 0 !important;
        }
        
        .table-title-input {
            margin: 0 !important;
            padding: 1px !important;
            font-size: 10px !important;
            border: none !important;
        }
        
        /* 7列精确宽度分配：时间列8% + 课时列8% + 周一到周五各16.8% */
        .timetable th:nth-child(1),
        .timetable td:nth-child(1) {
            width: 8% !important;
            min-width: 20px !important;
            max-width: 25px !important;
            font-size: 7px !important;
            padding: 0 !important;
        }
        
        .timetable th:nth-child(2),
        .timetable td:nth-child(2) {
            width: 8% !important;
            min-width: 25px !important;
            max-width: 30px !important;
            font-size: 7px !important;
            padding: 0 !important;
        }
        
        .timetable th:nth-child(n+3),
        .timetable td:nth-child(n+3) {
            width: 16.8% !important;
            min-width: 0 !important;
            padding: 0 !important;
        }
        
        /* 单元格高度压缩 */
        .cell {
            height: 35px !important;
            min-height: 35px !important;
            max-height: 35px !important;
            padding: 0 !important;
            margin: 0 !important;
            border: 1px solid #ccc !important;
            overflow: hidden !important;
        }
        
        /* 垂直文本极致压缩 */
        .vertical-text {
            font-size: 7px !important;
            padding: 0 !important;
            letter-spacing: 0 !important;
            line-height: 1 !important;
            writing-mode: vertical-rl !important;
            transform: rotate(180deg) !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
        
        /* 内容显示极致压缩 */
        .cell-content {
            font-size: 6px !important;
            padding: 0 !important;
            width: 100% !important;
            height: 100% !important;
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            align-items: center !important;
            text-align: center !important;
            line-height: 1 !important;
            overflow: hidden !important;
        }
        
        .subject-name {
            font-size: 6px !important;
            font-weight: 600 !important;
            margin: 0 !important;
            padding: 0 !important;
            line-height: 1 !important;
            word-break: break-word !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            display: -webkit-box !important;
            -webkit-line-clamp: 2 !important;
            -webkit-box-orient: vertical !important;
            max-height: 12px !important;
        }
        
        .teacher-name {
            font-size: 5px !important;
            opacity: 0.8 !important;
            margin: 0 !important;
            padding: 0 !important;
            line-height: 1 !important;
            word-break: break-word !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
            max-height: 5px !important;
        }
        
        /* 空单元格+号 */
        .cell.empty-cell,
        .cell:not(.has-subject) {
            background-color: #f5f5f5 !important;
            border: 1px dashed #bbb !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 !important;
            margin: 0 !important;
        }
        
        .plus-indicator,
        .cell:not(.has-subject):after {
            content: '+' !important;
            font-size: 10px !important;
            color: #aaa !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            line-height: 1 !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        
        /* 控制区域压缩 - 已被固定定位样式覆盖 */
        .controls {
            justify-content: center;
            gap: 2px !important;
            flex-wrap: wrap !important;
            padding: 1px !important;
        }
        
        .btn {
            padding: 2px 4px !important;
            font-size: 9px !important;
            margin: 0 !important;
        }
        
        /* 移除所有可能的溢出 */
        * {
            max-width: 100vw !important;
        }
    }
    
    /* PC端空单元格默认显示+号 */
    @media (min-width: 769px) {
        .main-content {
            display: flex;
            flex-direction: row !important;
            gap: 20px;
        }
        
        .subject-pool {
            width: 250px;
            flex-shrink: 0;
        }
        
        .timetable-container {
            flex: 1;
            margin-left: 20px;
        }
        
        .cell.empty-cell,
        .cell:not(.has-subject) {
            background-color: #f9f9f9 !important;
            border: 1px dashed #ddd !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            cursor: pointer !important;
            transition: all 0.3s ease !important;
        }
        
        .plus-indicator,
        .cell:not(.has-subject):after {
            content: '+' !important;
            font-size: 24px !important;
            color: #ccc !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            line-height: 1 !important;
        }
        
        .cell.empty-cell:hover,
        .cell:not(.has-subject):hover {
            background-color: #e9ecef !important;
        }
        
        .cell.empty-cell:hover .plus-indicator,
        .cell:not(.has-subject):hover:after {
            color: #007bff !important;
        }
    }
}

.bw-mode .cell-content {
    filter: grayscale(100%);
}

/* 时间设置弹窗 */
.time-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.time-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--primary-color);
}

/* 设置弹窗样式 */
.settings-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.settings-modal-content {
    background-color: white;
    margin: auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.settings-modal-content h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
}

.settings-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.settings-form input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.settings-form input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.settings-form input[type="checkbox"]:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.settings-form label:hover {
    color: #667eea;
    transform: translateX(2px);
}

/* 简化设置界面样式 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.settings-content {
    margin-bottom: 25px;
}

.setting-item {
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    width: 100%;
}

.setting-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #007bff;
    flex-shrink: 0;
}

.setting-text {
    flex: 1;
    margin-left: 8px;
}

.setting-text strong {
    display: block;
    font-size: 15px;
    color: #333;
    margin-bottom: 2px;
}

.setting-text small {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.settings-form .button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 移动端弹窗动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideDown {
    from { 
        opacity: 1;
        transform: translateY(0);
    }
    to { 
        opacity: 0;
        transform: translateY(20px);
    }
}

/* 教程弹窗样式优化 */
@media (max-width: 768px) {
    #tutorialModal .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 8px;
    }
    
    #tutorialModal .tutorial-content {
        padding: 0 15px 15px;
    }
    
    #tutorialModal .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    #tutorialModal .form-actions button {
        width: 100%;
        min-width: auto;
    }
    
    /* 手机端教程弹窗标题优化 */
    #tutorialModal h3 {
        font-size: 20px !important;
        text-align: center;
    }
    
    /* 手机端教程内容优化 */
    #tutorialModal .tutorial-content {
        font-size: 14px;
        line-height: 1.6;
    }
    
    #tutorialModal .tutorial-content h4 {
        font-size: 16px;
        margin-top: 20px;
    }
    
    #tutorialModal .tutorial-content ul {
        padding-left: 15px;
    }
    
    #tutorialModal .tutorial-content li {
        margin-bottom: 8px;
    }
    
    /* 手机端特色亮点区域优化 */
    #tutorialModal .tutorial-content > div[style*="linear-gradient"] {
        padding: 15px !important;
    }
    
    #tutorialModal .tutorial-content > div[style*="linear-gradient"] h4 {
        font-size: 18px !important;
        text-align: center;
    }
    
    #tutorialModal .tutorial-content > div[style*="linear-gradient"] > div {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* 手机端高级功能区域优化 */
    #tutorialModal .tutorial-content > div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* 手机端按钮优化 */
    #tutorialModal .btn.primary {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
}

/* 使用说明区域样式 */
.usage-instructions {
    background: linear-gradient(135deg, #f5faf5 0%, #e8f5e8 100%);
    padding: 60px 0;
    margin-top: 40px;
    border-top: 3px solid var(--primary-color);
}

.instructions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.instructions-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.instructions-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.instruction-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(74, 124, 89, 0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instruction-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(74, 124, 89, 0.15);
}

.instruction-section:nth-child(even) {
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf8 100%);
}

.instruction-text h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.instruction-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.instruction-text ul {
    list-style: none;
    padding: 0;
}

.instruction-text li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
}

.instruction-text li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

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

.demo-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 3px solid var(--border-color);
    transition: transform 0.3s ease;
}

.demo-image:hover {
    transform: scale(1.05);
}

.image-caption {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

.tips-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a8a69 100%);
    color: white;
    padding: 50px;
    border-radius: 20px;
    margin-top: 40px;
    box-shadow: 0 12px 40px rgba(74, 124, 89, 0.2);
}

.tips-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 600;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tip-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.tip-content h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.tip-content p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .usage-instructions {
        padding: 40px 0;
    }
    
    .instructions-container {
        padding: 0 15px;
    }
    
    .instructions-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .instructions-content {
        gap: 40px;
    }
    
    .instruction-section {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }
    
    .instruction-text h3 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .instruction-text p {
        font-size: 1rem;
    }
    
    .demo-image {
        max-width: 300px;
    }
    
    .tips-section {
        padding: 30px 20px;
        margin-top: 30px;
    }
    
    .tips-section h3 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tip-item {
        padding: 20px;
    }
    
    .tip-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .tip-content h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .tip-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .instructions-title {
        font-size: 1.8rem;
    }
    
    .instruction-section {
        padding: 20px;
    }
    
    .instruction-text h3 {
        font-size: 1.3rem;
    }
    
    .demo-image {
        max-width: 250px;
    }
    
    .tips-section {
        padding: 25px 15px;
    }
}