* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f0f8f0;
    min-height: 100vh;
    padding: 10px;
}

.header-banner {
    max-width: 1200px;
    margin: 0 auto 10px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 100, 0, 0.15);
}

.header-banner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 100, 0, 0.1);
    overflow: hidden;
}

.header {
    background:#e74c3c;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    flex: 1;
}

.today-box {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    text-align: center;
    min-width: 80px;
}

.today-day {
    font-size: 3em;
    font-weight: bold;
    line-height: 1.2;
}

.today-weekday {
    font-size: 0.9em;
    opacity: 0.9;
}

.today-market {
    display: inline-block;
    background: #f5576c;
    color: white;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 5px;
    font-weight: bold;
}

.header-center {
    flex: 20;
    text-align: center;
	color: white;
}

.header-center h1 {
    font-size: 1.3em;
    margin-bottom: -12px;
}

.lunar-date {
    font-size: 1.1em;
    margin-bottom: 3px;
    opacity: 0.95;
}

.lunar-date-sm {
    font-size: 0.9em;
    opacity: 0.85;
}

.festival {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    margin-top: 5px;
}

.festival.solar {
    background: rgba(255, 255, 0, 0.3);
}

.festival.lunar {
    background: rgba(255, 182, 193, 0.4);
}

.festival.jieqi {
    background: rgba(135, 206, 250, 0.4);
}

.header-right {
    flex: 1;
    text-align: right;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.calendar-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #f8fff8;
    border-bottom: 1px solid #e8f5e8;
}

.calendar-nav select {
    padding: 8px 15px;
    border: 2px solid #2d8a4e;
    border-radius: 8px;
    background: white;
    color: #2d8a4e;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 15px;
}

.nav-btn {
    padding: 8px 15px;
    background: #80D637;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-btn:hover {
    background: #276749;
    transform: translateY(-2px);
}

.nav-btn.weekend {
    background: #e74c3c;
}

.nav-btn.weekend:hover {
    background: #c0392b;
}

.today-btn {
    background: #ffc107;
    color: #333;
}

.today-btn:hover {
    background: #ffb300;
}

.calendar {
    padding: 20px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    padding: 12px 8px;
    background: #2d8a4e;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    font-size: 14px;
}

.weekday.weekend {
    background: #e74c3c;
}

.calendar-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day {
    min-height: 85px;
    padding: 8px;
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: white;
    display: flex;
    flex-direction: column;
}

.day:hover {
    border-color: #2d8a4e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 138, 78, 0.2);
}

.day.empty {
    background: #f8fff8;
    cursor: default;
    border-color: #e8f5e8;
}

.day.empty:hover {
    transform: none;
    box-shadow: none;
}

.day-number {
    font-size: 1.0em;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.day.lunar-day {
    font-size: 0.75em;
    color: #666;
    margin-top: 2px;
}

.day.weekend .day-number {
    color: #e74c3c;
}

.day.weekend .lunar-day {
    color: #e74c3c;
    opacity: 0.7;
}

.day.today {
    background: #70C525;
    border-color: #2d8a4e;
}

.day.today .day-number,
.day.today .lunar-day {
    color: white;
}

.day.market-day {
    background:  #E9AFAA;
    border-color: #f5576c;
}

.day.market-day .day-number,
.day.market-day .lunar-day {
    color: #333;
}

.day.has-event {
    border-color: #ffc107;
    border-width: 3px;
}

.badge-container {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 1px;
}

.market-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #f5576c;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.6em;
    font-weight: bold;
}
.market-badgee {
    background: rgba(255, 255, 255, 0.9);
    color: #f5576c;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.6em;
    font-weight: bold;
}
.event-count {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: #ffc107;
    color: #333;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
}
.festival-tag {
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65em;
    white-space: nowrap;
    text-align: center;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 15px 20px;
    background: #f8fff8;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 5px;
}

.legend-color.market {
    background:  #E9AFAA;
}

.legend-color.weekend {
    background: #e74c3c;
}
.weekendddd {
    background: #80D637;
}
.legend-color.today {
    background: #70C525;
}

.legend-color.event {
    background: #ffc107;
}

.footer {
    text-align: center;
    padding: 15px 20px;
    background: #f8fff8;
    border-top: 1px solid #e8f5e8;
}

.admin-link {
    color: #2d8a4e;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(45, 138, 78, 0.1);
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(45, 138, 78, 0.2);
}

.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;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8fff8;
    border-radius: 10px;
    border-left: 4px solid #2d8a4e;
}

.modal-section h3 {
    margin-bottom: 12px;
    color: #2d8a4e;
    font-size: 1.1em;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #2d8a4e;
    color: white;
}

.btn-primary:hover {
    background: #276749;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e8f5e8;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: #2d8a4e;
    outline: none;
}

.event-item {
    padding: 12px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e8f5e8;
}

.event-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    border-color: #2d8a4e;
}

.event-detail img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}

#eventDetailContent {
    line-height: 1.8;
    color: #333;
}

#modalLunar {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-left,
    .header-center,
    .header-right {
        flex: none;
        width: 100%;
    }
    
    .header-right .user-info {
        justify-content: center;
    }
    
    .weekday {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .day {
        min-height: 70px;
        padding: 6px;
    }
    
    .day-number {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
}
    
    .lunar-day {
        font-size: 0.65em;
    }
    
    .calendar-nav {
        flex-wrap: wrap;
        gap: 10px;  
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .legend {
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 10% auto;
    }
}
