@charset "utf-8";

/* すべての要素に適用 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== 全体 ===== */
body {
    margin: 0;
    background: #0b1d2a;
    overflow: hidden;
}


.aspect-16-9 {
    position: relative;
    width: 100%;
    max-width: 100vw;
    aspect-ratio: 16 / 9;
    margin: 150px auto 0;
    background: #0b1d2a;
    overflow: hidden;
}


.safe-area {
    position: absolute;
    inset: 10% 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0px;
}



/* ===== 雪 ===== */
.snow {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    animation: snow 10s linear infinite;
    pointer-events: none;

}

@keyframes snow {
    from {
        background-position: 0 0, 0 0;
    }

    to {
        background-position: 0 500px, 0 1000px;
    }
}

/* ===== テキスト ===== */
.xmas-text {
    font-size: 1.15rem;
    margin-top: .25rem;
    color: #fff;
    text-align: center;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 5px #fff;
    }

    50% {
        text-shadow: 0 0 20px #ff3, 0 0 40px #f00;
    }
}

/* ===== ツリー ===== */
.tree {
    width: 200px;
    text-align: center;
}

.star {
    font-size: 1.5rem;
    color: gold;
    animation: twinkle 2s infinite;
}

.leaf {
    margin: -20px auto;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 80px solid #2e7d32;
}

.leaf1 {
    border-bottom-width: 35px;
}

.leaf2 {
    border-bottom-width: 45px;
}

.leaf3 {
    border-bottom-width: 55px;
}

.trunk {
    width: 20px;
    height: 30px;
    background: #6d4c41;
    margin: 0 auto;
}

@keyframes twinkle {
    50% {
        opacity: 0.5;
    }
}

/* ===== ボタン ===== */
.xmas-btn {
    padding: .35rem .65rem;
    background: #c62828;
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    margin: .75rem 0 .35rem;
    font-size: 1rem;
}

.xmas-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px #ffeb3b;
}


/* メッセージ */
.xmas-message {
    position: absolute;
    bottom: 12%;
    left: 50%;
    width: 80%;
    max-width: 400px;
    transform: translateX(-50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    color: #c62828;
    padding: 16px 20px;
    border-radius: 20px;
    font-size: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s, transform 0.5s;
    z-index: 1000;
}

/* 表示状態 */
.xmas-message.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}


/* プレゼント */
.gift {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    animation: burst 1.2s ease-out forwards;
}

/* 弾ける動き */
@keyframes burst {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(1.2);
        opacity: 0;
    }
}