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

body {
    margin: 0;
    background: linear-gradient(135deg, #ff6b9d 0%, #fec7d7 50%, #ff9a9e 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    font-family: 'Georgia', 'Times New Roman', serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated hearts background */
.hearts-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hearts-bg::before,
.hearts-bg::after {
    content: '💕';
    position: absolute;
    font-size: 30px;
    opacity: 0.15;
    animation: floatHeart 20s infinite;
}

.hearts-bg::before {
    left: 10%;
    animation-delay: 0s;
}

.hearts-bg::after {
    left: 80%;
    animation-delay: 10s;
}

@keyframes floatHeart {
    0% { transform: translateY(100vh) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

/* Screen transitions */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(255, 46, 145, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    animation: cardEntry 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 182, 193, 0.1), 
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

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

/* Loading animation */
.loading-animation {
    margin-bottom: 20px;
}

.heart-pulse {
    display: inline-block;
    font-size: 60px;
    animation: heartbeat 1.2s ease-in-out infinite;
}

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

.loading-text {
    font-size: 16px;
    color: #ff2f92;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Typography */
h1, h2 {
    color: #ff2f92;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(255, 47, 146, 0.2);
}

h1 {
    font-size: 32px;
    animation: fadeInDown 1s ease-out;
}

h2 {
    font-size: 28px;
}

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

.question-text {
    font-size: 20px;
    color: #6d214f;
    margin: 20px 0 30px 0;
    animation: fadeIn 1.5s ease-out;
}

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

p {
    color: #6d214f;
    font-size: 16px;
    line-height: 1.8;
}

.poem-text {
    font-size: 17px;
    line-height: 1.9;
    margin: 20px 0;
}

.final-poem {
    font-size: 15px;
    line-height: 1.9;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    text-align: left;
}

.final-poem::-webkit-scrollbar {
    width: 8px;
}

.final-poem::-webkit-scrollbar-track {
    background: #ffe0f0;
    border-radius: 10px;
}

.final-poem::-webkit-scrollbar-thumb {
    background: #ff9cb8;
    border-radius: 10px;
}

/* Buttons */
button {
    width: 80%;
    max-width: 250px;
    padding: 16px;
    margin-top: 15px;
    border-radius: 50px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::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;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

.yes-btn {
    background: linear-gradient(135deg, #ff2f92, #ff6b9d);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 47, 146, 0.4);
}

.yes-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 47, 146, 0.5);
}

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

.no-btn {
    background: #ffd6e8;
    color: #ff2f92;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.no-btn:hover {
    background: #ffc0da;
}

.continue-btn {
    background: linear-gradient(135deg, #9d50bb, #ff6b9d);
    color: white;
    box-shadow: 0 8px 20px rgba(157, 80, 187, 0.4);
}

.continue-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(157, 80, 187, 0.5);
}

/* Floating emojis */
.float {
    position: fixed;
    font-size: 26px;
    animation: rise 6s linear forwards;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

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

/* Special styling for poem and final cards */
.poem-card {
    max-width: 450px;
}

.final-card {
    max-width: 500px;
    max-height: 85vh;
}

.final-title {
    margin-bottom: 25px;
    font-size: 30px;
}

/* Responsive design */
@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    button {
        font-size: 16px;
        padding: 14px;
    }
    
    .final-poem {
        font-size: 14px;
    }
}

@media (max-height: 600px) {
    .card {
        padding: 20px 25px;
    }
    
    .final-poem {
        max-height: 50vh;
    }
}
