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

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    min-height: 100vh;
    padding: 20px;
}

.back-home {
    display: inline-block;
    margin: 12px 0 0 12px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.9);
    color: #0984e3;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.2s;
}

.back-home:hover {
    background: #fff;
    transform: translateY(-2px);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: #2d3436;
    font-size: 26px;
    margin-bottom: 8px;
}

header p {
    color: #636e72;
    font-size: 14px;
}

.calendar-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h2 {
    color: #2d3436;
    font-size: 20px;
}

.calendar-header button {
    background: #0984e3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.calendar-header button:hover {
    background: #0770c2;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.weekdays div {
    text-align: center;
    font-weight: bold;
    color: #636e72;
    padding: 10px;
    font-size: 14px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 6px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    font-size: 16px;
    color: #2d3436;
    overflow: hidden;
}

.day-cell .day-number {
    font-weight: 500;
}

.day-cell:hover {
    background: #dfe6e9;
    transform: scale(1.05);
}

.day-cell.today {
    border-color: #0984e3;
    background: #e3f2fd;
    font-weight: bold;
}

.day-cell.selected {
    background: #0984e3;
    color: white;
    font-weight: bold;
}

.day-cell.other-month {
    color: #b2bec3;
}

.day-cell .weather-mini {
    font-size: 12px;
    margin-top: 1px;
}

.day-cell .event-tag {
    font-size: 10px;
    margin-top: 2px;
    padding: 1px 4px;
    background: #ff7675;
    color: white;
    border-radius: 4px;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-cell .rest-tag {
    font-size: 10px;
    margin-top: 1px;
    padding: 1px 4px;
    background: #74b9ff;
    color: white;
    border-radius: 4px;
}

.day-cell .holiday-tag {
    font-size: 10px;
    margin-top: 1px;
    padding: 1px 4px;
    background: #e84393;
    color: white;
    border-radius: 4px;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weather-box {
    background: #fff3cd;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #f39c12;
}

.weather-box.hidden {
    display: none;
}

.weather-box h3 {
    color: #2d3436;
    margin-bottom: 12px;
    font-size: 18px;
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 20px;
}

.weather-icon {
    font-size: 40px;
}

.advice {
    color: #2d3436;
    font-size: 16px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.event-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.event-section label {
    font-weight: bold;
    color: #2d3436;
    font-size: 14px;
}

.event-section input {
    padding: 10px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.event-section input:focus {
    border-color: #0984e3;
}

.event-section button {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    align-self: flex-start;
}

.event-section button:hover {
    background: #219150;
}

.event-display {
    background: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.event-display.hidden {
    display: none;
}

.event-display #eventText {
    color: #e17055;
    font-weight: bold;
}

.delete-btn {
    background: #ff7675;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background: #d63031;
}

.batch-box {
    background: #e8f4f8;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #0984e3;
}

.batch-box h3 {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 18px;
}

.batch-hint {
    color: #636e72;
    font-size: 14px;
    margin-bottom: 10px;
}

.batch-hint code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.batch-box textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    margin-bottom: 12px;
}

.batch-box textarea:focus {
    border-color: #0984e3;
}

.batch-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.batch-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

#batchSaveBtn {
    background: #0984e3;
    color: white;
}

#batchSaveBtn:hover {
    background: #0770c2;
}

.batch-result {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    min-height: 20px;
}

.batch-result.success {
    background: #d4edda;
    color: #155724;
}

.batch-result.warning {
    background: #fff3cd;
    color: #856404;
}

.batch-result.error {
    background: #f8d7da;
    color: #721c24;
}

.holiday-box {
    background: #fde2e4;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #e84393;
}

.holiday-box h3 {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 18px;
}

.holiday-box textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #fab1a0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    margin-bottom: 12px;
}

.holiday-box textarea:focus {
    border-color: #e84393;
}

#holidaySaveBtn {
    background: #e84393;
    color: white;
}

#holidaySaveBtn:hover {
    background: #c23685;
}

.tips {
    background: #e8f5e9;
    border-radius: 15px;
    padding: 20px;
}

.tips h3 {
    color: #27ae60;
    margin-bottom: 10px;
}

.tips ul {
    margin-left: 20px;
    color: #2d3436;
    line-height: 1.8;
}

@media (max-width: 500px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 22px;
    }

    .day-cell {
        font-size: 14px;
    }
}
