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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.calendar-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.calendar-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

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

.nav-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.current-date h1 {
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

.current-date span {
    font-size: 18px;
    opacity: 0.9;
    margin-top: 5px;
    display: block;
}

.view-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.view-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.view-button.active,
.view-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-body {
    padding: 30px;
}

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

.weekday {
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 14px;
    padding: 10px;
}

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

.day-cell {
    aspect-ratio: 1;
    border-radius: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #f8f9fa;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.day-cell:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.day-cell.other-month {
    opacity: 0.3;
}

.day-cell.today {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    border: 2px solid #1976d2;
}

/* 今天被选中时仍然保持蓝色 */
.day-cell.today.selected {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.6) !important;
    border-color: #1976d2 !important;
    animation: todaySelectedPulse 1.5s ease-in-out infinite alternate;
}

@keyframes todaySelectedPulse {
    from {
        box-shadow: 0 6px 20px rgba(33, 150, 243, 0.6);
    }
    to {
        box-shadow: 0 8px 25px rgba(33, 150, 243, 0.8);
    }
}

/* 节假日样式 */
.day-cell.holiday {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    border: 2px solid #ee5a52;
}

.day-cell.work-day {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
    border: 2px solid #ff9800;
}

.day-cell.holiday:hover,
.day-cell.work-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* 节假日信息文字 */
.holiday-info {
    font-size: 8px;
    font-weight: 600;
    margin-top: 2px;
    text-align: center;
    line-height: 1;
    padding: 2px 3px;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    z-index: 10;
    pointer-events: none;
    user-select: none;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.holiday-rest {
    background: rgba(255, 255, 255, 0.9);
    color: #d32f2f;
    border: 1px solid #d32f2f;
}

.holiday-work {
    background: rgba(255, 255, 255, 0.9);
    color: #f57c00;
    border: 1px solid #f57c00;
}

/* 节假日选中状态 */
.day-cell.holiday.selected {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.6) !important;
    border-color: #d32f2f !important;
}

.day-cell.work-day.selected {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6) !important;
    border-color: #f57c00 !important;
}

/* 响应式节假日文字 */
@media screen and (max-width: 768px) {
    .holiday-info {
        font-size: 6px;
        padding: 1px 2px;
    }
}

@media screen and (max-width: 480px) {
    .holiday-info {
        font-size: 5px;
        margin-top: 1px;
    }
}

/* 节假日详情样式 */
.detail-item.holiday-rest {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
}

.detail-item.holiday-work {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid #ff9800;
}

.detail-item.holiday-rest .detail-label,
.detail-item.holiday-rest .detail-value {
    color: #d32f2f;
    font-weight: 600;
}

.detail-item.holiday-work .detail-label,
.detail-item.holiday-work .detail-value {
    color: #f57c00;
    font-weight: 600;
}

.day-cell.solar-term {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #333;
    font-weight: 600;
    animation: solarTermGlow 2s ease-in-out infinite alternate;
}

@keyframes solarTermGlow {
    from {
        box-shadow: 0 0 10px rgba(255, 154, 158, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 154, 158, 0.8);
    }
}

.day-number {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.lunar-date {
    font-size: 10px;
    color: #666;
    opacity: 0.8;
}

.solar-term-name {
    font-size: 8px;
    color: #000000;
    font-weight: 600;
    margin-top: 2px;
    text-align: center;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
}

.solar-term-name:hover {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.solar-term-name:active {
    transform: scale(0.95);
}

.year-view {
    padding: 30px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.month-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.month-card:hover {
    background: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.month-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.month-card .mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: 10px;
}

.month-card .mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 8px;
}

.month-card .mini-day.solar-term {
    background: #ff9a9e;
    color: white;
    font-weight: 600;
}

.solar-term-info {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.solar-term-info.show {
    opacity: 1;
    visibility: visible;
}

.solar-term-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.solar-term-info.show .solar-term-content {
    transform: scale(1);
}

.solar-term-content h3 {
    font-size: 28px;
    color: #d32f2f;
    margin-bottom: 20px;
    font-weight: 600;
}

.solar-term-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #f5f5f5;
    color: #333;
}

/* 日期信息面板 */
.date-info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 300px;
    text-align: center;
}

.date-info-panel.show {
    opacity: 1;
    visibility: visible;
}

.date-info-panel h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.date-info-panel .info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.date-info-panel .info-label {
    font-weight: 500;
    color: #666;
}

.date-info-panel .info-value {
    color: #333;
    font-weight: 500;
}

/* 悬浮返回今天按钮 */
.floating-today-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(79, 172, 254, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-today-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 172, 254, 0.6);
}

.floating-today-btn:active {
    transform: scale(0.95);
}

