@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, #0a5f5f 0%, #2d7d8f 25%, #4a9faf 50%, #2d7d8f 75%, #0a5f5f 100%);
    color: white;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Animated vibrant watercolor background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(100, 220, 220, 0.35) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 150, 180, 0.3) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 70%, rgba(120, 255, 180, 0.28) 0%, transparent 42%),
        radial-gradient(ellipse at 15% 80%, rgba(255, 200, 120, 0.25) 0%, transparent 38%),
        radial-gradient(ellipse at 90% 85%, rgba(180, 200, 255, 0.32) 0%, transparent 48%),
        radial-gradient(ellipse at 40% 40%, rgba(255, 180, 220, 0.2) 0%, transparent 50%);
    animation: watercolorFlow 20s ease-in-out infinite;
}

@keyframes watercolorFlow {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 70%, 0% 80%, 100% 100%, 40% 40%;
        filter: hue-rotate(0deg) saturate(1.3);
    }
    33% {
        background-position: 20% 30%, 80% 20%, 60% 40%, 10% 90%, 90% 80%, 50% 50%;
        filter: hue-rotate(10deg) saturate(1.4);
    }
    66% {
        background-position: 40% 60%, 60% 40%, 70% 30%, 20% 70%, 80% 60%, 30% 60%;
        filter: hue-rotate(-8deg) saturate(1.35);
    }
}

/* Floating animated nature doodles */
.doodle {
    position: fixed;
    width: 90px;
    height: 90px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.45;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawDoodle 4s ease-in-out forwards, floatDoodle 12s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.doodle-lotus1 {
    top: 8%;
    left: 12%;
    animation-delay: 0.5s, 1.5s;
    color: #ff8fa3;
    width: 95px;
    height: 95px;
}

.doodle-lotus2 {
    top: 18%;
    right: 15%;
    animation-delay: 1.2s, 2s;
    color: #ffb380;
    width: 85px;
    height: 85px;
}

.doodle-koi1 {
    top: 35%;
    left: 8%;
    animation-delay: 1.8s, 2.8s;
    color: #ff6b8a;
    width: 130px;
    height: 65px;
    animation: drawDoodle 4s ease-in-out forwards, swimKoi1 15s ease-in-out infinite;
}

.doodle-koi2 {
    bottom: 30%;
    right: 10%;
    animation-delay: 2.4s, 3.5s;
    color: #ffab70;
    width: 130px;
    height: 65px;
    animation: drawDoodle 4s ease-in-out forwards, swimKoi2 18s ease-in-out infinite;
}

.doodle-lilypad {
    bottom: 15%;
    left: 15%;
    animation-delay: 1s, 1.8s;
    color: #7dd3a3;
    width: 90px;
    height: 90px;
}

.doodle-ripple {
    top: 55%;
    right: 20%;
    animation-delay: 3s, 4s;
    color: #a0d8ff;
    width: 85px;
    height: 85px;
    animation: drawDoodle 3s ease-in-out forwards, pulseRipple 6s ease-in-out infinite;
}

.doodle-leaf {
    bottom: 45%;
    left: 25%;
    animation-delay: 2.2s, 3.2s;
    color: #95e8b5;
    width: 75px;
    height: 75px;
}

@keyframes drawDoodle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes floatDoodle {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(15px, -20px) rotate(3deg);
    }
    50% {
        transform: translate(-10px, -15px) rotate(-3deg);
    }
    75% {
        transform: translate(20px, -10px) rotate(2deg);
    }
}

@keyframes swimKoi1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scaleX(1);
    }
    25% {
        transform: translate(40px, -15px) rotate(-5deg) scaleX(1);
    }
    50% {
        transform: translate(60px, 10px) rotate(3deg) scaleX(-1);
    }
    75% {
        transform: translate(30px, -10px) rotate(-3deg) scaleX(-1);
    }
}

@keyframes swimKoi2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scaleX(1);
    }
    30% {
        transform: translate(-50px, 20px) rotate(5deg) scaleX(1);
    }
    60% {
        transform: translate(-70px, -15px) rotate(-4deg) scaleX(-1);
    }
    85% {
        transform: translate(-35px, 10px) rotate(4deg) scaleX(-1);
    }
}

@keyframes pulseRipple {
    0%, 100% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.3;
    }
}

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

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.screen.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
}

.screen.exit-left {
    opacity: 0;
    transform: translateX(-100%) scale(0.95);
}

.content {
    max-width: 800px;
    width: 90%;
    text-align: center;
    padding: 2rem;
}

/* Input Screen */
.title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #ffd7a8, #ffb8d4, #d4b5ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 6s ease infinite;
    line-height: 1.1;
    font-family: 'Space Grotesk', sans-serif;
}

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

.subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    font-style: italic;
}

/* Word Grid */
.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.word-option {
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: visible;
}

