/* 
   Style for "Maaf ya Sayangg ❤️" 
   Personal & Premium Apology Website 
*/

:root {
    --bg-pink: #ffebf0;
    --bg-cream: #fffdf9;
    --bg-white: #ffffff;
    --primary-red: #ff6b8b;
    --primary-red-hover: #ff4772;
    --accent-peach: #ffe3d1;
    --accent-purple: #f3ebff;
    --text-dark: #4a3e40;
    --text-red: #d63458;
    --text-muted: #8e7a7d;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --shadow-soft: 0 10px 30px rgba(240, 170, 180, 0.2);
    --shadow-medium: 0 15px 35px rgba(240, 160, 175, 0.3);
}

/* Base resets & styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-cream);
    overflow-x: hidden;
}

body {
    font-family: 'Quicksand', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

body.locked {
    height: 100vh;
    overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-cream);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 10px;
}

/* Typography styles */
h1, h2, h3, h4 {
    font-weight: 700;
}

.handwritten-accent {
    font-family: 'Caveat', cursive;
    font-size: 5rem;
    color: var(--text-red);
    line-height: 1.1;
    margin-bottom: 10px;
}

.handwritten-title {
    font-family: 'Caveat', cursive;
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.handwritten-signature {
    font-family: 'Caveat', cursive;
    font-size: 3.2rem;
    display: block;
}

.text-red {
    color: var(--text-red);
}

.bold {
    font-weight: 700;
}

.italic {
    font-style: italic;
}

.text-large {
    font-size: 1.35rem;
}

.text-center {
    text-align: center;
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Grid / Container */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Music Player Style */
.music-player-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--bg-pink);
    border-radius: 50px;
    padding: 8px 16px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-red);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(240, 160, 175, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.music-btn:hover, .music-btn:active {
    transform: scale(1.05);
    background: var(--bg-white);
    border-color: var(--primary-red);
}

.music-btn.playing {
    background: var(--primary-red);
    color: var(--bg-white);
    border-color: var(--primary-red);
    box-shadow: 0 4px 15px rgba(255, 107, 139, 0.4);
}

/* Decor Elements */
.floating-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decor-heart {
    position: absolute;
    bottom: -50px;
    font-size: 1.5rem;
    opacity: 0.4;
    animation: floatUp 8s infinite linear;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-105vh) rotate(360deg);
        opacity: 0;
    }
}

/* Tap Particles */
#tap-particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.tap-heart {
    position: absolute;
    font-size: 1.8rem;
    pointer-events: none;
    animation: burstHeart 0.8s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes burstHeart {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--rot));
        opacity: 0;
    }
}

/* Cute Buttons */
.cute-btn {
    background: var(--primary-red);
    color: var(--bg-white);
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 107, 139, 0.35);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    outline: none;
}

.cute-btn:hover {
    background: var(--primary-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 139, 0.45);
}

.cute-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 15px rgba(255, 107, 139, 0.3);
}

.cute-btn.small-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 107, 139, 0.25);
}

.cute-btn.big-btn {
    padding: 16px 36px;
    font-size: 1.15rem;
    box-shadow: 0 8px 25px rgba(255, 107, 139, 0.4);
}

/* Bounce & Pulse Animations */
.bounce-animation {
    animation: simpleBounce 2s infinite ease-in-out;
}

@keyframes simpleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pulse-animation {
    animation: simplePulse 1.8s infinite ease-in-out;
}

@keyframes simplePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* SECTIONS BASE */
.full-screen {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.story-section {
    padding: 80px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.bg-cream {
    background-color: var(--bg-cream);
}

.bg-pink {
    background-color: var(--bg-pink);
    background-image: radial-gradient(rgba(255, 180, 195, 0.15) 1px, transparent 0),
                      radial-gradient(rgba(255, 180, 195, 0.15) 1px, transparent 0);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

/* CARDS */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 30px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-soft);
    position: relative;
    border: 3px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-medium);
}

