#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

void type(char *msg) {
    for (int i = 0; msg[i] != '\0'; i++) {
        printf("%c", msg[i]);
        fflush(stdout);
        usleep(60000);
    }
}

int main() {
    char choice;

    system("clear");   // use cls on windows

    printf("\n\n");
    printf("        ❤️     ❤️\n");
    printf("     ❤️     ❤️     ❤️\n");
    printf("        ❤️     ❤️\n");
    printf("\n");
    sleep(1);

    type("hey nayana\n\n");
    sleep(1);

    type("its been two years with you\n");
    type("and i still smile thinking about us\n\n");
    sleep(1);

    type("the first conversations\n");
    type("the nervous excitement\n");
    type("the way we slowly became close\n\n");

    type("our late night talks\n");
    type("random calls\n");
    type("long chats that never felt long\n\n");

    type("the silly fights\n");
    type("the misunderstandings\n");
    type("and the way we always came back to each other\n\n");

    type("the laughter\n");
    type("the quiet moments\n");
    type("just sitting together doing nothing\n\n");

    type("you became my habit\n");
    type("my comfort\n");
    type("my safe place\n\n");
    sleep(1);

    type("so today i just want to ask you again\n\n");
    sleep(1);

    type("will you be my valentine ❤️ (y/n): ");
    scanf(" %c", &choice);

    printf("\n");

    if (choice == 'y' || choice == 'Y') {
        system("clear");
        printf("\n\n");
        printf("        ❤️ ❤️ ❤️ ❤️ ❤️\n");
        printf("     ❤️                       ❤️\n");
        printf("   ❤️     she said yes 😭❤️      ❤️\n");
        printf("     ❤️                       ❤️\n");
        printf("        ❤️ ❤️ ❤️ ❤️ ❤️\n\n");

        type("two years passed\n");
        type("and my choice is still you\n\n");

        type("i promise to grow with you\n");
        type("support your dreams\n");
        type("and hold your hand through everything\n\n");

        type("i love you sothumma ❤️\n");
        type("        adith\n\n");
    } 
    else {
        system("clear");
        printf("\n\n");
        printf("        💔 💔 💔\n");
        printf("   error 404 rejection not accepted\n");
        printf("   please press y again 😌❤️\n\n");
    }

    return 0;
}