html, body {
    padding: 0;
    margin: 0;
    overflow: hidden;
}


/* 确保 canvas 不覆盖 #info */
canvas {
    display: block;

}


/* 以下是日历样式*/
.dynamic-clock {
    /* background: linear-gradient(135deg, #6e8efb, #a777e3);
      background: rgba(255, 255, 255, 0.15);*/

    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 42px auto;
    max-width: 500px;
    color: white;
    font-family: 'Microsoft YaHei', sans-serif;
    position: absolute;
    overflow: hidden;
    pointer-events: none;
}

.dynamic-clock::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.clock-container {
    position: relative;
    z-index: 1;
}

.year-display {
    text-align: center;
    font-size: 1.3em;
    margin-bottom: 5px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.time-section {
    text-align: center;
    margin-bottom: 15px;
}

.time-display {
    font-size: 3.5em;
    font-weight: 300;
    letter-spacing: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.time-display span {
    margin: 0 5px;
}

.colon {
    animation: pulse 1s infinite;
    position: relative;
    top: -5px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.date-section {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.date-item {
    text-align: center;
    flex: 1;
}

.date-label {
    font-size: 0.8em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.date-value {
    font-weight: 600;
}

.greeting-section {
    text-align: center;
    margin: 20px 0 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.greeting-text {
    font-size: 1.5em;
    font-weight: 500;
    margin-bottom: 8px;
}

.greeting-tip {
    font-size: 0.95em;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 15px;
}

.next-festival {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95em;
    margin-top: 10px;
}

.festival-message {
    font-weight: 600;
}

body.dark-theme .dynamic-clock {
    background: linear-gradient(135deg, #434343, #000000);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}


/*  按钮样式*/

#controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 10px;
}

button {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid #3498db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: rgba(52, 152, 219, 0.8);
}


/*    --------------图标按钮样式---- */


.weather-icon {
    transition: transform 0.3s ease;
}

.weather-icon:hover {
    transform: scale(1.1);
}


@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

#weather_info_panel {
    margin-left: 73% /* 默认横屏 */
}

/* 竖屏时 */
@media (orientation: portrait) {
    #weather_info_panel {
        margin-left: 60%;
    }
}


.ShowHeartText {
    margin-left: 41em;
    margin-top: 51em;
    position: absolute;
    writing-mode: vertical-lr;
    text-orientation: upright;
}

@media (orientation: landscape) {
    .ShowHeartText {
        margin-top: 18em;
        margin-left: 38em;
    }
}

@font-face {
    font-family: 'MyFont';
    src: url('../fonts/ygymvxs.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#holiday { /* 竖屏时 */
    margin-top: 1em;
    margin-left: 1em;
    position: absolute;
    font-family: MyFont;
    font-size: 20em;
    font-style: inherit;
    color: white;
    writing-mode: vertical-lr;
    text-orientation: upright;
}

/* 横屏时 */
@media (orientation: landscape) {
    #holiday {
        margin-top: 0.5em;
        margin-left: 2.8em;
        font-size: 10em;
    }
}

.everyInfo {

    font-family: MyFont;
    font-style: italic;
    font-size: 23px;
    color: #d4d4d4;

}

#everyInfo2 {

    font-family: MyFont;
    font-style: italic;
    font-size: 23px;
    color: #D4D4D4FF;


}
