* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* HIDE SCROLLBARS GLOBALLY */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Chrome, Safari, Opera */
*::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

:root {
    --primary-pink: #FF6B9D;
    --secondary-pink: #FFC1E3;
    --accent-coral: #FF8B94;
    --soft-lavender: #E8B4F0;
    --warm-peach: #FFD3B5;
    --gold: #FFD700;
    --dark-text: #2D1B2E;
    --light-bg: #FFF5F7;
}

body {
    font-family: 'Quicksand', sans-serif;
    overflow: hidden; /* Prevents body scroll */
    height: 100vh;
    background: linear-gradient(135deg, 
        #FFE5EC 0%, 
        #FFC2D1 25%, 
        #FFB3C6 50%, 
        #FF8FAB 75%, 
        #FF6F91 100%
    );
    position: relative;
    -webkit-overflow-scrolling: touch;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Animated floating hearts background */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart {
    position: absolute;
    font-size: 20px;
    opacity: 0;
    animation: float-up 8s infinite ease-in;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Sparkle effect */
.sparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white;
    animation: sparkle 3s infinite ease-in-out;
}

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

/* Container system */
.container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.active {
    opacity: 1;
}

.container.hidden {
    display: none;
}

/* Ultra-modern glass card */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 3px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 20px 60px rgba(255, 107, 157, 0.3),
        0 0 100px rgba(255, 193, 227, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-radius: 40px;
    padding: 40px 40px;
    text-align: center;
    max-width: 90%;
    width: 500px;
    position: relative;
    overflow-y: auto; /* Allows content to scroll inside card if too tall */
    max-height: 90vh; /* Keeps card within screen height */
    animation: card-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes card-entrance {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% {
        transform: translate(-30%, -30%);
    }
    50% {
        transform: translate(30%, 30%);
    }
}

/* NEW STYLE: Date Badge */
.date-badge {
    background: linear-gradient(135deg, var(--secondary-pink), #fff);
    color: var(--primary-pink);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(255, 107, 157, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: slide-down 0.5s ease-out;
}

@keyframes slide-down {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Typography */
.emoji-header {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 1s infinite;
    display: inline-block;
}

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

.title-small {
    font-family: 'Quicksand', sans-serif;
    color: var(--primary-pink);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.2);
}

.subtitle {
    color: var(--dark-text);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.9;
}

/* Name display styles */
.sender-name {
    font-family: 'Pacifico', cursive;
    color: var(--primary-pink);
    font-size: 2rem;
    text-shadow: 3px 3px 6px rgba(255, 107, 157, 0.3);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 
            3px 3px 6px rgba(255, 107, 157, 0.3),
            0 0 20px rgba(255, 107, 157, 0.3);
    }
    50% {
        text-shadow: 
            3px 3px 6px rgba(255, 107, 157, 0.5),
            0 0 30px rgba(255, 107, 157, 0.5);
    }
}

.user-name {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-coral), var(--soft-lavender));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    margin-bottom: 5px;
    animation: shimmer-text 3s infinite;
    text-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

@keyframes shimmer-text {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

/* Input styles */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

input {
    padding: 18px 25px;
    border-radius: 25px;
    border: 3px solid var(--secondary-pink);
    background: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    color: var(--dark-text);
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
    -webkit-user-select: text;
    user-select: text;
    -webkit-appearance: none;
    appearance: none;
}

input:focus {
    border-color: var(--primary-pink);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.3),
        0 0 0 5px rgba(255, 107, 157, 0.1);
}

input::placeholder {
    color: var(--secondary-pink);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-coral));
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 25px rgba(255, 107, 157, 0.4),
        inset 0 -2px 10px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 56px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 35px rgba(255, 107, 157, 0.5),
        inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

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

/* Envelope */
.envelope-wrapper {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
}

.envelope-wrapper:hover {
    transform: scale(1.08) rotate(2deg);
}

.envelope {
    width: 180px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-pink), var(--accent-coral));
    position: relative;
    border-radius: 0 0 15px 15px;
    box-shadow: 
        0 15px 40px rgba(255, 107, 157, 0.4),
        inset 0 -5px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.envelope::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-left: 90px solid transparent;
    border-right: 90px solid transparent;
    border-top: 65px solid #FF8FB1;
    filter: drop-shadow(0 -5px 10px rgba(255, 107, 157, 0.3));
}

.heart-seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    animation: pulse-heart 1.5s infinite;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.6));
}

@keyframes pulse-heart {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.instruction {
    margin-top: 25px;
    color: var(--primary-pink);
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.2);
}

/* Question screen */
.gif-container {
    margin-bottom: 20px;
    animation: float-gif 3s ease-in-out infinite;
}