/* 日期信息展示模块 */
.date-info-display {
    margin: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.date-info-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.date-info-header h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.date-info-content {
    min-height: 200px;
}

.info-placeholder {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.info-placeholder p {
    margin: 10px 0;
    font-size: 16px;
}

.date-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.detail-label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.detail-value {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-align: right;
}

.detail-item.festival {
    border-left-color: #ff6b6b;
    background: #fff5f5;
}

.detail-item.solar-term {
    border-left-color: #ffa726;
    background: #fff8e1;
}

.selected-date-highlight {
    color: #ff6b6b !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

/* 选中日期的高亮样式（橙色） */
.day-cell.selected {
    background: linear-gradient(135deg, #ff9500 0%, #ff6200 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.6);
    transform: scale(1.05);
    border-color: #ff9500;
    animation: selectedDatePulse 1.5s ease-in-out infinite alternate;
}

@keyframes selectedDatePulse {
    from {
        box-shadow: 0 6px 20px rgba(255, 149, 0, 0.6);
    }
    to {
        box-shadow: 0 8px 25px rgba(255, 149, 0, 0.8);
    }
}

/* 节气动态效果样式 */
.weather-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

/* 节气名称显示 */
.solar-term-name-display {
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 24px;
    font-weight: bold;
    z-index: 1001;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* 雪花效果 */
.snowflake {
    position: absolute;
    top: -50px;
    color: white;
    font-size: 20px;
    animation: snowfall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.snowflake.heavy {
    font-size: 25px;
    animation-duration: 1s !important;
}

@keyframes snowfall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
        opacity: 0;
    }
}

/* 雨滴效果 */
.raindrop {
    position: absolute;
    top: -50px;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(74, 144, 226, 0.8));
    animation: rainfall linear infinite;
}

@keyframes rainfall {
    0% {
        transform: translateY(-50px);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px));
        opacity: 0;
    }
}

/* 闪电效果 */
.lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.8) 50%, transparent 60%);
    animation: lightning-flash 0.5s ease-in-out;
}

@keyframes lightning-flash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* 花瓣效果 */
.flower {
    position: absolute;
    top: -50px;
    font-size: 24px;
    animation: flowerfall linear infinite;
}

@keyframes flowerfall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(720deg);
        opacity: 0;
    }
}

/* 叶子效果 */
.leaf {
    position: absolute;
    top: -50px;
    font-size: 22px;
    animation: leaffall linear infinite;
}

@keyframes leaffall {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(360deg) scale(0.6);
        opacity: 0;
    }
}

/* 露珠效果 */
.dewdrop {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.8), transparent);
    border-radius: 50%;
    animation: dew-glow 2s ease-in-out infinite;
}

@keyframes dew-glow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 霜花效果 */
.frost {
    position: absolute;
    color: #e3f2fd;
    font-size: 18px;
    animation: frost-sparkle 3s ease-in-out infinite;
}

@keyframes frost-sparkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(180deg);
    }
}

/* 绿叶生长动画 */
@keyframes grow-up {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateY(-50vh) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1.2);
        opacity: 0;
    }
}

/* 阳光旋转动画 */
@keyframes sun-ray-rotate {
    0% {
        transform: rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg);
        opacity: 0.6;
    }
}

/* 热浪上升动画 */
@keyframes heat-rise {
    0% {
        transform: translateY(0) scaleX(1);
        opacity: 0;
    }
    50% {
        transform: translateY(-50vh) scaleX(1.5);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) scaleX(2);
        opacity: 0;
    }
}

/* 微风流动动画 */
@keyframes breeze-flow {
    0% {
        transform: translateX(0) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateX(50vw) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translateX(100vw) scale(0.8);
        opacity: 0;
    }
}

/* 寒风刮过动画 */
@keyframes wind-blow {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translateX(-50vw) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-100vw) rotate(360deg);
        opacity: 0;
    }
}

/* 星星闪烁动画 */
@keyframes star-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* 强化霜冻闪烁动画 */
@keyframes frost-intense {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
}

/* 春天上升动画 */
@keyframes spring-rise {
    0% {
        transform: translateY(0) scale(0.3);
        opacity: 0;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 1;
    }
}

/* 麦粒脉冲动画 */
@keyframes grain-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* 收获下落动画 */
@keyframes harvest-fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
        opacity: 0;
    }
}

/* 昼夜平分轨道动画 */
@keyframes equinox-orbit {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(100px) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(100px) rotate(-360deg);
    }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .calendar-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .calendar-header {
        padding: 20px;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .current-date h1 {
        font-size: 24px;
    }
    
    .calendar-body {
        padding: 20px;
    }
    
    .days-grid {
        gap: 5px;
    }
    
    .day-cell {
        padding: 5px;
        border-radius: 8px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .lunar-date {
        font-size: 8px;
    }
    
    .solar-term-name {
        font-size: 6px;
    }
    
    .year-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .solar-term-content {
        padding: 30px 20px;
    }
    
    .solar-term-content h3 {
        font-size: 24px;
    }
    
    .floating-today-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .date-info-panel {
        min-width: 280px;
        padding: 20px;
        margin: 20px;
    }
    
    .date-info-panel h3 {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .weekdays {
        gap: 5px;
    }
    
    .weekday {
        font-size: 12px;
        padding: 5px;
    }
    
    .days-grid {
        gap: 3px;
    }
    
    .day-cell {
        padding: 3px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .lunar-date {
        font-size: 8px;
    }
    
    .year-grid {
        grid-template-columns: 1fr;
    }
}
