@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Montserrat:wght@300;400;600;700&display=swap');

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

:root {
    --primary: #ff4d6d;
    --secondary: #d63384;
    --accent: #6a1b9a;
    --light: #ffdde1;
    --glow: rgba(255, 77, 109, 0.6);
}

body {
    min-height: 100vh;
    background: #0a0a0a;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #ff6b9d, #c44569, #ffa07a, #ff6348, #ee5a6f, #d84a67);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    z-index: 0;
    opacity: 0.95;
    will-change: background-position;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 157, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(214, 51, 132, 0.1) 0%, transparent 50%);
    animation: particleFloat 25s ease-in-out infinite;
    z-index: 1;
    will-change: transform;
}

.container {
    text-align: center;
    padding: 2.5rem 2rem;
    max-width: 550px;
    width: 90%;
    z-index: 10;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(255, 77, 109, 0.2);
    animation: containerEntry 1s ease;
    margin: 20px auto;
}

.gif-container {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.gif-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #ffa07a, #ff6348);
    background-size: 300% 300%;
    border-radius: 25px;
    animation: borderGlow 4s ease infinite;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.7;
    will-change: background-position;
}

.gif-container img {
    width: 240px;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 77, 109, 0.3);
    animation: floatGif 4s ease-in-out infinite;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gif-container img:hover {
    transform: scale(1.05) rotate(2deg);
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #ffdde1 50%, #fff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    letter-spacing: -1px;
    animation: titleGlow 2s ease-in-out infinite;
    position: relative;
}

.title::after {
    content: '✨';
    position: absolute;
    right: -40px;
    top: -10px;
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

.subtitle {
    font-size: 1.15rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.3s both;
}

.main-btn {
    padding: 16px 45px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #ffdde1 100%);
    color: #ff4d6d;
    border: none;
    border-radius: 50px;
    box-shadow: 
        0 10px 30px rgba(255, 77, 109, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.6s both;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.main-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.main-btn:hover::before {
    left: 100%;
}

.main-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(255, 77, 109, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.5);
}

.main-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.input-box {
    position: relative;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.input-box input {
    width: 100%;
    padding: 18px 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 400;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    outline: none;
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.input-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.input-box input:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 5px 20px rgba(255, 77, 109, 0.3);
    transform: translateY(-2px);
}

.wish-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 2.5rem 2rem;
    border-radius: 25px;
    margin: 30px 0;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.wish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.wish-card img {
    width: 200px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 77, 109, 0.2);
    transition: transform 0.3s ease;
}

.wish-card img:hover {
    transform: scale(1.05) rotate(-2deg);
}

.wish-card p, .wish-card h3 {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

.credits {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    padding: 10px 30px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: creditsEntry 1s ease 0.5s both;
    max-width: 90%;
}

.credits p {
    margin: 5px 0;
    font-weight: 400;
}

.credits span {
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #ffdde1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.credits a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.credits a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.credits a:hover::after {
    width: 100%;
}

.credits a:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.floating {
    position: fixed;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 0 10px rgba(255, 77, 109, 0.6));
}

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

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes containerEntry {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes borderGlow {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 0.7;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 1;
    }
}

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

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    }
    50% { 
        text-shadow: 0 0 40px rgba(255, 255, 255, 0.6);
    }
}

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

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

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes creditsEntry {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (min-width: 1024px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .container {
        max-width: 500px;
        padding: 2.5rem 2rem;
        margin: 0 auto;
    }
    
    .gif-container img {
        width: 230px;
    }
    
    .title {
        font-size: 2.8rem;
    }
    
    .wish-card img {
        width: 190px;
    }
    
    .credits-home {
        display: none;
    }
    
    .credits-wishes {
        display: none;
    }
    
    .credits-wishes.final-card {
        display: block;
        position: fixed;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    .title::after {
        right: -25px;
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .container {
        padding: 2rem 1.5rem;
        margin: 20px;
        width: 95%;
    }

    .gif-container img {
        width: 200px;
    }

    .main-btn {
        padding: 15px 35px;
        font-size: 1.1rem;
    }

    .wish-card {
        padding: 2rem 1.5rem;
    }

    .wish-card img {
        width: 180px;
    }

    .credits {
        font-size: 0.75rem;
        padding: 8px 20px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .gif-container img {
        width: 180px;
    }

    .credits {
        font-size: 0.75rem;
        padding: 10px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 1366px) and (max-height: 768px) {
    body::before {
        animation: gradientShift 30s ease infinite;
    }
    
    body::after {
        animation: none;
        opacity: 0.5;
    }
    
    .gif-container::before {
        animation: none;
        opacity: 0.5;
    }
    
    .gif-container img {
        animation: none;
    }
    }
