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

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 背景雪花效果 */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

/* 主容器 */
.container {
    position: relative;
    z-index: 100;
    padding: 20px;
    max-width: 900px;
    width: 100%;
}

/* 画架效果 */
.easel {
    position: relative;
    padding: 20px 0;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 红色蝴蝶结 */
.ribbon {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    z-index: 15;
}

.ribbon::before {
    content: '🎀';
    font-size: 80px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: ribbonFloat 3s ease-in-out infinite;
}

@keyframes ribbonFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* 卡片主体 */
.card {
    background: linear-gradient(135deg, #f5e6d3 0%, #ede0ce 100%);
    border-radius: 15px;
    padding: 50px 40px 40px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    margin-top: 30px;
}

/* 卡片边框装饰 */
.card-border {
    position: relative;
    border: 3px solid #c41e3a;
    border-radius: 10px;
    padding: 30px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
}

/* 四角装饰 */
.corner-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    font-size: 30px;
}

.corner-decoration.top-left {
    top: -5px;
    left: -5px;
}

.corner-decoration.top-left::before {
    content: '🌿';
    position: absolute;
}

.corner-decoration.top-right {
    top: -5px;
    right: -5px;
}

.corner-decoration.top-right::before {
    content: '🌿';
    position: absolute;
    transform: scaleX(-1);
}

.corner-decoration.bottom-left {
    bottom: -5px;
    left: -5px;
}

.corner-decoration.bottom-left::before {
    content: '🌿';
    position: absolute;
    transform: scaleY(-1);
}

.corner-decoration.bottom-right {
    bottom: -5px;
    right: -5px;
}

.corner-decoration.bottom-right::before {
    content: '🌿';
    position: absolute;
    transform: scale(-1);
}

/* 标题 */
.title {
    text-align: center;
    color: #c41e3a;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 2px 2px 4px rgba(196, 30, 58, 0.3);
    }
    to {
        text-shadow: 2px 2px 8px rgba(196, 30, 58, 0.6);
    }
}

/* 内容区域 */
.content {
    color: #4a3428;
    line-height: 2;
    font-size: 16px;
}

.content p {
    margin: 8px 0;
}

.greeting {
    font-weight: bold;
    margin-bottom: 15px !important;
}

.indent {
    text-indent: 2em;
}

.special {
    margin-top: 15px !important;
}

.highlight {
    color: #c41e3a;
    font-weight: bold;
}

.signature {
    text-align: right;
    margin-top: 20px !important;
    font-style: italic;
    color: #6b4e3d;
}

/* 悬浮效果 */
.card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 40px 25px 30px;
    }

    .card-border {
        padding: 20px;
    }

    .title {
        font-size: 20px;
    }

    .content {
        font-size: 14px;
        line-height: 1.8;
    }

    .ribbon {
        width: 100px;
        height: 70px;
    }

    .ribbon::before {
        font-size: 70px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 35px 20px 25px;
    }

    .card-border {
        padding: 15px;
        border-width: 2px;
    }

    .title {
        font-size: 18px;
    }

    .content {
        font-size: 13px;
    }

    .ribbon {
        width: 80px;
        height: 60px;
    }

    .ribbon::before {
        font-size: 60px;
    }

    .corner-decoration {
        width: 30px;
        height: 30px;
        font-size: 24px;
    }
}

/* ========== 背景装饰元素 ========== */

/* 背景装饰容器 */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

/* ========== 圣诞树 ========== */
.christmas-tree {
    position: absolute;
    bottom: 0;
    left: 3%;
    font-size: 250px;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    animation: treeSwayGentle 5s ease-in-out infinite;
    z-index: 3;
}

.christmas-tree::before {
    content: '🎄';
    display: block;
}

/* 树顶星星 */
.tree-star {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    animation: starTwinkle 1.5s ease-in-out infinite;
    z-index: 4;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.3) rotate(180deg);
    }
}

/* 树上的彩灯 */
.tree-lights {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tree-lights::before,
.tree-lights::after {
    content: '💡';
    position: absolute;
    font-size: 25px;
    animation: lightBlink 1.5s ease-in-out infinite;
}

.tree-lights::before {
    top: 35%;
    left: 45%;
    animation-delay: 0.3s;
}

.tree-lights::after {
    top: 55%;
    right: 40%;
    animation-delay: 0.8s;
}

/* 树装饰 */
.tree-decorations::before,
.tree-decorations::after {
    content: '🔴';
    position: absolute;
    font-size: 20px;
    animation: ornamentShine 2s ease-in-out infinite;
}

.tree-decorations::before {
    top: 40%;
    right: 42%;
    animation-delay: 0.5s;
}

.tree-decorations::after {
    top: 60%;
    left: 43%;
    animation-delay: 1s;
}

@keyframes ornamentShine {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.7;
        filter: brightness(1.5);
    }
}

