/* ===========================================
   For Eyen 💗
   Light Pink Theme + Love Pattern Overlay
=========================================== */

:root {
    --pink: #ff4d88;
    --pink-light: #ff77aa;
    --pink-soft: #ff8fbf;
    --pink-bg-1: #ffdce9;
    --pink-bg-2: #fff0f6;
    --bg-card: rgba(255, 255, 255, .6);
    --border-card: rgba(255, 77, 136, .25);
    --text: #5c2438;
    --text-strong: #4a1b2c;
    --text-dim: #8a5570;
    --shadow-soft: 0 15px 45px rgba(255, 77, 136, .2);
    --shadow-pink: 0 10px 40px rgba(255, 77, 136, .35);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, var(--pink-bg-1), var(--pink-bg-2), #ffe4ee, var(--pink-bg-2), var(--pink-bg-1));
    color: var(--text);
    overflow-x: hidden;
}

section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(70px, 8vw, 90px) clamp(20px, 4vw, 25px);
    position: relative;
}

h1 { font-size: clamp(38px, 6vw, 58px); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(26px, 4.5vw, 38px); margin-bottom: 20px; }
h3 { font-size: 22px; margin-bottom: 10px; }
p { line-height: 1.8; font-size: 17px; opacity: .9; color: var(--text); }

/* ============ Glass Card ============ */
.glass-card {
    width: 100%;
    max-width: 900px;
    background: rgba(255, 255, 255, .85);
    border-radius: 28px;
    padding: clamp(24px, 5vw, 40px);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-soft);
    position: relative;
}

section > * {
    position: relative;
    z-index: 1;
}

/* ============ Loading ============ */
#loading {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, var(--pink-bg-1), var(--pink-bg-2));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    z-index: 99999;
    transition: opacity .8s, visibility .8s;
}

#loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.heart-loader {
    font-size: 70px;
    color: var(--pink);
    animation: heartbeat 1s infinite;
    margin-bottom: 20px;
}

.loading-bar {
    width: min(250px, 80vw);
    height: 8px;
    background: rgba(255, 77, 136, .15);
    border-radius: 30px;
    overflow: hidden;
    margin-top: 25px;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--pink-light), #ffd1e6);
    animation: loading 4s linear forwards;
}

@keyframes loading { 100% { width: 100%; } }
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* ============ Hero ============ */
.hero {
    background:
        linear-gradient(rgba(255, 214, 232, .55), rgba(255, 240, 246, .55)),
        url("asset/bg.jpg");
    background-size: cover;
    background-position: center;
    text-align: center;
}

.hero-content { max-width: 850px; }

.hero h3 {
    color: var(--pink);
    font-size: clamp(20px, 3vw, 24px);
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    font-family: "Great Vibes", cursive;
    font-size: clamp(48px, 10vw, 82px);
    margin-bottom: 30px;
    color: var(--text-strong);
    text-shadow: 0 0 25px rgba(255, 119, 170, .35);
}

.hero p {
    max-width: 650px;
    margin: 0 auto 40px;
    font-size: clamp(16px, 2.6vw, 20px);
    color: var(--text);
}

#openGift {
    padding: 18px 45px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    background: linear-gradient(45deg, var(--pink), var(--pink-light));
    color: white;
    transition: .4s;
    box-shadow: var(--shadow-pink);
}

#openGift:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 60px rgba(255, 77, 136, .55);
}

/* Hero scroll indicator */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--pink);
    font-size: 14px;
    letter-spacing: 1px;
    opacity: .8;
    animation: hintFloat 2s ease-in-out infinite;
}

.scroll-hint i {
    font-size: 20px;
    animation: hintBounce 2s ease-in-out infinite;
}

@keyframes hintFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -10px); }
}

@keyframes hintBounce {
    0%, 100% { transform: translateY(0); opacity: .6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* ============ Letter ============ */
.letter {
    background: linear-gradient(180deg, rgba(255, 236, 244, .8), rgba(255, 246, 250, .8), rgba(255, 236, 244, .8));
}

.letter .glass-card { max-width: 900px; }

.letter-text p {
    margin-bottom: 25px;
    font-size: 18px;
    color: var(--text);
    line-height: 2;
}

.letter-sign {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(24px, 4vw, 32px) !important;
    color: var(--pink);
    text-align: right;
}

.typing {
    font-size: clamp(22px, 3.5vw, 28px);
    font-weight: 600;
    color: var(--pink);
    margin-bottom: 25px;
    min-height: 1.6em;
    border-right: 3px solid var(--pink-light);
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    animation: blink .8s step-end infinite;
}

@keyframes blink {
    0%, 100% { border-color: var(--pink-light); }
    50% { border-color: transparent; }
}

/* ============ Heading ============ */
.letter h2,
.gallery h2,
.counter h2,
.reasons h2,
.promise h2,
.last-message h2,
.question h2 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(40px, 7vw, 60px);
    text-align: center;
    margin-bottom: 35px;
    color: var(--pink);
}

/* ============ Gallery ============ */
.gallery { flex-direction: column; }

.slider {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 10px 30px;
    width: 100%;
    max-width: 1200px;
    -webkit-overflow-scrolling: touch;
}

.slider::-webkit-scrollbar { height: 8px; }
.slider::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 20px; }

