/* Diadaptasi untuk dikadoin.id dari ViktorHadzhiyanev/Valentines-Day-Surprise (MIT License) */
/* Palet: bright pastel v2 dikadoin.id */

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

/* Mobile flicker fix */
html {
    -webkit-tap-highlight-color: transparent;
    -webkit-overflow-scrolling: touch;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, #ffedf4 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, #ffd6e4 0%, transparent 45%),
        linear-gradient(135deg, #fffafc 0%, #ffedf4 60%, #ffe9f1 100%);
    font-family: 'Georgia', 'Times New Roman', serif;
    overflow: hidden;
    position: relative;
    /* Hardware acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

body::before {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M26 35.5C17.6 35.5 4 29.5 4 17.5 4 9.5 11.7 3 21.5 3c5.1 0 8.7 2.5 11.5 6 2.8-3.5 6.4-6 11.5-6C40.3 3 48 9.5 48 17.5c0 12-13.6 18-22 18z' fill='%23ff8fab' fill-opacity='0.08' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

/* Badge branding dikadoin.id */
.brand-badge {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 50;
    background: #f78fb3;
    color: #fff;
    font-family: 'Arial', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(247, 143, 179, 0.35);
    pointer-events: none;
    user-select: none;
}

/* Frame pastel dekoratif */
.frame {
    position: fixed;
    inset: 12px;
    z-index: 1;
    border: 3px solid #ffafcc;
    border-radius: 24px;
    pointer-events: none;
    box-shadow: inset 0 0 0 2px #ffedf4;
}

/* Watermark diagonal — di bawah teks sinematik agar tidak menutupinya */
.watermark {
    position: fixed;
    inset: -40%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 70px 90px;
    transform: rotate(-28deg);
    user-select: none;
}

.watermark span {
    font-family: 'Arial', sans-serif;
    font-size: 1.4rem;
    font-weight: bold;
    color: #f76b9c;
    opacity: 0.12;
    white-space: nowrap;
}

.love-particle {
    position: absolute;
    font-size: 24px;
    opacity: 0;
    animation: float 6s linear infinite;
    will-change: transform;
    -webkit-font-smoothing: subpixel-antialiased;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

.message-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #b5657f;
    width: 86%;
    max-width: 800px;
    z-index: 10;
}

.message {
    opacity: 0;
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 2.5rem;
    text-shadow: 0 0 18px rgba(255, 143, 171, 0.45);
    transform: translateY(50px);
    transition: all 1.5s ease-in-out;
    will-change: transform, opacity;
}

.message.active {
    opacity: 1;
    transform: translateY(0);
}

.message.exit {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
}

.final-question {
    display: none;
    opacity: 0;
    transform: scale(0.5);
    animation: reveal 1s forwards;
}

.final-question h2 {
    color: #b5657f;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.final-question p {
    color: #b5657f;
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.btn-group {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.valentine-btn {
    padding: 1rem 2rem;
    font-size: 1.4rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Arial', sans-serif;
}

.yes-btn {
    background: #f76b9c;
    color: white;
}

.no-btn {
    background: #ffb3c9;
    color: #b5657f;
}

.valentine-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(247, 107, 156, 0.45);
}

.valentine-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.celebration {
    position: fixed;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.heart-burst {
    position: absolute;
    font-size: 2rem;
    animation: burst 1s ease-out forwards;
    will-change: transform;
}

@keyframes burst {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(5); opacity: 0; }
}

/* Tombol kecil simulasi tier */
.tier-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    background: #ffedf4;
    color: #b5657f;
    border: 2px solid #ffafcc;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-family: 'Arial', sans-serif;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(247, 143, 179, 0.25);
}

.tier-toggle:hover {
    background: #ffd6e4;
}

/* Ringan untuk HP kentang */
@media (max-width: 600px) {
    .message {
        font-size: 1.55rem;
    }
    .final-question h2 {
        font-size: 1.5rem;
    }
    .valentine-btn {
        font-size: 1.05rem;
        padding: 0.8rem 1.5rem;
    }
    .frame {
        inset: 8px;
        border-radius: 18px;
    }
}