@keyframes float-gif {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.gif-bear {
    width: 160px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.title-main {
    font-family: 'Playfair Display', serif;
    color: var(--dark-text);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 15px;
    margin-top: 15px;
}

.rose-text {
    font-size: 2.5rem;
    display: inline-block;
    animation: rotate-rose 3s ease-in-out infinite;
}

@keyframes rotate-rose {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

/* Button container */
.buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    position: relative;
    height: 80px;
}

.btn {
    padding: 16px 45px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 54px;
}

.yes-btn {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
    box-shadow: 
        0 8px 25px rgba(76, 175, 80, 0.4),
        inset 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.yes-btn:hover {
    transform: scale(1.15);
    box-shadow: 
        0 12px 35px rgba(76, 175, 80, 0.5),
        inset 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.yes-btn::before {
    content: '✨';
    position: absolute;
    left: 10px;
    animation: sparkle-btn 1.5s infinite;
}

.yes-btn::after {
    content: '✨';
    position: absolute;
    right: 10px;
    animation: sparkle-btn 1.5s infinite 0.5s;
}

@keyframes sparkle-btn {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* The magical NO button that runs away smoothly */
.no-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-text);
    border: 3px solid var(--secondary-pink);
    position: absolute;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.2);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Success screen */
.success-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: spin-celebrate 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes spin-celebrate {
    0%, 100% {
        transform: rotate(-10deg) scale(1);
    }
    50% {
        transform: rotate(10deg) scale(1.1);
    }
}

.gif-hug {
    width: 180px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
    border: 5px solid rgba(255, 255, 255, 0.9);
    margin: 20px 0;
}

.message {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-top: 20px;
    line-height: 1.8;
}

.error {
    color: #FF4444;
    font-size: 0.95rem;
    margin-top: 15px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 68, 68, 0.2);
}

.shake {
    animation: shake-error 0.5s ease-in-out;
}

@keyframes shake-error {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-15px) rotate(-2deg);
    }
    75% {
        transform: translateX(15px) rotate(2deg);
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, 
            #FFE5EC 0%, 
            #FFC2D1 30%, 
            #FFB3C6 60%, 
            #FF8FAB 85%, 
            #FF6F91 100%
        );
    }

    .glass-card {
        padding: 35px 25px;
        width: 92%;
        border-radius: 30px;
        max-height: 90vh;
    }

    .emoji-header {
        font-size: 3.5rem;
        margin-bottom: 12px;
    }

    .title-small {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .sender-name {
        font-size: 1.7rem;
        margin-bottom: 8px;
    }

    .user-name {
        font-size: 2.2rem;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }

    .title-main {
        font-size: 1.6rem;
        margin-bottom: 12px;
    }

    .rose-text {
        font-size: 2rem;
    }

    /* Mobile input adjustments */
    input {
        padding: 16px 20px;
        font-size: 1rem;
        border-radius: 20px;
    }

    .input-group {
        gap: 18px;
        margin-top: 18px;
    }

    /* Mobile buttons */
    .btn-primary {
        padding: 16px 35px;
        font-size: 1.1rem;
        border-radius: 20px;
    }

    .btn {
        padding: 14px 30px;
        font-size: 1rem;
        white-space: nowrap;
    }

    .buttons-container {
        gap: 15px;
        margin-top: 25px;
        height: 70px;
    }

    /* Mobile envelope */
    .envelope {
        width: 150px;
        height: 100px;
    }

    .envelope::before {
        border-left: 75px solid transparent;
        border-right: 75px solid transparent;
        border-top: 55px solid #FF8FB1;
    }

    .heart-seal {
        font-size: 45px;
    }

    .instruction {
        font-size: 1.1rem;
        margin-top: 20px;
    }

    /* Mobile GIFs */
    .gif-bear {
        width: 140px;
        border-radius: 18px;
    }

    .gif-hug {
        width: 160px;
        border-radius: 18px;
    }

    .gif-container {
        margin-bottom: 15px;
    }

    .success-emoji {
        font-size: 4rem;
        margin-bottom: 15px;
    }

    .message {
        font-size: 1.15rem;
        line-height: 1.7;
        margin-top: 18px;
    }

    .error {
        font-size: 0.9rem;
        margin-top: 12px;
    }
}

/* Extra small mobile devices */
@media (max-width: 400px) {
    .glass-card {
        padding: 30px 20px;
        width: 95%;
    }

    .emoji-header {
        font-size: 3rem;
    }

    .title-small {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .sender-name {
        font-size: 1.5rem;
    }

    .user-name {
        font-size: 1.8rem;
        letter-spacing: 1.5px;
    }

    .title-main {
        font-size: 1.4rem;
    }

    .rose-text {
        font-size: 1.8rem;
    }

    input {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 14px 30px;
        font-size: 1rem;
    }

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

    .buttons-container {
        gap: 12px;
        height: 65px;
    }

    .envelope {
        width: 130px;
        height: 85px;
    }

    .envelope::before {
        border-left: 65px solid transparent;
        border-right: 65px solid transparent;
        border-top: 48px solid #FF8FB1;
    }

    .heart-seal {
        font-size: 40px;
    }

    .instruction {
        font-size: 1rem;
    }

    .gif-bear {
        width: 120px;
    }

    .gif-hug {
        width: 140px;
    }

    .success-emoji {
        font-size: 3.5rem;
    }

    .message {
        font-size: 1.05rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .glass-card {
        padding: 25px 20px;
        max-height: 85vh;
    }

    .emoji-header {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }

    .title-small {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .sender-name {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }

    .user-name {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    .title-main {
        font-size: 1.3rem;
        margin: 8px 0;
    }

    .gif-bear, .gif-hug {
        width: 100px;
    }

    .gif-container {
        margin-bottom: 10px;
    }

    .buttons-container {
        margin-top: 15px;
        height: 60px;
    }

    .message {
        font-size: 1rem;
        margin-top: 10px;
    }
}