* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffc0cb, #ff9eb5, #ffb3d9);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

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

/* Card */
.card {
    background: rgba(253, 253, 253, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    border: 3px solid #ff8fab;
    box-shadow: 0 20px 60px rgba(255, 77, 141, 0.3);
    position: relative;
    z-index: 2;
    animation: cardEntrance 0.6s ease-out;
}

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

/* Image */
.card img,
.image-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ff8fab;
    transition: transform 0.3s ease;
}

.image-placeholder {
    background: linear-gradient(135deg, #ff8fab, #ffc0cb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: white;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(255, 77, 141, 0.3);
}

.image-placeholder.happy {
    background: linear-gradient(135deg, #ff4d8d, #ff8fab);
    animation: pulse 2s ease-in-out infinite;
}

.card img:hover,
.image-placeholder:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Text */
h2 {
    color: #ff4d8d;
    margin: 20px 0 10px;
    font-size: 24px;
    font-weight: 600;
}

p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Buttons */
#buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yes {
    background: linear-gradient(135deg, #ff8fab, #ff4d8d);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 77, 141, 0.4);
}

.yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 77, 141, 0.5);
}

.yes:active {
    transform: translateY(0);
}

.no {
    background: #ffc2d1;
    color: #ff4d8d;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.no:hover {
    background: #ffb3c6;
}

/* Floating hearts */
.heart {
    position: absolute;
    animation: float 6s linear infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes float {
    from { 
        transform: translateY(100vh) rotate(0deg); 
        opacity: 1; 
    }
    to { 
        transform: translateY(-10vh) rotate(360deg); 
        opacity: 0; 
    }
}

/* Success state */
.success {
    animation: celebrate 0.6s ease-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(-5deg); }
    75% { transform: scale(1.05) rotate(5deg); }
}

/* Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confettiFall 3s linear forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Sparkle effect */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleAnim 1s ease-out forwards;
}

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

/* Progress bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 77, 141, 0.2);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff8fab, #ff4d8d);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Emoji rain */
.emoji-rain {
    position: absolute;
    font-size: 30px;
    animation: emojiDrop 4s linear forwards;
    pointer-events: none;
}

@keyframes emojiDrop {
    to {
        transform: translateY(100vh) rotate(180deg);
        opacity: 0;
    }
}

/* Page transitions */
.page {
    transition: all 0.6s ease;
}

.hidden {
    display: none !important;
    opacity: 0;
    transform: scale(0.8);
}

.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Final page styles */
.sorry-container {
    margin-bottom: 20px;
}

.big-sorry {
    font-size: 80px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff8fab, #ff4d8d, #c44569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    animation: pulse 2s ease-in-out infinite;
}

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

.small-text {
    font-size: 16px;
    color: #ff4d8d;
    font-weight: 600;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }
    
    .card {
        padding: 35px 25px;
        max-width: 90%;
    }
    
    .card img,
    .image-placeholder {
        width: 140px;
        height: 140px;
    }
    
    .image-placeholder {
        font-size: 70px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    p {
        font-size: 13px;
    }
    
    .btn {
        padding: 11px 24px;
        font-size: 15px;
    }
    
    .big-sorry {
        font-size: 70px;
    }
    
    .progress-container {
        height: 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 70px;
    }
    
    .card {
        padding: 25px 20px;
        max-width: 95%;
        border-radius: 20px;
    }
    
    .card img,
    .image-placeholder {
        width: 110px;
        height: 110px;
        border: 3px solid #ff8fab;
    }
    
    .image-placeholder {
        font-size: 55px;
    }
    
    h2 {
        font-size: 19px;
        margin: 15px 0 8px;
    }
    
    p {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .big-sorry {
        font-size: 55px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    #buttons {
        gap: 12px;
        margin-top: 15px;
        flex-wrap: wrap;
    }
    
    .progress-container {
        height: 6px;
        margin-top: 12px;
    }
    
    .heart {
        font-size: 20px !important;
    }
    
    .confetti {
        width: 8px;
        height: 8px;
    }
    
    .emoji-rain {
        font-size: 25px;
    }
}

@media (max-width: 360px) {
    .card {
        padding: 20px 15px;
    }
    
    .card img,
    .image-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .image-placeholder {
        font-size: 50px;
    }
    
    h2 {
        font-size: 17px;
    }
    
    .btn {
        padding: 9px 18px;
        font-size: 13px;
    }
    
    .big-sorry {
        font-size: 45px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 14px 30px;
        font-size: 16px;
        min-height: 44px;
        min-width: 80px;
    }
    
    .no {
        touch-action: none;
    }
    
    .card img:hover,
    .image-placeholder:hover {
        transform: none;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-bottom: 60px;
    }
    
    .card {
        padding: 20px;
        max-width: 70%;
    }
    
    .card img,
    .image-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .image-placeholder {
        font-size: 50px;
    }
    
    h2 {
        font-size: 18px;
        margin: 10px 0 5px;
    }
    
    p {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .btn {
        padding: 8px 18px;
        font-size: 13px;
    }
    
    .footer {
        padding: 8px 15px;
    }
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 139, 171, 0.3);
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.region-info {
    font-size: 11px;
    color: #999;
}

@media (max-width: 480px) {
    .footer {
        padding: 10px 15px;
    }
    
    .footer-content p {
        font-size: 11px;
        margin: 3px 0;
    }
    
    .region-info {
        font-size: 10px;
    }
}
