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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

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

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

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #218838;
}

.action-btn.import-btn {
    background: #17a2b8;
}

.action-btn.import-btn:hover {
    background: #138496;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.header h1 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.nav-btn {
    background: #007bff;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #0056b3;
}

.calendar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.weekday {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: #495057;
    border-right: 1px solid #dee2e6;
}

.weekday:last-child {
    border-right: none;
}

.days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #dee2e6;
}

.day {
    background: white;
    min-height: 180px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.day:hover {
    background: #f8f9fa;
}

.day.other-month {
    color: #ccc;
    background: #f8f9fa;
}

.day.today {
    background: #e3f2fd;
}

.day.today:hover {
    background: #bbdefb;
}

.day-number {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.day-notes {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-note {
    font-size: 12px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    background: #007bff;
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.text-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.note-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.note-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.style-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.font-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
    min-width: 100px;
}

.size-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
    min-width: 70px;
}

.color-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
    min-width: 70px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.save-btn, .cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.save-btn {
    background: #28a745;
    color: white;
}

.save-btn:hover {
    background: #218838;
}

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

.cancel-btn:hover {
    background: #5a6268;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 10px 15px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .day {
        min-height: 140px;
        padding: 8px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .day-note {
        font-size: 11px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .style-controls {
        justify-content: space-between;
    }
}