body {
    margin: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a081a 0%, #050209 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    cursor: pointer;
    user-select: none;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    transition: background 1.5s ease;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: opacity 1s ease;
}


/* Khung chứa bức thư tình */

#love-letter {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 440px;
    background: rgba(255, 245, 247, 0.98);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(255, 20, 147, 0.2);
    border: 2px solid #ffb6c1;
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#love-letter.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.letter-title {
    color: #ff1493;
    font-size: 22px;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    border-bottom: 1px dashed #ffb6c1;
    padding-bottom: 10px;
}

.letter-content {
    color: #4a3b40;
    font-size: 15px;
    line-height: 1.7;
    min-height: 120px;
    white-space: pre-line;
}


/* Khu vực chứa 2 nút bấm lựa chọn */

.btn-group {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
}

.btn {
    padding: 10px 28px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-accept {
    background: linear-gradient(45deg, #ff1493, #ff69b4);
    color: white;
}

.btn-accept:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.4);
}

.btn-reject {
    background: #757575;
    color: white;
}

.btn-reject:hover {
    background: #424242;
    transform: scale(1.05);
}

#hint-text {
    position: absolute;
    color: rgba(255, 182, 193, 0.6);
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    bottom: 40px;
    z-index: 3;
    pointer-events: none;
    animation: breathe 2s infinite alternate;
}

@keyframes breathe {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.heart-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #ff69b4;
    animation: heart-pop 0.8s ease-out forwards;
}

@keyframes heart-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.heart-animation.reject {
    color: #757575;
}

.heart-animation.reject {
    animation: heart-pop-reject 0.8s ease-out forwards;
}

@keyframes heart-pop-reject {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}