@keyframes lightBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }
}

@keyframes treeSwayGentle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(1.5deg);
    }
    75% {
        transform: rotate(-1.5deg);
    }
}

/* ========== 火炉 ========== */
.fireplace {
    position: absolute;
    bottom: 20px;
    right: 5%;
    width: 280px;
    height: 220px;
    background: linear-gradient(to bottom, #8b4513 0%, #654321 100%);
    border-radius: 15px 15px 0 0;
    box-shadow:
        inset 0 -20px 40px rgba(0, 0, 0, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 3;
}

.fireplace::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #2c1810;
    border-radius: 0 0 15px 15px;
}

/* 火焰效果 */
.fire {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 70px;
    animation: fireFlicker 0.4s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 25px rgba(255, 100, 0, 0.9));
}

@keyframes fireFlicker {
    0% {
        transform: translateX(-50%) scale(1) translateY(0);
        opacity: 1;
    }
    33% {
        transform: translateX(-50%) scale(1.15) translateY(-5px);
        opacity: 0.9;
    }
    66% {
        transform: translateX(-50%) scale(0.95) translateY(-2px);
        opacity: 0.95;
    }
    100% {
        transform: translateX(-50%) scale(1.05) translateY(-3px);
        opacity: 0.92;
    }
}

/* 圣诞袜 */
.stockings {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.stocking {
    font-size: 40px;
    animation: stockingSwing 3s ease-in-out infinite;
    transform-origin: top center;
}

.stocking:nth-child(1) {
    animation-delay: 0s;
}

.stocking:nth-child(2) {
    animation-delay: 0.3s;
}

.stocking:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes stockingSwing {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

/* ========== 顶部彩灯串 ========== */
.string-lights {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 50px;
}

.light {
    width: 15px;
    height: 20px;
    background: radial-gradient(circle, #ffeb3b 0%, #ff9800 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 0 10px rgba(255, 235, 59, 0.8);
    animation: colorChange 2s ease-in-out infinite;
}

.light:nth-child(1) { animation-delay: 0s; }
.light:nth-child(2) { animation-delay: 0.25s; }
.light:nth-child(3) { animation-delay: 0.5s; }
.light:nth-child(4) { animation-delay: 0.75s; }
.light:nth-child(5) { animation-delay: 1s; }
.light:nth-child(6) { animation-delay: 1.25s; }
.light:nth-child(7) { animation-delay: 1.5s; }
.light:nth-child(8) { animation-delay: 1.75s; }

@keyframes colorChange {
    0%, 100% {
        background: radial-gradient(circle, #ffeb3b 0%, #ff9800 100%);
        box-shadow: 0 0 15px rgba(255, 235, 59, 1);
    }
    25% {
        background: radial-gradient(circle, #f44336 0%, #e91e63 100%);
        box-shadow: 0 0 15px rgba(244, 67, 54, 1);
    }
    50% {
        background: radial-gradient(circle, #4caf50 0%, #8bc34a 100%);
        box-shadow: 0 0 15px rgba(76, 175, 80, 1);
    }
    75% {
        background: radial-gradient(circle, #2196f3 0%, #03a9f4 100%);
        box-shadow: 0 0 15px rgba(33, 150, 243, 1);
    }
}

/* ========== 响应式调整 ========== */
@media (max-width: 1024px) {
    .christmas-tree {
        font-size: 180px;
    }

    .fireplace {
        width: 230px;
        height: 180px;
        right: 3%;
    }

    .fire {
        font-size: 55px;
    }

    .stocking {
        font-size: 35px;
    }
}

@media (max-width: 768px) {
    .christmas-tree {
        font-size: 100px;
    }

    .tree-star {
        font-size: 25px;
    }

    .fireplace {
        width: 200px;
        height: 140px;
    }

    .fire {
        font-size: 40px;
        bottom: 40px;
    }

    .stocking {
        font-size: 28px;
    }

    .stockings {
        gap: 10px;
    }

    .string-lights {
        padding: 0 20px;
    }

    .light {
        width: 12px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .christmas-tree {
        font-size: 70px;
    }

    .tree-star {
        font-size: 18px;
        top: -10px;
    }

    .fireplace {
        width: 150px;
        height: 110px;
    }

    .fire {
        font-size: 30px;
        bottom: 30px;
    }

    .stocking {
        font-size: 22px;
    }

    .stockings {
        top: 15px;
        gap: 8px;
    }

    .string-lights {
        display: none;
    }
}
