/* Global Styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #ffe6e6;
    /* Light pink background */
    background-image: radial-gradient(#ffc0cb 2px, transparent 2px), radial-gradient(#ffc0cb 2px, transparent 2px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    font-family: 'Nunito', sans-serif;
    overflow: hidden;
    /* Prevent scrollbars when button moves */
}

/* Floating Hearts */
.heart-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.heart {
    position: absolute;
    bottom: -10px;
    background-color: rgba(255, 105, 180, 0.6);
    display: inline-block;
    height: 30px;
    margin: 0 10px;
    transform: rotate(-45deg);
    width: 30px;
    animation: float 6s linear infinite;
}

.heart:after,
.heart:before {
    content: "";
    background-color: rgba(255, 105, 180, 0.6);
    border-radius: 50%;
    height: 30px;
    position: absolute;
    width: 30px;
}

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

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

@keyframes float {
    0% {
        transform: translateY(0) rotate(-45deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) rotate(-45deg) scale(1);
        opacity: 0;
    }
}

/* Container */
.container {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(255, 105, 180, 0.2);
    text-align: center;
    max-width: 90%;
    width: 400px;
    position: relative;
    z-index: 10;
    border: 3px solid #ff69b4;
}

/* Header Text */
.header-text {
    font-family: 'Pacifico', cursive;
    color: #ff1493;
    /* Deep pink */
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px #ffe6e6;
}

/* GIF Container */
.gif-container {
    margin-bottom: 2rem;
}

.responsive-gif {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Buttons */
.buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    align-items: center;
    min-height: 60px;
    /* Space for buttons */
}

.btn {
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-yes {
    background-color: #ff69b4;
    /* Hot pink */
    color: white;
}

.btn-yes:hover {
    background-color: #ff1493;
    transform: scale(1.05);
}

.btn-no {
    background-color: #ffffff;
    color: #ff69b4;
    border: 2px solid #ff69b4;
    position: relative;
    /* Changing to absolute in JS */
}

.btn-no:hover {
    background-color: #ffe6e6;
}

/* Confetti & Extras (for Yes page) */
.celebration-text {
    font-size: 2rem;
    color: #ff1493;
}

/* Wheel Styles */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: transform 5s ease-out;
    background: conic-gradient(#ffadad 0deg 90deg,
            /* Coupons */
            #ffd6a5 90deg 180deg,
            /* Reasons */
            #fdffb6 180deg 270deg,
            /* Memories */
            #caffbf 270deg 360deg
            /* Letter */
        );
    position: relative;
    transform: rotate(0deg);
}

.wheel span {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    display: block;
    /* Make sure it's visible */
}

.segment {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    /* extend to edge */
    height: 20px;
    /* arbitrary height for centering */
    transform-origin: 0% 50%;
    /* Rotate around center of wheel */
    text-align: right;
    /* push text to edge */
    padding-right: 40px;
    /* Space from edge */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 
   We will rotate these segments in HTML/CSS to align with the center of the wedges.
   Wedge 1 (0-90): Center 45deg
   Wedge 2 (90-180): Center 135deg
   Wedge 3 (180-270): Center 225deg
   Wedge 4 (270-360): Center 315deg
   
   Adjusting for transform-origin (0 0 vs 0 50%).
*/

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #ff1493;
    z-index: 10;
}

/* Coupon Styles */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.coupon {
    background: #fff;
    border: 2px dashed #ff69b4;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.coupon:hover {
    transform: scale(1.05);
    background: #fff0f5;
}

.coupon.redeemed {
    opacity: 0.5;
    background: #ddd;
    text-decoration: line-through;
    pointer-events: none;
}

.coupon.selected {
    border: 3px solid #ff1493;
    background-color: #ffe6e6;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.5);
}

/* Heart Grid Gallery */
.heart-gallery {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* 7 columns wide */
    grid-gap: 5px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.heart-cell {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.heart-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px;
}

.heart-cell:not(.empty):hover {
    transform: scale(1.8);
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

/* Hide empty cells */
.heart-cell.empty {
    visibility: hidden;
}

/* Letter */
.letter-content {
    background-image: linear-gradient(#fdfbf7 1.1rem, #ccc 1.2rem);
    background-size: 100% 1.2rem;
    line-height: 1.2rem;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    text-align: left;
    border-radius: 5px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        width: 95% !important;
        max-width: 95% !important;
        padding: 1.5rem !important;
        margin: 10px auto;
    }

    .heart-gallery {
        grid-gap: 2px;
    }

    .header-text {
        font-size: 2rem !important;
    }

    .wheel-container {
        width: 250px;
        height: 250px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Specific overrides */
.special-header {
    font-size: 3rem;
}

@media (max-width: 600px) {
    .special-header {
        font-size: 2.2rem !important;
        /* Slightly larger than normal header but smaller than desktop */
    }
}