/* 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;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--background-color-1), var(--background-color-2));
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Background slideshow */
.bg-slideshow {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-slideshow .bg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.bg-slideshow .bg-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bg-slideshow .bg-slide.active {
    opacity: 1;
    z-index: 1;
}

.bg-slideshow-overlay {
    position: fixed;
    inset: 0;
    z-index: 0.5;
    background: linear-gradient(135deg,
        rgba(255, 175, 189, 0.75),
        rgba(255, 195, 160, 0.75));
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
    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: 1;
}

.heart, .bear {
    position: absolute;
    font-size: 2rem;
    animation: float var(--float-duration) linear infinite;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

/* Heart explosion particles */
.heart-particle {
    position: fixed;
    font-size: 1rem;
    pointer-events: none;
    z-index: 100;
    animation: heart-particle-burst 0.8s ease-out forwards;
}

@keyframes heart-particle-burst {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) scale(0.6);
        opacity: 0;
    }
}

@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;
    touch-action: manipulation;
}

.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;
    touch-action: none;
}

.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; }
}

.music-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.music-btn {
    background: var(--button-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    touch-action: manipulation;
}

.music-btn:hover {
    transform: scale(1.05);
    background: var(--button-hover);
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    body {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
        align-items: center;
    }

    .container {
        padding: 1.25rem;
        margin: 10px;
        width: calc(100% - 20px);
        max-width: none;
        box-sizing: border-box;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .cute-btn {
        padding: 14px 24px;
        margin: 8px;
        font-size: 1rem;
        min-height: 44px;
        min-width: 120px;
    }

    .secret-answer {
        bottom: max(env(safe-area-inset-bottom), 15px);
        right: 15px;
        left: 15px;
        margin: 0;
        display: flex;
        justify-content: center;
    }

    .secret-answer .cute-btn {
        font-size: 0.75rem;
        padding: 8px 14px;
        min-height: 40px;
    }

    .love-meter {
        margin: 15px 0;
        padding: 5px 0;
    }

    .love-meter p {
        font-size: 1rem;
        margin: 10px 0;
    }

    .love-value-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .slider {
        height: 28px;
    }

    .slider::-webkit-slider-thumb {
        width: 40px;
        height: 40px;
    }

    .slider::-moz-range-thumb {
        width: 40px;
        height: 40px;
    }

    .celebration-text {
        font-size: 1.5rem;
        margin: 20px 0;
    }

    .celebration-text:last-of-type {
        font-size: 1.25rem;
    }

    .music-controls {
        top: max(env(safe-area-inset-top), 10px);
        right: 10px;
    }

    .music-btn {
        padding: 8px 14px;
        font-size: 14px;
    }

    .heart, .bear {
        font-size: 1.5rem;
    }

    .heart-particle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
        margin: 8px;
        width: calc(100% - 16px);
    }

    h1 {
        font-size: 1.35rem;
    }

    h2 {
        font-size: 1rem;
    }

    .cute-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
} 