.slider img {
    width: min(320px, 78vw);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 30px;
    scroll-snap-align: center;
    transition: .4s;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
    flex-shrink: 0;
    border: 4px solid #fff;
}

.slider img:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .25);
}

/* ============ Counter ============ */
.counter { text-align: center; }

.counter .glass-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    max-width: 1000px;
}

.counter .glass-card h2 { grid-column: 1 / -1; }

.counter-divider { display: none; }

.counter-block { margin-bottom: 5px; }

.counter-block h3 {
    font-size: clamp(20px, 3.5vw, 26px);
    color: var(--pink);
    margin: 5px 0 5px;
}

.counter-block > p { font-size: 15px; color: var(--text-dim); margin-bottom: 10px; }

.counter-divider {
    font-size: 32px;
    margin: 30px 0 10px;
    opacity: .85;
    animation: heartbeat 1.6s infinite;
}

.time-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    gap: 12px;
    margin-top: 15px;
}

.time-box {
    width: clamp(78px, 22vw, 110px);
    height: clamp(78px, 22vw, 110px);
    border-radius: 25px;
    background: rgba(255, 255, 255, .92);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border: 1px solid var(--border-card);
    transition: .3s;
    box-shadow: 0 8px 25px rgba(255, 77, 136, .15);
}

.time-box:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, .95);
}

.time-box h3 { font-size: 32px; color: var(--pink); margin: 0; }
.time-box span { font-size: 14px; color: var(--text-dim); }

/* ============ Reasons ============ */
.reasons { flex-direction: column; }

.reason-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
    max-width: 1200px;
}

.reason-card {
    padding: 35px;
    border-radius: 30px;
    background: rgba(255, 255, 255, .92);
    text-align: center;
    transition: .4s;
    border: 1px solid var(--border-card);
    box-shadow: 0 10px 30px rgba(255, 77, 136, .12);
}

.reason-card:hover {
    transform: translateY(-12px) scale(1.03);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 20px 50px rgba(255, 119, 170, .3);
}

.reason-icon { font-size: 42px; display: block; }
.reason-card h3 { margin-top: 18px; margin-bottom: 15px; color: var(--pink); }
.reason-card p { font-size: 16px; line-height: 1.8; color: var(--text); }

/* ============ Promise ============ */
.promise {
    background: linear-gradient(180deg, rgba(255, 236, 244, .8), rgba(255, 246, 250, .8), rgba(255, 236, 244, .8));
}

.promise ul { list-style: none; display: flex; flex-direction: column; gap: 18px; }

.promise li {
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .7);
    transition: .35s;
    font-size: 17px;
    border: 1px solid transparent;
    color: var(--text);
    box-shadow: 0 6px 20px rgba(255, 77, 136, .1);
}

.promise li:hover {
    background: rgba(255, 255, 255, .95);
    border-color: var(--border-card);
    transform: translateX(12px);
}

/* ============ Music ============ */
.music-section {
    background: linear-gradient(180deg, rgba(255, 240, 246, .8), rgba(255, 236, 244, .8), rgba(255, 240, 246, .8));
    gap: 30px;
    flex-wrap: wrap;
}

.music-card {
    width: min(420px, 100%);
    padding: 35px;
    border-radius: 35px;
    background: rgba(255, 255, 255, .92);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.music-card p { flex: 1; display: flex; align-items: center; justify-content: center; }

.disc {
    width: 200px;
    height: 200px;
    margin: 0 auto 25px;
    border-radius: 50%;
    background: radial-gradient(circle, #5c2438 0 16%, #ff77aa 17% 22%, #ffd1e6 23% 26%, #5c2438 27% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 10s linear infinite;
    box-shadow: 0 15px 40px rgba(255, 77, 136, .3);
    padding: 6px;
}

.disc.paused { animation-play-state: paused; }

.cover {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, .85);
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.music-card h3 { font-size: 28px; margin-bottom: 10px; color: var(--pink); }
.music-card p { margin-bottom: 25px; color: var(--text); }

#playMusic1,
#playMusic2 {
    padding: 15px 35px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-size: 17px;
    background: linear-gradient(45deg, var(--pink), var(--pink-light));
    color: white;
    transition: .3s;
}

#playMusic1:hover,
#playMusic2:hover { transform: scale(1.05); box-shadow: var(--shadow-pink); }

/* ============ Last Message ============ */
.last-message { text-align: center; }

.last-message p { margin-bottom: 22px; font-size: 18px; line-height: 2; color: var(--text); }

.love-ending {
    font-size: clamp(20px, 3vw, 24px);
    color: var(--pink);
    font-weight: 600;
}

/* ============ Question ============ */
.question { text-align: center; }

.question-button { display: flex; justify-content: center; gap: 20px; margin-top: 35px; flex-wrap: wrap; }

.question button {
    padding: 18px 35px;
    border: none;
    border-radius: 40px;
    font-size: 18px;
    cursor: pointer;
    background: linear-gradient(45deg, var(--pink), var(--pink-light));
    color: white;
    transition: .35s;
}

.question button:hover { transform: translateY(-5px); box-shadow: var(--shadow-pink); }

/* ============ Final Screen ============ */
.final-screen {
    background:
        linear-gradient(180deg, rgba(255, 214, 232, .7), rgba(255, 240, 246, .8)),
        url("asset/bg.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.final-content { max-width: 900px; }

.final-content h1 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(44px, 12vw, 85px);
    margin-bottom: 30px;
    color: var(--text-strong);
    text-shadow: 0 0 20px rgba(255, 119, 170, .4);
}

.final-content p { font-size: clamp(16px, 2.6vw, 20px); margin-bottom: 25px; line-height: 2; color: var(--text); }

#fireworkBtn {
    padding: 18px 45px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    color: white;
    background: linear-gradient(45deg, var(--pink), var(--pink-light));
    transition: .4s;
}

#fireworkBtn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 35px rgba(255, 119, 170, .55);
}

