* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

header {
    background: #4a6fc7;
    color: white;
    padding: 12px;
    text-align: center;
    flex-shrink: 0;
}

h1 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.header-note {
    font-size: 0.8rem;
    color: #ffffff;
    margin-top: 4px;
    text-align: center;
}

#export-content .header-note {
    font-size: 0.8rem;
    color: #4a6fc7; /* 与导出内容的 h2 颜色一致 */
    margin-top: 4px;
    margin-bottom: 10px; /* 与 h2 的间距保持一致 */
    text-align: center;
}

.table-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 8px;
}

.days-header {
    display: grid;
    grid-template-columns: 90px repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.day-cell {
    text-align: center;
    padding: 8px 2px;
    font-weight: 600;
    font-size: 0.75rem;
    background-color: #f5f7fa;
    border-radius: 4px;
}

.name-header {
    padding: 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    background-color: #f5f7fa;
    border-radius: 4px;
}

.rows-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.schedule-row {
    display: grid;
    grid-template-columns: 90px repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.name-cell {
    display: flex;
    align-items: center;
    padding: 0 8px;
    background-color: #f0f5ff;
    border-radius: 4px;
    font-weight: 600;
}

.name-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 0.85rem;
    background: transparent;
}

.checkbox-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.checkbox-cell input {
    display: none;
}

.checkbox-cell label {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 2px solid #4a6fc7;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-cell input:checked + label {
    background-color: #4a6fc7;
    border-color: #4a6fc7;
}

.checkbox-cell input:checked + label::after {
    content: "✓";
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-weight: bold;
    font-size: 14px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    flex-shrink: 0;
}

.el-button {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    white-space: nowrap;
}

/* 小屏幕设备优化 */
@media (max-width: 380px) {
    .days-header,
    .schedule-row {
        grid-template-columns: 80px repeat(7, 1fr);
    }
    
    .name-header,
    .name-cell {
        padding: 8px 6px;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    .day-cell {
        font-size: 0.7rem;
        padding: 8px 1px;
    }
    
    .checkbox-cell label {
        width: 24px;
        height: 24px;
    }
    
    .el-button {
        padding: 12px 6px;
        font-size: 0.9rem;
    }
    
    .header-note {
        font-size: 0.7rem;
    }
    
    #export-content .header-note {
        font-size: 0.7rem;
    }
}

@media (max-width: 340px) {
    .days-header,
    .schedule-row {
        grid-template-columns: 70px repeat(7, 1fr);
    }
    
    .name-input {
        padding: 6px;
        font-size: 0.8rem;
    }
    
    .day-cell {
        font-size: 0.65rem;
    }
    
    .el-button {
        padding: 10px 4px;
        font-size: 0.85rem;
    }
    
    .header-note {
        font-size: 0.65rem;
    }
    
    #export-content .header-note {
        font-size: 0.65rem;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        height: auto;
        min-height: 100%;
    }
    
    .rows-container {
        max-height: 180px;
    }
}

/* 导出表格样式 */
.export-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.export-table th, 
.export-table td {
    padding: 10px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.export-table th {
    background-color: #f5f7fa;
    font-weight: bold;
}

.export-table .name-cell {
    text-align: left;
    background-color: #f0f5ff;
    font-weight: bold;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}