/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
    display: none;
}

body, html {
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    color: #fff;
}

/* 容器 */
.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 背景图片 */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 2s ease-in-out, opacity 2s ease-in-out;
    z-index: 1;
    opacity: 0; /* 初始透明度为0，等待图片加载 */
    /* 添加默认背景渐变，防止图片加载失败时显示黑色 */
    background-color: #f0f0f0;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 背景图片叠加层，增强文字可读性 */
.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15); /* 黑色半透明叠加层，降低不透明度 */
    z-index: 2;
}

/* 合并的内容区域 - 右下角布局 */
.content-panel {
    position: absolute;
    right: 40px;
    bottom: 40px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 30px;
    max-width: 500px;
    animation: fadeIn 1s ease-in-out;
}

/* 时间区域 */
.time-section {
    text-align: right;
    background: rgba(0, 0, 0, 0.15);
    padding: 20px 30px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    align-self: stretch;
}

/* 日期样式 */
.date {
    font-size: 1.6rem;
    font-weight: 200;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 5px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    opacity: 1;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 时间样式 */
.time {
    font-size: 4rem;
    font-weight: 100;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 0, 0, 0.4);
    letter-spacing: 6px;
    opacity: 1;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    width: auto;
    text-align: right;
}

/* 格言区域 */
.quote-section {
    background: rgba(0, 0, 0, 0.15);
    padding: 25px 35px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: right;
    align-self: stretch;
}

/* 格言样式 */
.quote {
    font-size: 1.4rem;
    font-weight: 200;
    line-height: 1.7;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 5px rgba(0, 0, 0, 0.3);
    font-style: italic;
    opacity: 1;
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
}

/* 作者样式 */
.author {
    font-size: 0.9rem;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 3px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 8px;
    display: block;
    text-align: right;
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 小屏幕上内容面板居中显示 */
    .content-panel {
        right: 20px;
        left: 20px;
        bottom: 20px;
        align-items: center;
        max-width: none;
    }
    
    /* 时间区域居中 */
    .time-section {
        text-align: center;
    }
    
    /* 格言区域居中 */
    .quote-section {
        text-align: center;
    }
    
    /* 日期样式 */
    .date {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    /* 时间样式 */
    .time {
        font-size: 3.5rem;
        letter-spacing: 4px;
        text-align: center;
    }
    
    /* 格言样式 */
    .quote {
        font-size: 1.3rem;
    }
    
    /* 作者样式 */
    .author {
        font-size: 0.9rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* 日期样式 */
    .date {
        font-size: 1.3rem;
    }
    
    /* 时间样式 */
    .time {
        font-size: 3rem;
        letter-spacing: 3px;
    }
    
    /* 格言样式 */
    .quote {
        font-size: 1.2rem;
    }
    
    /* 作者样式 */
    .author {
        font-size: 0.85rem;
    }
    
    /* 内容面板内边距 */
    .time-section {
        padding: 15px 20px;
    }
    
    .quote-section {
        padding: 20px 25px;
    }
}