body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #2a385a;
}

.user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user form {
    display: inline;
    margin: 0;
}

.user a {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.user a:first-child {
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
}

.user a:first-child:hover {
    background: rgba(56, 189, 248, 0.15);
}

.user a:last-child {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.user a:last-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}




h1 {
    color: #38bdf8;
    text-align: center;
    font-family: 'Audiowide', Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: 4px;
    font-size: 35px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.seo-intro {
    color: #38bdf8;
    text-align: center;
    font-family: 'Audiowide', Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}




.main {
    margin-top: 70px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.7);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 1);
}

html {
    scroll-behavior: smooth;
}





.anime-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 90%;
    margin: 0 auto;
    margin-top: 20px;
}

.anime {
    display: flex;
    flex-direction: column;
    height: auto;
    /* 🔥 */
    text-align: center;
}

.anime img {
    height: 300px;
    border-radius: 10px;
}



.anime-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.anime-link h3 {
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;

    margin: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: #38bdf8;
    text-align: center;

    height: 48px;
}

.anime-link img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    transition: 0.25s ease;
    margin-bottom: 20px;
}

.anime-link:hover img {
    transform: scale(1.05);
}

.anilist-sync-btn {
    padding: 6px 16px;
    border-radius: 999px;

    border: 1px solid rgba(34, 197, 94, 0.6);
    background: transparent;

    color: #22c55e;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.25s ease;
}

.anilist-sync-btn:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    transform: translateY(-1px);
}

.anilist-sync-btn:active {
    transform: scale(0.95);
}





/* CUSTOM SELECT */
.custom-select {
    padding-top: 20px;
    position: relative;
    width: auto;
    /* 🔥 fondamentale */
    min-width: 160px;
    /* dimensione minima */
    max-width: 220px;
    /* evita che diventino enormi */
}

/* SELECTED (chiuso) */
.selected {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    background: #0f172a;
    color: #38bdf8;
    font-weight: 600;
    transition: 0.25s ease;
    position: relative;

    width: 100%;
    box-sizing: border-box;

    cursor: pointer;
    touch-action: manipulation;
}


/* freccia */
.selected::after {
    content: "▾";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.select-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px auto;
    width: 90%;
    flex-wrap: wrap;
}

/* hover */
.custom-select:hover .selected {
    background: rgba(56, 189, 248, 0.08);
    border-color: #38bdf8;
}

/* OPTIONS */
.options {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;

    background: #0f172a;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.3);

    overflow: hidden;
    display: none;
    z-index: 9999;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* open */
.custom-select.open .options {
    display: block;
}

/* option item */
.options div {
    padding: 10px 14px;
    color: #38bdf8;
    transition: 0.2s ease;
}

/* hover option */
.options div:hover {
    background: rgba(56, 189, 248, 0.15);
}












.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.next-btn {
    padding: 10px 26px;
    border-radius: 999px;

    border: 1px solid rgba(56, 189, 248, 0.5);
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);

    color: #0f172a;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);

    transition: all 0.25s ease;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6);
}

.next-btn:active {
    transform: scale(0.95);
}


.feedback-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;

    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0f172a;

    padding: 10px 14px;
    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);

    z-index: 1000;

    transition: all 0.25s ease;
}

.feedback-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}











@media (max-width: 768px) {

    /* HEADER / USER */

    .user {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .user a {
        font-size: 13px;
        padding: 6px 12px;
    }

    /* MAIN */
    .main {
        margin-top: 50px;
        padding: 0 10px;
    }

    /* GRID ANIME */
    .anime-list {
        grid-template-columns: repeat(2, 1fr);
        /* 2 colonne */
        gap: 15px;
        width: 95%;
    }

    /* CARD */
    .anime-link img {
        height: 220px;
    }

    .anime-link h3 {
        font-size: 14px;
        height: auto;
        min-height: 40px;
    }

    /* BOTTONI */
    .anilist-sync-btn {
        width: 100%;
        text-align: center;
        font-size: 13px;
        padding: 8px;
    }

    .next-btn {
        width: 90%;
        font-size: 14px;
        padding: 10px;
    }

    .select-container {
        justify-content: center;
    }

    .custom-select {
        width: 45%;
        /* 2 per riga */
    }
}