.border-love {
    border-color: #ffd1dc;
    background: linear-gradient(to bottom, var(--bg-white), #fff9fa);
}

.border-love-thick {
    border: 4px solid var(--primary-red);
    background: linear-gradient(to bottom, var(--bg-white), #fff9fa);
}

.border-sparkle {
    border-color: #ffe3b3;
}

.border-sad {
    border-color: #dbe4ff;
}

.border-interactive {
    border-color: #d1ffd6;
}

.heart-divider {
    font-size: 1.5rem;
    margin: 15px 0;
    color: var(--primary-red);
    animation: simplePulse 1.2s infinite ease-in-out;
}

.section-title {
    font-size: 1.7rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.section-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: -10px;
    margin-bottom: 40px;
}

.story-text {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    text-align: center;
}

.story-text-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* HERO SECTION */
#hero {
    background-color: var(--bg-pink);
    background-image: radial-gradient(rgba(255, 107, 139, 0.1) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.hero-subtext {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-red);
    font-weight: 700;
    gap: 5px;
    transition: opacity 0.5s ease;
}

.scroll-indicator.invisible {
    opacity: 0;
    pointer-events: none;
}

.scroll-arrow {
    animation: simpleBounce 1.5s infinite ease-in-out;
    font-size: 1.2rem;
}

/* SECTION 1: CHAT BUBBLES */
.chat-bubble {
    padding: 12px 18px;
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    max-width: 85%;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    text-align: left;
}

.chat-bubble.left {
    background-color: var(--accent-purple);
    color: var(--text-dark);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.chat-bubble.right {
    background-color: var(--bg-pink);
    color: var(--text-red);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.highlight {
    background-color: var(--primary-red);
    color: var(--bg-white);
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(255,107,139,0.2);
}

.chat-bubble.short-reply {
    background-color: #ededed;
    color: #666;
    font-style: italic;
    border: 1px solid #ddd;
    text-align: center;
    width: 60px;
    margin-left: auto;
    box-shadow: none;
}

.narrator-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* SECTION 3: PHOTO STORY */
#photo-story {
    padding-top: 60px;
    padding-bottom: 60px;
}

.photo-timeline {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 30px;
    width: 100%;
}

.photo-card-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.polaroid {
    background: var(--bg-white);
    padding: 14px 14px 22px 14px;
    border-radius: 4px;
    width: 100%;
    max-width: 290px;
    box-shadow: 0 10px 25px rgba(180, 140, 150, 0.25);
    border: 1px solid rgba(220, 190, 195, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.polaroid:hover {
    transform: scale(1.03) rotate(0deg) !important;
    box-shadow: 0 15px 35px rgba(180, 140, 150, 0.35);
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: #f6f6f6;
    overflow: hidden;
    border-radius: 2px;
    border: 1px solid #eaeaea;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.polaroid:hover .image-wrapper img {
    transform: scale(1.05);
}

.polaroid-caption {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 14px;
    text-align: center;
    line-height: 1.4;
}

/* Photo angles for scrap-book feel */
.tilt-left .polaroid {
    transform: rotate(-4deg);
}

.tilt-right .polaroid {
    transform: rotate(5deg);
}

.tilt-left-light .polaroid {
    transform: rotate(-2deg);
}

.tilt-right-light .polaroid {
    transform: rotate(3deg);
}

/* SECTION 4: HUMOR / FLOWER PRANK */
.prank-box {
    background: var(--bg-cream);
    border: 2px dashed var(--primary-red);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-top: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: all 0.5s ease;
}

.prank-box.claimed {
    background: var(--bg-white);
    border-color: #ffd1dc;
    border-style: solid;
}

/* SECTION 5: MINI INTERACTIVE GAME */
.game-question {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.game-main-q {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-red);
    margin-bottom: 25px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.game-btn {
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.angry-btn {
    background-color: #ffe6e6;
    color: #cc3333;
    border: 1px solid #ffa3a3;
}

.angry-btn:hover, .angry-btn:active {
    transform: scale(0.95);
    background-color: #ffcccc;
}

.happy-btn {
    background-color: var(--primary-red);
    color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(255, 107, 139, 0.3);
}

.happy-btn:hover {
    transform: scale(1.08);
    background-color: var(--primary-red-hover);
    box-shadow: 0 6px 18px rgba(255, 107, 139, 0.4);
}

.response-panel {
    margin-top: 15px;
    animation: scaleInUp 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.emoji-bounce {
    font-size: 2.2rem;
    margin-bottom: 12px;
    animation: simpleBounce 1.5s infinite ease-in-out;
}

.hidden {
    display: none !important;
}

/* SECTION 6: PESAN SERIUS */
.calm-intro {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 15px;
}

.sincere-letter {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sincere-letter p {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-dark);
    text-align: justify;
}

/* SECTION 7: FINAL SURPRISE */
#final-surprise {
    padding-bottom: 120px;
}

.hidden-success {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hidden-success.show {
    opacity: 1;
    max-height: 500px;
    margin-top: 25px;
}

.hearts-burst {
    font-size: 1.8rem;
    margin-bottom: 10px;
    animation: simplePulse 1s infinite ease-in-out;
}

.thank-you-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-red);
    margin-bottom: 10px;
}

/* FOOTER SECTION */
.footer-section {
    background-color: var(--bg-pink);
    padding: 60px 20px;
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255, 107, 139, 0.15);
}

.footer-content {
    max-width: 320px;
    margin: 0 auto;
}

.footer-msg {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.footer-signature {
    font-family: 'Caveat', cursive;
    font-size: 2.8rem;
    color: var(--text-red);
    margin-top: 10px;
    margin-bottom: 25px;
    display: block;
}

.footer-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}

/* ENTRANCE & INTERACTION ANIMATIONS */
.fade-in-up {
    animation: fadeInUp 1s forwards cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInUp {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Scroll reveal classes controlled by JS */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Chat bubble delays in CSS for smooth sequential reveals */
.delay-1 { transition-delay: 0.3s; }
.delay-2 { transition-delay: 0.8s; }
.delay-3 { transition-delay: 1.4s; }
.delay-4 { transition-delay: 2.0s; }
.delay-5 { transition-delay: 2.6s; }

/* Responsive adjustments */
@media (max-width: 480px) {
    .handwritten-accent {
        font-size: 4rem;
    }
    .handwritten-title {
        font-size: 3rem;
    }
    .handwritten-signature {
        font-size: 2.6rem;
    }
    .card {
        padding: 24px 18px;
    }
    .polaroid {
        max-width: 260px;
    }
    .story-section {
        padding: 60px 15px;
    }
}
