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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.stars::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 3s linear infinite;
}

@keyframes sparkle {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Welcome Screen */
.title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.start-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255,107,107,0.3);
    animation: fadeInUp 1s ease-out 1s both;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255,107,107,0.4);
}

/* Journey Screen */
.map-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.world-map {
    width: 80%;
    height: 60%;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.journey-point {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px currentColor);
}

.journey-point:hover {
    r: 12;
    filter: drop-shadow(0 0 15px currentColor);
}

.journey-point.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { r: 8; opacity: 1; }
    50% { r: 15; opacity: 0.7; }
    100% { r: 8; opacity: 1; }
}

.flight-path {
    stroke-dasharray: 10 5;
    animation: dash 3s linear infinite;
    filter: drop-shadow(0 0 8px #ffd93d);
}

@keyframes dash {
    to {
        stroke-dashoffset: -15;
    }
}

.flight-path.animate {
    animation: drawPath 2s ease-in-out forwards, dash 3s linear infinite 2s;
}

@keyframes drawPath {
    from {
        stroke-dasharray: 0 1000;
        opacity: 0;
    }
    to {
        stroke-dasharray: 10 5;
        opacity: 1;
    }
}

/* Location Card */
.location-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 450px;
    width: 90%;
    transition: all 0.5s ease;
}

/* Photo Gallery */
.photo-gallery {
    position: relative;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    overflow: hidden;
}

.location-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.3s ease;
    filter: brightness(1.1) saturate(1.2);
}

.location-photo:hover {
    transform: scale(1.05);
    filter: brightness(1.2) saturate(1.3);
}

.photo-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 15px;
}

.photo-heart {
    position: absolute;
    font-size: 1.5rem;
    color: #ff6b6b;
    animation: photoHeartFloat 2s ease-out forwards;
    pointer-events: none;
}

@keyframes photoHeartFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-40px) scale(0.8);
        opacity: 0;
    }
}

/* Simplified animations for mobile performance */
@media (max-width: 768px) {
    @keyframes photoHeartFloat {
        0% {
            transform: translateY(0) scale(0.8);
            opacity: 1;
        }
        100% {
            transform: translateY(-30px) scale(0.3);
            opacity: 0;
        }
    }
    
    /* Reduce animation duration on mobile */
    .photo-heart {
        animation-duration: 1.5s !important;
    }
    
    /* Optimize celebration animations for mobile */
    @keyframes celebrationPhotoEntrance {
        0% {
            transform: scale(0) rotate(0deg);
            opacity: 0;
        }
        100% {
            transform: scale(1) rotate(180deg);
            opacity: 1;
        }
    }
    
    /* Reduce particle effects on mobile */
    .firework {
        animation-duration: 0.8s !important;
    }
    
    .floating-heart {
        animation-duration: 2s !important;
    }
}

.location-card.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
}

.location-card h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.location-card p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
}

#next-btn {
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78,205,196,0.3);
}

/* Proposal Screen */
.proposal-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

/* Main Photo Container */
.main-photo-container {
    position: relative;
    margin-bottom: 2rem;
    display: inline-block;
}

.main-photo {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.8);
    box-shadow: 0 0 30px rgba(255,107,107,0.5);
    animation: photoGlow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.main-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(255,107,107,0.7);
}

@keyframes photoGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255,107,107,0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(255,107,107,0.8), 0 0 70px rgba(255,182,193,0.4);
    }
}

.photo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,107,107,0.3) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.proposal-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    color: #fff;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.heart-container {
    margin: 2rem 0;
}

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

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.question {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.button-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.choice-btn {
    padding: 1rem 2.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.yes-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    color: white;
    box-shadow: 0 8px 25px rgba(255,107,107,0.3);
}

.yes-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255,107,107,0.4);
}

.no-btn {
    background: linear-gradient(45deg, #a8a8a8, #d3d3d3);
    color: #666;
    box-shadow: 0 8px 25px rgba(168,168,168,0.3);
    transition: all 0.2s ease;
}

.no-btn.running {
    position: absolute;
    /* Animation removed - button only moves when clicked */
}

@keyframes runAway {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(100px) translateY(-50px) rotate(15deg); }
    50% { transform: translateX(-100px) translateY(50px) rotate(-15deg); }
    75% { transform: translateX(150px) translateY(-30px) rotate(10deg); }
    100% { transform: translateX(-150px) translateY(30px) rotate(-10deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px) rotate(-1deg); }
    20%, 40%, 60%, 80% { transform: translateX(3px) rotate(1deg); }
}

/* Beauty compliment animation */
@keyframes beautyComplimentFloat {
    0% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
    15% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    85% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
}

