/* Core Reset & Variables */
:root {
    --primary-color: #ff4d6d;
    --primary-hover: #ff758f;
    --secondary-color: #c9184a;
    --accent-color: #ffb5a7;
    --bg-gradient-start: #ffeaec;
    --bg-gradient-end: #ffe3e8;
    --card-bg: rgba(255, 255, 255, 0.45);
    --card-border: rgba(255, 255, 255, 0.6);
    --text-main: #3d0c11;
    --text-muted: #592025;
    --shadow-soft: 0 15px 35px rgba(255, 77, 109, 0.12), 0 5px 15px rgba(0, 0, 0, 0.04);
    --shadow-strong: 0 20px 40px rgba(255, 77, 109, 0.25);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Quicksand', sans-serif;
    --font-cursive: 'Dancing Script', cursive;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-gradient-start);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    color: var(--text-main);
}

/* Background Gradients & Overlay */
.bg-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    z-index: -2;
}

/* Floating Hearts Background */
.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.floating-heart {
    position: absolute;
    bottom: -50px;
    background-color: var(--primary-color);
    display: inline-block;
    height: 30px;
    margin: 0 10px;
    position: absolute;
    transform: rotate(-45deg);
    width: 30px;
    opacity: 0.6;
    animation: floatUp 8s linear infinite;
}

.floating-heart::before,
.floating-heart::after {
    content: "";
    background-color: var(--primary-color);
    border-radius: 50%;
    height: 30px;
    position: absolute;
    width: 30px;
}

.floating-heart::before {
    top: -15px;
    left: 0;
}

.floating-heart::after {
    left: 15px;
    top: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(-45deg) scale(0.6);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-110vh) rotate(-45deg) scale(1.2);
        opacity: 0;
    }
}

/* Main Container */
.main-container {
    width: 90%;
    max-width: 480px;
    perspective: 1000px;
    z-index: 10;
}

/* Glassmorphic Cards */
.glass-card, .victory-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

/* Question Card Styling */
.stickman-container {
    height: 120px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulseIcon 2.5s ease-in-out infinite;
}

.stickman-svg {
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.05));
}

@keyframes pulseIcon {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.03);
    }
}

.card-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.card-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 35px;
    font-weight: 500;
    min-height: 54px; /* Prevent layout shifting when text changes */
    transition: opacity 0.3s ease;
}

/* Buttons Container & Buttons */
.buttons-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    min-height: 120px; /* Ensure space for massive 'Yes' buttons */
}

.btn {
    border: none;
    outline: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
}

.btn-yes {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 77, 109, 0.3);
    position: relative;
    z-index: 10;
}

.btn-yes:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-strong);
}

.btn-yes:active {
    transform: translateY(1px) scale(0.98);
}

.btn-no {
    background: #fff;
    color: var(--text-muted);
    border: 2px solid var(--accent-color);
    position: relative;
    z-index: 5;
}

.btn-no:hover {
    background: #fff0f2;
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Victory Screen Card */
.victory-card {
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    animation: victoryEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes victoryEntrance {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.victory-header {
    font-family: var(--font-cursive);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    animation: bounceText 1.5s infinite alternate;
}

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

.victory-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.4;
}

.victory-highlight {
    font-family: var(--font-cursive);
    font-size: 3rem;
    color: var(--secondary-color);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    animation: heartbeat 1.2s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    40% { transform: scale(1.05); }
    60% { transform: scale(1.15); }
}

.image-container {
    width: 100%;
    max-width: 320px;
    height: 240px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(255, 77, 109, 0.15);
    border: 4px solid #fff;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stickman-couple-svg {
    width: 100%;
    height: 100%;
    padding: 10px;
}

.stickman-couple-svg path[fill="#ff4d6d"] {
    transform-origin: 80px 32px;
    animation: heartbeatSvg 0.8s infinite alternate cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes heartbeatSvg {
    0% { transform: scale(1); }
    100% { transform: scale(1.18); }
}

.victory-footer {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Music Toggle Button */
.music-toggle-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s ease;
}

.music-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.6);
}

.music-toggle-btn.playing {
    animation: rotateMusic 4s linear infinite;
    background: #ffeaec;
    border-color: var(--primary-color);
}

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

.music-icon {
    font-size: 1.2rem;
}

/* Shake animation for 'No' button feedback */
.shake {
    animation: shakeAnim 0.5s ease-in-out;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Celebration Confetti */
.heart-confetti {
    position: absolute;
    pointer-events: none;
    z-index: 99;
    animation: fallConfetti linear forwards;
}

@keyframes fallConfetti {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(360deg);
        opacity: 0;
    }
}

/* Welcome Card Form Styles */
.form-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
}

.input-group {
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 18px;
    border-radius: 15px;
    border: 2px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 77, 109, 0.1);
}