.word-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 255, 200, 0.4), rgba(255, 150, 200, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.word-option::after {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0) rotate(0deg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.word-option:hover::before {
    width: 300px;
    height: 300px;
}

.word-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(100, 255, 200, 0.6);
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 35px rgba(100, 255, 200, 0.3);
}

.word-option:hover::after {
    opacity: 1;
    transform: scale(1) rotate(20deg);
}

.word-option.selected {
    background: linear-gradient(135deg, rgba(100, 255, 200, 0.25), rgba(255, 150, 200, 0.25));
    border-color: rgba(255, 200, 150, 0.8);
    border-width: 3px;
    transform: scale(1.08) rotate(-1deg);
    box-shadow:
        0 15px 40px rgba(255, 200, 150, 0.4),
        0 0 20px rgba(255, 200, 150, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    animation: selectedPulse 1.5s ease-in-out infinite;
}

.word-option.selected::after {
    content: '🌟';
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
    animation: sparkleRotate 2s linear infinite;
}

@keyframes selectedPulse {
    0%, 100% {
        box-shadow:
            0 15px 40px rgba(255, 200, 150, 0.4),
            0 0 20px rgba(255, 200, 150, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 18px 50px rgba(255, 200, 150, 0.6),
            0 0 30px rgba(255, 200, 150, 0.5),
            inset 0 0 25px rgba(255, 255, 255, 0.3);
    }
}

@keyframes sparkleRotate {
    0% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1.2) rotate(360deg); }
}

.word-option.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Selected words display */
.selected-words {
    min-height: 80px;
    margin-bottom: 2rem;
}

.selection-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.word-tags {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    min-height: 40px;
}

.selected-tag {
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, rgba(255, 215, 168, 0.15), rgba(212, 181, 255, 0.15));
    border: 1px solid rgba(255, 215, 168, 0.4);
    border-radius: 30px;
    font-size: 1.1rem;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.cta-button {
    padding: 1.5rem 4rem;
    font-size: 1rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ffd7a8, #d4b5ff);
    border: none;
    border-radius: 50px;
    color: #1a0e2e;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(255, 215, 168, 0.2);
    position: relative;
    overflow: hidden;
}

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

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 30px 60px rgba(255, 215, 168, 0.3);
}

.cta-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.secondary-button {
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 168, 0.4);
    transform: translateY(-2px);
}

/* Slide Animations */
.slide-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    font-style: italic;
    opacity: 0;
    animation: fadeInDown 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Reflection Card */
.reflection-card {
    animation: scaleIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
    max-width: 650px;
    margin: 0 auto;
}

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

.reflection-text {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 0.02em;
    font-style: italic;
}

/* Wisdom Card */
.wisdom-card {
    position: relative;
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInScale 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

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

.quote-mark {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    color: #ffd7a8;
    opacity: 0;
    animation: fadeIn 1s ease 1.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 0.2; }
}

.wisdom-text {
    font-size: clamp(1.4rem, 4vw, 2rem);
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
    position: relative;
}

.wisdom-author {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: rgba(255, 215, 168, 0.8);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.05em;
}

/* Wish Card */
.wish-card {
    background: linear-gradient(135deg, rgba(255, 215, 168, 0.08), rgba(212, 181, 255, 0.08));
    border: 1px solid rgba(255, 215, 168, 0.2);
    border-radius: 32px;
    padding: clamp(2.5rem, 6vw, 4.5rem);
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: revealWish 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.wish-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 215, 168, 0.08) 50%,
        transparent 70%);
    animation: shimmer 4s linear infinite;
}

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

@keyframes revealWish {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wish-content {
    position: relative;
    z-index: 1;
}

.wish-text {
    font-size: clamp(1.5rem, 4.5vw, 2.3rem);
    line-height: 1.8;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.wish-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.blessing {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: rgba(255, 215, 168, 0.7);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.05em;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .word-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .word-option {
        padding: 1.2rem 0.8rem;
        font-size: 1rem;
    }

    .cta-button {
        padding: 1.2rem 3rem;
        font-size: 0.9rem;
    }

    .doodle {
        width: 55px;
        height: 55px;
    }

    .doodle-lotus1, .doodle-lotus2 {
        width: 60px;
        height: 60px;
    }

    .doodle-koi1, .doodle-koi2 {
        width: 85px;
        height: 42px;
    }

    .doodle-lilypad {
        width: 55px;
        height: 55px;
    }

    .doodle-ripple {
        width: 50px;
        height: 50px;
    }

    .doodle-leaf {
        width: 50px;
        height: 50px;
    }
}

/* Copy notification */
.copy-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #ffd7a8, #d4b5ff);
    color: #1a0e2e;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(255, 215, 168, 0.4);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.copy-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Particle burst effect */
.particle {
    position: fixed;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 9999;
    animation: particleBurst 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes particleBurst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    60% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.5) rotate(360deg);
    }
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    z-index: 999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
