/* CSS Variables - Will be updated by JavaScript */
:root {
    /* Colors */
    --background-color-1: #ffafbd;
    --background-color-2: #ffc3a0;
    --button-color: #ff6b6b;
    --button-hover: #ff8787;
    --text-color: #ff4757;

    /* Animations */
    --float-duration: 15s;
    --float-distance: 50px;
    --bounce-speed: 0.5s;
    --heart-explosion-size: 1.5;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, var(--background-color-1), var(--background-color-2));
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    position: relative;
    padding: 20px 20px 20px 20px;
    box-sizing: border-box;
}

/* Full-screen translucent background video */
.youtube-bg-wrap {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.youtube-bg-inner {
    position: absolute;
    inset: 0;
    opacity: 0.4;
}

.youtube-bg-inner video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--background-color-1) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        var(--background-color-2) 100%);
    mix-blend-mode: multiply;
    opacity: 0.75;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    margin: 20px;
    overflow: visible !important;
}

.floating-elements {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.heart, .bear {
    position: absolute;
    font-size: 2rem;
    animation: float var(--float-duration) linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
    }
    100% {
        transform: translateY(-100px) translateX(var(--float-distance));
    }
}

.cute-btn {
    background: var(--button-color);
    border: none;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 20px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}

.cute-btn:hover {
    transform: scale(1.1);
    background: var(--button-hover);
}

.hidden {
    display: none;
}

.disabled-btn {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.secret-answer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    margin-top: 0;
    opacity: 0.2;
    transition: opacity 0.3s;
    transform: scale(0.7);
    z-index: 2;
    animation: subtle-hint 2s infinite alternate;
    animation-delay: 5s;
}

.secret-answer .cute-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.secret-answer:hover {
    opacity: 1;
    animation: none;
}

.love-meter {
    position: relative;
    width: 100%;
    margin: 20px auto;
    overflow: visible;
    padding: 10px 0;
}

.love-meter p {
    font-size: 1.2em;
    margin: 15px 0;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slider {
    width: 100%;
    height: 25px;
    background: linear-gradient(to right, #ff6b6b, #ff8787, #ffb8b8);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
}

.slider:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

/* Ensure track is visible */
.slider::-webkit-slider-runnable-track,
.slider::-moz-range-track {
    width: 100%;
    height: 25px;
    background: linear-gradient(to right, #ff6b6b, #ff8787, #ffb8b8);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Ensure thumb is properly styled */
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
    position: relative;
    z-index: 10;
    margin-top: -5px;
    border: 3px solid white;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.slider::-moz-range-thumb {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #ff4757, #ff6b6b);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.3);
    position: relative;
    z-index: 10;
    border: 3px solid white;
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

#extraLove {
    color: #ff6b6b;
    font-weight: bold;
    animation: bounce 0.5s infinite alternate;
    display: block;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(255, 107, 107, 0.1);
    text-shadow: 0 2px 4px rgba(255, 71, 87, 0.2);
    transition: all 0.3s ease;
    margin-top: 5px;
}

#extraLove.super-love {
    background: rgba(255, 107, 107, 0.2);
    font-size: 1.2em;
    padding: 8px 15px;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.2);
}

#loveValue {
    font-weight: bold;
    color: #ff4757;
    font-size: 1.3em;
    transition: all 0.3s ease;
}

.love-value-container {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@keyframes bounce {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.2);
    }
}

.hearts-explosion {
    font-size: 2rem;
    animation: explode 1s ease-out forwards;
    margin-top: 30px;
}

@keyframes explode {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(var(--heart-explosion-size));
    }
    100% {
        transform: scale(1);
    }
}

h1, h2 {
    font-family: Arial, sans-serif;
    font-weight: 700;
}

h1 {
    color: #ff6b6b;
    margin-bottom: 2rem;
}

h2 {
    color: #ff8787;
}

.super-love {
    font-size: 1.5em;
    color: #ff4757;
    font-weight: bold;
    transform: scale(1.2);
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(255, 71, 87, 0.3);
}


.celebration-text {
    font-size: 3em;
    color: #ff4757;
    font-weight: bold;
    margin: 30px 0;
    animation: bounce var(--bounce-speed) infinite alternate;
    text-shadow: 2px 2px 4px rgba(255, 71, 87, 0.3);
}

@keyframes subtle-hint {
    0% { opacity: 0.2; }
    100% { opacity: 0.3; }
}

/* Carousel – above the box, lovely aesthetic */
.carousel-section {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1rem auto;
}

.carousel-label {
    font-family: 'Dancing Script', cursive;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    text-align: center;
    text-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
    letter-spacing: 0.02em;
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-track-wrap {
    flex: 1;
    min-width: 0;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.25),
                0 0 0 3px rgba(255, 255, 255, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background: linear-gradient(145deg, #fff5f7, #ffe8ec);
    aspect-ratio: 4/3;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: center center;
    border-radius: 12px;
    display: block;
}

.carousel-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--button-color), var(--button-hover));
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.35);
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.4);
}

.carousel-btn:active {
    transform: scale(0.98);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 107, 107, 0.35);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.carousel-dot:hover {
    background: rgba(255, 107, 107, 0.6);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--button-color);
    transform: scale(1.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Clickable love envelope */
.love-envelope {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1000;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff6b8a, #ff4757);
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: envelope-pulse 2s ease-in-out infinite;
}

.love-envelope:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 28px rgba(255, 71, 87, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.love-envelope:active {
    transform: scale(1.05);
}

@keyframes envelope-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.4); }
    50% { box-shadow: 0 6px 24px rgba(255, 71, 87, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.6); }
}

/* Top right heart button – show/hide right-side image */
.heart-toggle-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff6b8a, #ff4757);
    color: white;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(255, 71, 87, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.heart-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(255, 71, 87, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.heart-toggle-btn:active {
    transform: scale(1.02);
}

/* Right-side image panel */
.right-side-image-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 40vw);
    max-width: 100%;
    height: 100%;
    z-index: 100;
    padding: 80px 16px 24px 16px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(255, 175, 189, 0.95) 0%, rgba(255, 195, 160, 0.95) 100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: auto;
}

.right-side-image-panel.right-side-image-panel--closed {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}

.right-side-image-panel img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: block;
    object-fit: contain;
}
