@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@300;400;600&display=swap');

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Floating hearts background animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: softFloat 15s ease-in-out infinite;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 40px;
    color: #ffffff;
    padding: 20px;
    letter-spacing: 0.05em;
    text-align: center;
    word-spacing: 0.1em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 107, 107, 0.2);
    animation: fadeInDown 0.8s ease;
    line-height: 1.2;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #ffffff;
    padding: 20px;
    letter-spacing: 0.05em;
    text-align: center;
    word-spacing: 0.1em;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 107, 107, 0.2);
    animation: fadeInDown 0.8s ease;
    line-height: 1.2;
}

button {
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    color: white;
    margin: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    animation: fadeInUp 0.8s ease;
    will-change: transform;
    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.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, #ff5252, #ff1744);
}

button:active {
    transform: translateY(-4px) scale(1.05);
}

/* Mobile touch feedback */
@media (hover: none) and (pointer: coarse) {
    button:active {
        transform: translateY(-2px) scale(1.05);
    }
}

textarea {
    padding: 20px;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    height: 180px;
    resize: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease;
}

textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

textarea:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ff6b6b;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        margin-bottom: 30px;
        padding: 15px;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
        padding: 15px;
    }

    button {
        width: 140px;
        height: 140px;
        margin: 10px;
        font-size: 1.1rem;
    }

    textarea {
        max-width: 90%;
        height: 150px;
        padding: 15px;
        font-size: 1rem;
    }

    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 25px;
        padding: 10px;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 25px;
        padding: 10px;
    }

    button {
        width: 120px;
        height: 120px;
        margin: 8px;
        font-size: 0.95rem;
        padding: 10px 15px;
    }

    textarea {
        max-width: 95%;
        height: 130px;
        padding: 12px;
        font-size: 0.95rem;
    }

    .container {
        padding: 10px;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes softFloat {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Page transition animation */
@keyframes pageEnter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageEnter 0.5s ease;
}

/* =================== YES PAGE STYLES =================== */
body.yes-page {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 50%, #ff1744 100%);
    animation: celebrationGradient 4s ease infinite, pageEnter 0.5s ease;
}

body.yes-page::before {
    animation: softFloat 15s ease-in-out infinite, sparkles 2s ease-in-out infinite;
}

body.yes-page .container {
    animation: celebrationPulse 0.8s ease;
}

body.yes-page h1 {
    animation: celebrationBounce 1s ease-in-out, fadeInDown 0.8s ease;
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 107, 107, 0.4);
    color: #ffffff;
}

body.yes-page h2 {
    animation: fadeInDown 0.8s ease 0.2s both;
}

body.yes-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    animation: shinePulse 2s ease-in-out infinite;
}

/* =================== NO PAGE STYLES =================== */
body.no-page {
    background: linear-gradient(135deg, #667eea 0%, #5a67d8 50%, #4c51bf 100%);
    animation: sadnessGradient 6s ease infinite, pageEnter 0.5s ease;
}

body.no-page::before {
    animation: gentleFloat 20s ease-in-out infinite, subtleRain 3s ease-in-out infinite;
}

body.no-page .container {
    animation: gentleEnter 1.2s ease;
}

body.no-page h1 {
    animation: gentleSway 3s ease-in-out infinite, fadeInDown 0.8s ease;
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(102, 126, 234, 0.3);
    color: #e0e7ff;
}

body.no-page h2 {
    animation: fadeInDown 0.8s ease 0.2s both;
    color: #c7d2fe;
}

body.no-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(100, 116, 139, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(100, 116, 139, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: melancholyShift 8s ease-in-out infinite;
}

/* =================== YES PAGE ANIMATIONS =================== */
@keyframes celebrationGradient {
    0%, 100% {
        background: linear-gradient(135deg, #ff6b6b 0%, #ffd93d 50%, #ff1744 100%);
    }
    50% {
        background: linear-gradient(135deg, #ff1744 0%, #ff6b6b 50%, #ffd93d 100%);
    }
}

@keyframes celebrationBounce {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.05) translateY(-10px);
    }
}

@keyframes celebrationPulse {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes sparkles {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

@keyframes shinePulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
}

/* =================== NO PAGE ANIMATIONS =================== */
@keyframes sadnessGradient {
    0%, 100% {
        background: linear-gradient(135deg, #667eea 0%, #5a67d8 50%, #4c51bf 100%);
    }
    50% {
        background: linear-gradient(135deg, #4c51bf 0%, #667eea 50%, #5a67d8 100%);
    }
}

@keyframes gentleFloat {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes subtleRain {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.2;
    }
}

@keyframes gentleEnter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleSway {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-5px);
    }
}

@keyframes melancholyShift {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mobile optimizations for special pages */
@media (max-width: 768px) {
    body.yes-page h1 {
        font-size: 2.5rem;
    }

    body.no-page h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body.yes-page h1 {
        font-size: 2rem;
    }

    body.no-page h1 {
        font-size: 2rem;
    }
    
    body.yes-page::after,
    body.no-page::after {
        opacity: 0.8;
    }
}
