/* Global Vars & Reset */
:root {
    --primary-color: #ff4d6d;
    --secondary-color: #ff8fa3;
    --bg-gradient: linear-gradient(135deg, #fff0f3 0%, #ffe5ec 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-color: #590d22;
    --font-heading: 'Dancing Script', cursive;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    padding: 20px;
    width: 100%;
    max-width: 480px;
    /* Mobile first constraint */
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* Background Hearts Animation */
.background-hearts,
.bg-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* In a real implementation I'd add SVGs here via JS or simple CSS shapes */
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3.5C8-1 2-1 2 5c0 4 8 10 8 10s8-6 8-10c0-6-6-6-8-1.5z' fill='%23ffccd5' opacity='0.4'/%3E%3C/svg%3E");
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 100px 100px;
    }
}

/* Glass Card styling */
.glass-effect {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 30px 20px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(255, 77, 109, 0.15);
}

.title,
.heading {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.2;
}

.subtitle,
.intro-text {
    font-size: 1rem;
    color: #888;
    margin-bottom: 25px;
}

/* Form Styles */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

input,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ffccd5;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Gender Selector */
.gender-selector {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.radio-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: block;
    padding: 12px 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ffccd5;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked+.radio-label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.3);
    transform: translateY(-2px);
}

.radio-option:hover .radio-label {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}


/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
    text-decoration: none;
    text-align: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 10px;
}

/* SWIPE SLIDER */
.swipe-container {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: 15px;
    user-select: none;
    touch-action: none;
    /* Prevent scroll while swiping */
}

.swipe-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    border: 2px solid #ffcbda;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    transition: background 0.3s;
    padding: 0 20px;
}

.swipe-text {
    font-weight: 600;
    color: #ff4d6d;
    opacity: 0.8;
    animation: fadeInOut 2s infinite;
    z-index: 1;
    pointer-events: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.swipe-handle {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    cursor: grab;
    box-shadow: 0 4px 10px rgba(255, 77, 109, 0.4);
    z-index: 2;
    transition: transform 0.1s linear;
}

.swipe-handle:active {
    cursor: grabbing;
    transform: scale(1.1);
}

/* Success State */
.swipe-track.unlocked {
    background: #2dc653;
    border-color: #2dc653;
    animation: glowSuccess 0.5s ease-in-out;
}

@keyframes glowSuccess {
    0% {
        box-shadow: 0 0 0 rgba(45, 198, 83, 0);
    }

    50% {
        box-shadow: 0 0 20px rgba(45, 198, 83, 0.6);
    }

    100% {
        box-shadow: 0 0 0 rgba(45, 198, 83, 0);
    }
}

.swipe-track.unlocked .swipe-text {
    color: white;
    content: "ACCEPTED! 💖";
    opacity: 1;
}

/* POPUP - Smart NO Path */
.popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(255, 77, 109, 0.3);
    border: 2px solid #ffccd5;
    text-align: center;
}

#popupText {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Animations */
.shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 77, 109, 0.3);
    }
}

/* Results Area */
.hidden {
    display: none !important;
}

#resultArea {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 77, 109, 0.3);
}

.link-box {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.link-box input {
    width: 70%;
    padding: 10px;
    font-size: 0.9rem;
    color: #555;
}

.link-box button {
    width: 30%;
    border-radius: 12px;
}

/* Propose Page Specifics */
.mascot-container {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: -30px;
    /* Overlap with card */
    position: relative;
    z-index: 20;
}

.mascot {
    height: 150px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.big-question {
    font-size: 2rem;
    color: var(--text-color);
    margin: 30px 0 40px;
    font-weight: 700;
}

.highlight {
    color: var(--primary-color);
}

.interaction-area {
    margin-top: 20px;
    position: relative;
    /* For boundary checking logic if needed */
    width: 100%;
    padding: 0 10px;
}

/* Story Card */
.story-card {
    background: linear-gradient(135deg, #fff 0%, #fff0f3 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    border: 4px solid #fff;
    position: relative;
    overflow: hidden;
}

.story-header {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

.heart-icon-large {
    font-size: 4rem;
    margin: 10px 0;
    display: flex;
    justify-content: center;
}

.heart-icon-large img {
    mix-blend-mode: multiply;
    /* Removes white background */
    filter: contrast(1.1);
    /* Slight pop */
}

.final-message {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--primary-color);
    margin: 20px 0;
}

.names {
    font-weight: 700;
    /* Bold (User Request 3) */
    font-size: 1.6rem;
    /* Larger (User Request 3) */
    color: var(--text-color);
    text-transform: capitalize;
    margin-top: 15px;
    letter-spacing: 0.5px;
}

.story-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: #aaa;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 15px;
    padding-bottom: 20px;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.4);
    width: 100%;
}

/* Watermark Footer */
.watermark-footer {
    margin: 0.5rem auto 0 auto;
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.4);
    /* Slightly lighter for light theme */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    /* Pill shape */
    color: var(--primary-color);
    /* Match theme */
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(255, 77, 109, 0.1);
}

.watermark-footer:hover {
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 5px 15px rgba(255, 77, 109, 0.2);
}

/* Telegram Floating Button */
#telegramBtnContainer {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.telegram-float-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0088cc;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: bounceInUp 0.8s backwards, pulseTg 2s infinite;
}

.telegram-float-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.6);
    background: #0099e5;
}

.telegram-float-btn img {
    width: 20px;
    height: 20px;
}

@keyframes bounceInUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 100px);
    }

    60% {
        opacity: 1;
        transform: translate(-50%, -20px);
    }

    100% {
        transform: translate(-50%, 0);
    }
}

/* Custom pulse for Telegram */
@keyframes pulseTg {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 136, 204, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 136, 204, 0);
    }
}