@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400&display=swap');

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

body {
    font-family: 'Lato', sans-serif;
    background-color: #050505;
    color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, p.story-p {
    font-family: 'Playfair Display', serif;
}

/* Scenes */
.scene {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Opening Scene */
.opening-scene {
    height: 100vh;
}
.opening-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1);
    will-change: transform;
}
.opening-scene::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}
.content {
    position: relative;
    z-index: 3;
    text-align: center;
}
.intro-text {
    font-size: 4rem;
    opacity: 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    font-weight: 400;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInIntro 2s forwards 2s;
    z-index: 10;
}
@keyframes fadeInIntro {
    to { opacity: 0.8; }
}
.scroll-indicator span {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 15px;
    position: relative;
}
.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}
@keyframes scroll {
    0% { top: 5px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* Story Scene */
.story-scene {
    min-height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
}
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    z-index: -2;
    opacity: 0;
    will-change: opacity;
}
.bg-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: -1;
    pointer-events: none;
}

.story-texts {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50vh 20px;
}
.story-p {
    font-size: 2.8rem;
    text-align: center;
    margin: 80vh 0; /* Huge margin for scrolling space */
    opacity: 0;
    transform: translateY(50px);
    text-shadow: 2px 2px 15px rgba(0,0,0,0.9), 0 0 40px rgba(0,0,0,0.8);
    line-height: 1.5;
    font-weight: 400;
    color: #fdfdfd;
}

.floating-images {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}
.float-img {
    position: absolute;
    width: 250px;
    height: 350px;
    object-fit: cover;
    border-radius: 4px;
    padding: 10px 10px 40px 10px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    opacity: 0;
    border: 1px solid rgba(0,0,0,0.1);
    will-change: transform, opacity;
}

/* Final Scene */
.final-scene {
    height: 100vh;
    background: #000;
    z-index: 20;
}
.final-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    filter: blur(15px) brightness(40%);
    opacity: 0.6;
    z-index: 1;
}
.blur-img {
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    transform: scale(1.1);
    animation: breathe 10s infinite alternate;
}
@keyframes breathe {
    0% { transform: scale(1.1) rotate(0deg); filter: blur(15px); }
    100% { transform: scale(1.2) rotate(1deg); filter: blur(20px); }
}

.final-content {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.proposal-text {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 50px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 100, 150, 0.5);
    opacity: 0;
    transform: scale(0.8);
    background: linear-gradient(45deg, #fff, #ffb6c1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.buttons {
    display: flex;
    gap: 30px;
    opacity: 0;
    transform: translateY(30px);
    flex-wrap: wrap;
    justify-content: center;
}
.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-family: 'Lato', sans-serif;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
.btn-yes {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}
.btn-yes:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255,255,255,0.6);
}
.btn-no {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
}
.btn-no:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

/* Instagram Styles */
.ig-notification {
    position: fixed;
    top: 20px;
    right: -300px; /* hidden initially */
    width: 280px;
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    cursor: pointer;
    z-index: 40;
    transition: transform 0.2s;
}
.ig-notification:hover {
    transform: scale(1.03);
}
.ig-notif-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
}
.ig-notif-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.3;
}
.ig-notif-text span {
    color: #888;
    font-size: 0.8rem;
}

.ig-chat-window {
    position: fixed;
    top: 50%;
    right: -400px; /* hidden initially */
    transform: translateY(-50%);
    width: 320px;
    height: 480px;
    background: #000;
    border: 1px solid #333;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 45;
    box-shadow: -10px 10px 40px rgba(0,0,0,0.9);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}
.ig-chat-header {
    padding: 15px;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #111;
}
.ig-close {
    position: absolute;
    left: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #fff;
    line-height: 1;
}
.ig-chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
    position: relative;
}
.ig-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    opacity: 0;
    transform: translateY(10px);
}
.msg-mine {
    align-self: flex-end;
    background: #3797f0;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.msg-hers {
    align-self: flex-start;
    background: #262626;
    color: #fff;
    border-bottom-left-radius: 4px;
}
.chat-blur-overlay {
    position: absolute;
    top: 55px; /* height of header */
    left: 0; 
    width: 100%; 
    height: calc(100% - 55px);
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.6);
    z-index: 10;
    display: none;
    opacity: 0;
    justify-content: center;
    align-items: center;
}
.chat-time-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    opacity: 0;
}
.close-prompt {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: 30px;
    margin-bottom: 20px;
    opacity: 0;
    animation: bounceUpDown 1.5s infinite;
}
@keyframes bounceUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Intermission Screens */
.intermission-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 50; /* Above everything except modals */
    display: none; /* hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
}

.locked-title {
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}
.locked-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.7;
}

.loader-container {
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.loading-text {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #ffd1dc;
}
.progress-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: #ffb6c1;
    box-shadow: 0 0 10px #ffb6c1;
}

.error-title {
    font-family: 'Lato', sans-serif;
    font-size: 2rem;
    color: #ff4d4d;
    margin-bottom: 15px;
}
.error-text {
    font-size: 1rem;
    color: #aaa;
}
.error-reveal {
    font-size: 2.2rem;
    position: absolute;
    opacity: 0;
    line-height: 1.5;
}

/* Modals */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.modal-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    transform: scale(0.8);
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffb6c1;
}

.modal-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    font-family: 'Lato', sans-serif;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .intro-text {
        font-size: 2.5rem;
    }
    .story-p {
        font-size: 1.8rem;
    }
    .float-img {
        width: 180px;
        height: 250px;
    }
    .proposal-text {
        font-size: 3.5rem;
    }
    .buttons {
        gap: 15px;
    }
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
        width: 80%;
    }
    .modal-box {
        padding: 30px 20px;
    }
    .modal-title {
        font-size: 2rem;
    }
}
