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

:root {
    --pink-primary: #ff6b9d;
    --pink-light: #ffb3d1;
    --pink-dark: #ff4a7a;
    --purple-primary: #c77dff;
    --purple-light: #e0b3ff;
    --purple-dark: #9d4edd;
    --rose: #ff8fab;
    --rose-light: #ffc2d1;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.2);
    --glow: rgba(255, 107, 157, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--pink-light) 0%, var(--purple-light) 50%, var(--pink-primary) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

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

.heart {
    position: absolute;
    font-size: 24px;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 157, 0.3));
    pointer-events: none;
}

.heart {
    color: #ff6b9d;
}

.heart:nth-child(1) { left: 5%; animation-delay: 0s; font-size: 20px; }
.heart:nth-child(2) { left: 15%; animation-delay: 1.5s; font-size: 28px; }
.heart:nth-child(3) { left: 25%; animation-delay: 3s; font-size: 22px; }
.heart:nth-child(4) { left: 35%; animation-delay: 0.5s; font-size: 26px; }
.heart:nth-child(5) { left: 45%; animation-delay: 2s; font-size: 24px; }
.heart:nth-child(6) { left: 55%; animation-delay: 4s; font-size: 20px; }
.heart:nth-child(7) { left: 65%; animation-delay: 1s; font-size: 28px; }
.heart:nth-child(8) { left: 75%; animation-delay: 2.5s; font-size: 22px; }
.heart:nth-child(9) { left: 85%; animation-delay: 3.5s; font-size: 26px; }
.heart:nth-child(10) { left: 10%; animation-delay: 1.2s; font-size: 24px; }
.heart:nth-child(11) { left: 50%; animation-delay: 4.5s; font-size: 20px; }
.heart:nth-child(12) { left: 90%; animation-delay: 0.8s; font-size: 28px; }
.heart:nth-child(13) { left: 20%; animation-delay: 2.2s; font-size: 23px; }
.heart:nth-child(14) { left: 40%; animation-delay: 1.8s; font-size: 25px; }
.heart:nth-child(15) { left: 60%; animation-delay: 3.2s; font-size: 21px; }
.heart:nth-child(16) { left: 70%; animation-delay: 0.3s; font-size: 27px; }
.heart:nth-child(17) { left: 80%; animation-delay: 4.2s; font-size: 22px; }
.heart:nth-child(18) { left: 30%; animation-delay: 1.7s; font-size: 24px; }

/* Rose animations */
.rose {
    position: absolute;
    font-size: 24px;
    opacity: 0.6;
    animation: float 22s infinite ease-in-out;
    filter: drop-shadow(0 2px 4px rgba(220, 20, 60, 0.3));
    pointer-events: none;
    color: #dc143c;
}

.rose:nth-child(19) { left: 7%; animation-delay: 0.2s; font-size: 22px; }
.rose:nth-child(20) { left: 17%; animation-delay: 2.1s; font-size: 28px; }
.rose:nth-child(21) { left: 27%; animation-delay: 3.8s; font-size: 24px; }
.rose:nth-child(22) { left: 37%; animation-delay: 1.1s; font-size: 26px; }
.rose:nth-child(23) { left: 47%; animation-delay: 2.8s; font-size: 20px; }
.rose:nth-child(24) { left: 57%; animation-delay: 4.3s; font-size: 25px; }
.rose:nth-child(25) { left: 67%; animation-delay: 1.5s; font-size: 23px; }
.rose:nth-child(26) { left: 77%; animation-delay: 3.1s; font-size: 27px; }
.rose:nth-child(27) { left: 87%; animation-delay: 0.7s; font-size: 21px; }
.rose:nth-child(28) { left: 12%; animation-delay: 2.5s; font-size: 26px; }

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(50vh) translateX(30px) rotate(180deg) scale(1);
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(60px) rotate(360deg) scale(0.8);
        opacity: 0;
    }
}

/* Main container */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card */
.card {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.85) 0%, rgba(221, 160, 221, 0.85) 50%, rgba(255, 192, 203, 0.85) 100%);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 60px 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.3), 0 0 40px rgba(199, 125, 255, 0.4), inset 0 0 30px rgba(255, 255, 255, 0.2);
    position: relative;
    text-align: center;
    animation: cardEntrance 0.8s ease-out;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Rose decorations */
.rose-decoration {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.2;
    pointer-events: none;
}