/* Celebration Screen */
.celebration-content {
    text-align: center;
    position: relative;
}

/* Celebration Photos */
.celebration-photos {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.celebration-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 0 20px rgba(255,107,107,0.6);
    animation: celebrationPhotoEntrance 1s ease-out var(--delay) both;
    transition: all 0.3s ease;
}

.celebration-photo:hover {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 0 30px rgba(255,107,107,0.8);
}

@keyframes celebrationPhotoEntrance {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(-90deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.celebration-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: bounce 1s ease-out;
    z-index: 10;
    position: relative;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.fireworks-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hearts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: firework 1s ease-out forwards;
}

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

.floating-heart {
    position: absolute;
    font-size: 2rem;
    color: #ff6b6b;
    animation: floatUp 3s ease-out forwards;
    pointer-events: none;
}

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

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

/* Mobile-First Responsive Design */

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 1rem;
    }
    
    .screen {
        padding: 1rem;
    }
    
    /* Welcome Screen Mobile */
    .title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .start-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        min-height: 48px; /* Touch target */
    }
    
    /* Journey Screen Mobile */
    .world-map {
        width: 100%;
        height: 40vh;
        min-height: 300px;
    }
    
    .journey-point {
        width: 12px;
        height: 12px;
    }
    
    .journey-point::before {
        width: 20px;
        height: 20px;
    }
    
    /* Location Card Mobile */
    .location-card {
        width: 95%;
        max-width: none;
        margin: 1rem auto;
        padding: 1.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .location-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .location-message {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .photo-gallery {
        margin: 1rem 0;
    }
    
    .gallery-photo {
        width: 100%;
        max-width: 280px;
        height: 200px;
    }
    
    .next-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* Proposal Screen Mobile */
    .proposal-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .question {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .main-photo-container {
        width: 200px;
        height: 200px;
        margin: 1rem auto 2rem;
    }
    
    .main-photo {
        width: 180px;
        height: 180px;
    }
    
    .button-container {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .yes-btn, .no-btn {
        width: fit-content;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 56px; /* Larger touch target */
    }
    
    /* Celebration Screen Mobile */
    .celebration-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .celebration-message {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .celebration-photos {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .celebration-photo {
        width: 150px;
        height: 150px;
    }
}

/* Medium Mobile Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .title {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .world-map {
        width: 95%;
        height: 45vh;
    }
    
    .location-card {
        width: 90%;
        max-width: 500px;
    }
    
    .proposal-title {
        font-size: 2.5rem;
    }
    
    .question {
        font-size: 1.8rem;
    }
    
    .main-photo-container {
        width: 250px;
        height: 250px;
    }
    
    .main-photo {
        width: 220px;
        height: 220px;
    }
    
    .button-container {
        flex-direction: row;
        gap: 2rem;
    }
    
    .yes-btn, .no-btn {
        padding: 1rem 2rem;
        min-height: 52px;
    }
    
    .celebration-title {
        font-size: 2.8rem;
    }
    
    .celebration-photos {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .celebration-photo {
        width: 120px;
        height: 120px;
    }
}

/* Tablet Devices (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .title {
        font-size: 3.5rem;
    }
    
    .world-map {
        width: 90%;
        height: 60vh;
    }
    
    .location-card {
        width: 80%;
        max-width: 600px;
    }
    
    .main-photo-container {
        width: 300px;
        height: 300px;
    }
    
    .main-photo {
        width: 260px;
        height: 260px;
    }
}

/* Touch-specific optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .start-btn:hover,
    .next-btn:hover,
    .yes-btn:hover,
    .no-btn:hover {
        transform: none;
    }
    
    /* Add touch feedback */
    .start-btn:active,
    .next-btn:active,
    .yes-btn:active,
    .no-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Optimize photo interactions for touch */
    .gallery-photo:hover,
    .main-photo:hover,
    .celebration-photo:hover {
        transform: none;
    }
    
    .gallery-photo:active,
    .main-photo:active,
    .celebration-photo:active {
        transform: scale(0.98);
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .screen {
        padding: 0.5rem;
    }
    
    .title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .world-map {
        height: 60vh;
    }
    
    .location-card {
        max-height: 70vh;
        padding: 1rem;
    }
    
    .proposal-title {
        font-size: 1.8rem;
    }
    
    .question {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .main-photo-container {
        width: 150px;
        height: 150px;
        margin: 0.5rem auto 1rem;
    }
    
    .main-photo {
        width: 130px;
        height: 130px;
    }
    
    .celebration-title {
        font-size: 1.8rem;
    }
    
    .celebration-photos {
        margin: 1rem 0;
    }
    
    .celebration-photo {
        width: 80px;
        height: 80px;
    }
}