/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* 头部样式 */
header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
}

.date-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-selector input[type="date"] {
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.date-selector input[type="date"]:focus {
    outline: none;
    border-color: #3498db;
}

/* 按钮样式 */
.btn-primary, .btn-secondary, .btn-success {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

#todayBtn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    border: none;
}

/* 复制按钮样式 */
.copy-btn {
    background-color: #f39c12;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 4px;
    transition: background-color 0.3s;
}

.copy-btn:hover {
    background-color: #e67e22;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

#todayBtn:hover {
    background-color: #c0392b;
}

/* 工作表格样式 */
.work-table {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header {
    display: grid;
    grid-template-columns: 150px 1fr 120px;
    background-color: #34495e;
    color: white;
    font-weight: 600;
}

.table-header > div {
    padding: 15px;
    text-align: center;
}

.table-body {
    max-height: 600px;
    overflow-y: auto;
}

.time-row {
    display: grid;
    grid-template-columns: 150px 1fr 120px;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s;
}

.time-row:hover {
    background-color: #f8f9fa;
}

.time-cell {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #2c3e50;
}

.content-cell {
    padding: 12px 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.content-cell:hover {
    background-color: #ebf3fd;
}

.content-cell.empty {
    color: #bdc3c7;
    font-style: italic;
}

.content-cell.has-content {
    color: #2c3e50;
    background-color: #e8f5e8;
}

.action-cell {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.edit-btn, .delete-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.edit-btn {
    background-color: #f39c12;
    color: white;
}

.edit-btn:hover {
    background-color: #e67e22;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s;
}

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

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.close:hover {
    color: #e74c3c;
}

.modal h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .table-header,
    .time-row {
        grid-template-columns: 100px 1fr 80px;
    }
    
    .time-cell,
    .content-cell,
    .action-cell {
        padding: 8px;
        font-size: 13px;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-actions button {
        width: 200px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .table-header,
    .time-row {
        grid-template-columns: 80px 1fr 60px;
    }
    
    .edit-btn,
    .delete-btn {
        padding: 2px 4px;
        font-size: 10px;
    }
}

/* 滚动条样式 */
.table-body::-webkit-scrollbar {
    width: 6px;
}

.table-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-body::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}