.rose-left {
    top: -20px;
    left: -20px;
    background: radial-gradient(circle, var(--rose) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
}

.rose-right {
    bottom: -20px;
    right: -20px;
    background: radial-gradient(circle, var(--purple-primary) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(10px);
}

/* Typography */
.headline {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pink-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(255, 107, 157, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--purple-dark);
    margin-bottom: 8px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.9;
}

.subtitle-line2 {
    font-size: 1.1rem;
    color: var(--purple-dark);
    margin-bottom: 15px;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.9;
}

.signature-text {
    font-size: 0.85rem;
    color: rgba(157, 78, 221, 0.7);
    font-weight: 300;
    margin-bottom: 40px;
    text-align: right;
    font-style: italic;
    letter-spacing: 0.5px;
}


/* Buttons container */
.buttons-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

/* YES button */
.btn-yes {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--purple-primary) 100%);
    color: var(--white);
    border: none;
    padding: 20px 60px;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4), 0 0 20px rgba(199, 125, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-yes::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-yes:hover::before {
    width: 300px;
    height: 300px;
}

.btn-yes:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.5), 0 0 30px rgba(199, 125, 255, 0.4);
}

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

.heart-icon {
    font-size: 1.5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

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

/* NO button */
.btn-no {
    background: rgba(200, 200, 200, 0.3);
    color: #999;
    border: 1px solid #ddd;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    position: fixed;
    z-index: 1000;
    transition: opacity 0.2s ease, transform 0.1s ease;
    pointer-events: auto;
}

/* Success overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 157, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease;
}

.success-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-content {
    text-align: center;
    color: var(--white);
    animation: scaleIn 0.6s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.big-heart {
    font-size: 8rem;
    animation: pulse 1s ease-in-out infinite;
    margin-bottom: 20px;
}

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

.success-content h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.success-secondary {
    font-size: 1.3rem;
    margin-bottom: 15px;
    max-width: 500px;
    line-height: 1.5;
    opacity: 0.95;
}

.success-final {
    font-size: 1.1rem;
    max-width: 500px;
    line-height: 1.6;
    opacity: 0.9;
    font-style: italic;
}

/* Chat widget */
.chat-widget {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 100;
}

.chat-button {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--purple-primary) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: floatButton 3s ease-in-out infinite;
}

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

.chat-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.5);
}

.chat-icon {
    font-size: 1.3rem;
}

.chat-panel {
    position: absolute;
    top: 80px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 60px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.chat-panel.open {
    display: flex;
}

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

.chat-header {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--purple-primary) 100%);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.chat-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f9f9f9;
}

.message {
    display: flex;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.bot-message .message-content {
    background: var(--white);
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--purple-primary) 100%);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    display: flex;
    padding: 15px;
    gap: 10px;
    background: var(--white);
    border-top: 1px solid #e0e0e0;
}

#chatInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#chatInput:focus {
    border-color: var(--pink-primary);
}

.chat-send {
    background: linear-gradient(135deg, var(--pink-primary) 0%, var(--purple-primary) 100%);
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
}

.chat-send:hover {
    transform: scale(1.05);
}

.chat-send:active {
    transform: scale(0.95);
}

.typing-indicator {
    display: none;
    padding: 10px 20px;
    gap: 5px;
}

.typing-indicator.show {
    display: flex;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--pink-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--pink-primary);
    animation: confettiFall 3s ease-out forwards;
}

.confetti.heart {
    background: transparent;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.confetti.rose {
    background: var(--rose);
    border-radius: 50% 0 50% 0;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .headline {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .signature-text {
        font-size: 0.75rem;
    }
    
    .btn-yes {
        padding: 18px 50px;
        font-size: 1.5rem;
    }
    
    .card {
        padding: 40px 25px;
    }
    
    .chat-panel {
        width: calc(100vw - 40px);
        right: 20px;
        top: 100px;
    }
    
    .chat-widget {
        top: 20px;
        right: 20px;
    }
    
    .success-content h2 {
        font-size: 2rem;
    }
    
    .success-secondary {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .success-final {
        font-size: 1rem;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .headline {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .signature-text {
        font-size: 0.7rem;
    }
    
    .buttons-container {
        flex-direction: column;
    }
    
    .btn-yes {
        width: 100%;
        max-width: 300px;
    }
}

/* Signature */
.signature {
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5), 0 0 5px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    letter-spacing: 0.3px;
    font-weight: 400;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .chat-panel {
        top: 100px;
    }
    
    .chat-widget {
        top: 20px;
        right: 20px;
    }
    
    .signature {
        font-size: 0.65rem;
        bottom: 15px;
        left: 15px;
        padding: 4px 8px;
    }
}