/* ============ Footer ============ */
footer {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 236, 244, .8), rgba(255, 246, 250, .8));
}

footer h2 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(36px, 7vw, 55px);
    color: var(--pink);
    margin-bottom: 20px;
}

footer p { opacity: .85; margin-top: 12px; color: var(--text-dim); }

/* ============ Floating Music Button ============ */
#musicButton {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--pink), var(--pink-light));
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    color: white;
    z-index: 999;
    box-shadow: var(--shadow-pink);
    transition: .35s;
}

#musicButton:hover { transform: scale(1.12); }

/* ============ Popup ============ */
#popupMessage {
    position: fixed;
    inset: 0;
    background: rgba(92, 36, 56, .45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

#popupMessage.show { display: flex; animation: popIn .3s ease; }

@keyframes popIn {
    from { transform: scale(.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.popup-card {
    width: 90%;
    max-width: 420px;
    padding: 35px;
    border-radius: 25px;
    text-align: center;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.popup-card h2 { font-size: clamp(40px, 7vw, 60px); margin-bottom: 20px; }
.popup-card p { line-height: 1.9; margin-bottom: 30px; color: var(--text); }

#closePopup {
    padding: 15px 35px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    background: linear-gradient(45deg, var(--pink), var(--pink-light));
    color: white;
    font-size: 17px;
}

/* ============ Scroll Reveal ============ */
.reveal { opacity: 0; transform: translateY(80px); transition: 1s; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ============ Buttons ============ */
button { position: relative; overflow: hidden; font-family: inherit; }

button::after {
    content: "";
    position: absolute;
    width: 0; height: 0;
    background: rgba(255, 255, 255, .4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: .6s;
}

button:active::after { width: 280px; height: 280px; }

/* ============ Images ============ */
img { user-select: none; -webkit-user-drag: none; max-width: 100%; }

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--pink-bg-2); }
::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 20px; }

/* ============ Selection ============ */
::selection { background: var(--pink-light); color: white; }

/* ============ Responsive ============ */
@media screen and (max-width: 1024px) {
    section { padding: clamp(60px, 7vw, 80px) 20px; }
    .glass-card { padding: clamp(22px, 4vw, 32px); }
}

@media screen and (max-width: 768px) {
    section { padding: 70px 20px; }
    .hero h1 { font-size: 56px; }
    .hero h3 { font-size: 20px; }
    .hero p { font-size: 16px; }
    .glass-card { padding: 28px; }

    .letter h2,
    .gallery h2,
    .counter h2,
    .promise h2,
    .last-message h2,
    .question h2 { font-size: 46px; }

    .time-container { gap: 12px; }
    .time-box { width: 90px; height: 90px; }
    .time-box h3 { font-size: 26px; }

    .slider img { width: min(260px, 78vw); }
    .music-card { width: 100%; max-width: 420px; }
    .disc { width: 160px; height: 160px; }
    .final-content h1 { font-size: 58px; }
    .reason-container { grid-template-columns: repeat(2, 1fr); }
    .counter .glass-card { grid-template-columns: 1fr; }
    .counter-divider { display: block; }
    .question-button { flex-direction: column; }
    .question button { width: 100%; }
}

@media screen and (max-width: 560px) {
    .reason-container { grid-template-columns: 1fr; }
    .time-box { width: min(96px, 29vw); height: min(96px, 29vw); }
    .time-box h3 { font-size: 22px; }
}

@media screen and (max-width: 430px) {
    .hero h1 { font-size: 48px; }
    .hero p { font-size: 15px; }
    h2 { font-size: 34px; }
    .slider img { width: min(220px, 78vw); }
    .disc { width: 140px; height: 140px; }
    .time-box { width: 78px; height: 78px; }
    .time-box h3 { font-size: 22px; }
    .time-container { gap: 9px; }
    .final-content h1 { font-size: 44px; }
    #musicButton { width: 58px; height: 58px; font-size: 20px; right: 18px; bottom: 18px; }
}
