.content {
    width: 75%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}


.content img[style*="object-fit:cover"] {
    border-radius: 10px;
    margin-bottom: 20px;
}


h1 {
    color: #38bdf8;
    margin-bottom: 20px;
}

.genre:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
    cursor: pointer;
}


.anime-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-bottom: 30px;

    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 12px;
}

.anime-container2 {
    gap: 30px;
    margin-bottom: 30px;

    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 12px;



}

.anime-container2 h2,
.anime-container2 p {
    text-align: center;
    justify-self: center;

}

.anime-container3 {
    gap: 30px;
    margin-bottom: 30px;

    background: rgba(15, 23, 42, 0.6);
    padding: 20px;
    border-radius: 12px;
    width: 95%;
    margin: 0 auto;
    margin-top: 50px;


    display: grid;
    place-items: center;


}



.anime-left img {
    width: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}


.anime-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 500px;
}

.anime-right p {
    margin: 0;
    color: #e2e8f0;
}

.anime-right strong {
    color: #38bdf8;
}


.anime-actions {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 8px;
    margin-top: 10px;
}

.anime-actions button {
    padding: 6px 10px;
    border-radius: 6px;

    border: 1px solid rgba(56, 189, 248, 0.3);
    background: transparent;

    color: #e2e8f0;
    font-size: 13px;
    font-weight: 500;

    cursor: pointer;
    transition: all 0.2s ease;

    min-width: 120px;
    text-align: center;

    backdrop-filter: blur(6px);
    background: rgba(30, 41, 59, 0.6);
}

.anime-actions button:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.anime-actions button:active {
    transform: scale(0.96);
}

.anime-actions button:last-child {
    grid-column: span 2;

    border-color: gold;
    color: rgb(255, 215, 0);
}

.anime-actions button.active-fav {
    grid-column: span 2;

    border-color: gold;
    color: rgb(0, 0, 0);
}

.anime-actions button:last-child:hover {
    background: rgba(255, 215, 0, 0.1);
}

.anime-trailer {
    max-width: 900px;
    margin: 30px auto;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.anime-trailer iframe {
    width: 100%;
    height: 100%;
}

.anime-synonyms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
}

.anime-synonyms span {
    background: #334155;
    color: #e2e8f0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.anime-relations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin: 15px 0 30px;
}

.relation-card {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.relation-card.current {
    border: 2px solid #38bdf8;
}

.relation-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(56, 189, 248, 0.15);
}

.relation-card:hover img {
    transform: scale(1.05);
}

.relation-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: transform 0.2s ease;
}

.relation-card p {
    font-size: 13px;
    margin: 5px 0;
    color: #e2e8f0;
}

.relation-card small {
    color: #38bdf8;
    font-size: 11px;
}

.banner {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}



h2 {
    color: #38bdf8;
    margin-top: 30px;
    margin-bottom: 10px;
}


.content p {
    color: #e2e8f0;
    line-height: 1.6;
    max-width: 800px;
}


.content p:last-of-type {
    margin-bottom: 30px;
}


button.active {
    background: #38bdf8;
    color: #0f172a;
}

button.active-fav {
    background: gold;
    color: #000000;
}

.anime-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;

}

.genre {
    background: #0ea5e9;
    color: #020617;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;

}

.anime-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
}

.tag {
    background: #1e293b;
    color: #38bdf8;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}

.user-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.user-info p {
    margin: 4px 0;
    font-size: 14px;
    color: #e2e8f0;
}

.adult-warning {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.anime-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 5px;
}

.anime-stats-title h2 {
    margin-top: 0px !important;
}

.anime-stats p {
    margin: 0;
    color: #e2e8f0;
}

.anime-series {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.anime-series .relation-card {
    min-width: 120px;
}

/* --------------------
   RECOMMENDED SECTION
-------------------- */

.recommended-section h3 {
    margin-top: 25px;
    color: #7dd3fc;
}



/* --------------------
   CAROUSEL
-------------------- */

.carousel-wrapper {
    position: relative;
    margin: 25px 0 35px;
}

/* container */
.carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 10px;

    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

/* item */
.carousel-item {
    min-width: 150px;
    max-width: 150px;
    flex-shrink: 0;

    text-decoration: none;
    color: inherit;

    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    overflow: hidden;

    transition: all 0.25s ease;
    position: relative;

    border: 1px solid rgba(56, 189, 248, 0.08);
}

/* hover */
.carousel-item:hover {
    transform: translateY(-6px) scale(1.05);
    z-index: 3;

    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.6);

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* img */
.carousel-item img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
}

/* titolo */
.carousel-item p {
    font-size: 13px;
    padding: 8px;
    margin: 0;
    text-align: center;
    color: #e2e8f0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-item h4 {
    font-size: 13px;
    padding: 8px;
    margin: 0;
    text-align: center;
    color: #e2e8f0;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);

    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;

    font-size: 20px;
    padding: 6px 10px;
    cursor: pointer;

    border-radius: 8px;
    z-index: 6;

    opacity: 0;
    transition: all 0.25s ease;
}

/* appaiono al hover */
.carousel-wrapper:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: #38bdf8;
    color: #0f172a;
}

.carousel-btn.left {
    left: 0;
}

.carousel-btn.right {
    right: 0;
}

.carousel-wrapper::before,
.carousel-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* visibili di default */
.carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #0f172a, transparent);
}

.carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #0f172a, transparent);
}

/* nascosti dinamicamente */
.carousel-wrapper.no-left::before {
    opacity: 0;
}

.carousel-wrapper.no-right::after {
    opacity: 0;
}



#recommendation-comments h2 {

    text-align: center;
    padding-bottom: 25px;

}

#recommendation-comments h3 {
    color: #38bdf8;
    padding-left: 5px;
}

#recommendation-comments p {
    color: white !important;
}

/* blocco anime */
.rec-header h3 {
    color: #38bdf8;
}

.rec-header a {
    text-decoration: none;
}

.rec-header img:hover {
    transform: translateY(-6px) scale(1.05);
    transition: all 0.25s ease;
}

.scroll-comments-btn {
    background: rgba(15, 23, 42, 0.7);

    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;

    font-size: 15px;
    padding: 6px 10px;
    cursor: pointer;

    border-radius: 8px;
    z-index: 777;

    opacity: 1;
    transition: all 0.25s ease;
}

.scroll-comments-btn:hover {
    background: #38bdf8;
    color: #0f172a;
}


.open-rec-modal {
    background: rgba(15, 23, 42, 0.7);

    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #38bdf8;

    font-size: 15px;
    padding: 6px 10px;
    cursor: pointer;

    border-radius: 8px;
    z-index: 777;

    opacity: 1;
    transition: all 0.25s ease;
}

.open-rec-modal:hover {
    background: #38bdf8;
    color: #0f172a;
}

.rec-header img {
    border-radius: 10px;
}

.rec-comments-block {
    margin-bottom: 30px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(43, 58, 82, 0.5);
}

/* container commenti */
.rec-comments {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* singolo commento */
.comment {
    font-size: 14px;
    color: #e2e8f0;
    line-height: 1.5;

    padding: 10px 12px;
    border-radius: 10px;

    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.15);

    position: relative;

    transition: all 0.2s ease;
    font-style: italic;
}

.comment:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.4);
}

.comment::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 4px;

    background: #38bdf8;
    opacity: 0.6;
}

.rec-comments {
    counter-reset: comment;
}







/* overlay */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999;
}

.modal.hidden {
    display: none;
}

/* box */
.modal-content {
    width: 90%;
    max-width: 400px;

    background: rgba(15, 23, 42, 0.95);
    border-radius: 12px;
    padding: 20px;

    border: 1px solid rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(10px);
}

/* close */
.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;

    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

/* form */
.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-content input,
.modal-content textarea {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    padding: 8px;
    color: white;
}

.modal-content button[type="submit"] {
    margin-top: 10px;
    background: #38bdf8;
    border: none;
    padding: 10px;
    border-radius: 8px;
    color: #0f172a;
    cursor: pointer;
}


.autocomplete {
    position: relative;
}

.results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;

    margin-top: 5px;
    overflow: hidden;

    z-index: 10;
}

/* singolo risultato */
.result-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px;
    cursor: pointer;

    transition: background 0.2s;
}

.result-item:hover {
    background: rgba(56, 189, 248, 0.15);
}

.result-item img {
    width: 40px;
    border-radius: 6px;
}

.result-item span {
    color: #e2e8f0;
    font-size: 13px;
}






/* --------------------
   COMMENTS SECTION
-------------------- */

.anime-comments {
    margin-top: 30px;
    max-width: 2000px;
    width: 100%;
}

/* --------------------
   TEXTAREA
-------------------- */

.comment-form textarea {
    width: 98.5%;
    min-height: 90px;
    resize: vertical;

    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;

    padding: 10px 12px;
    color: #e2e8f0;
    font-size: 14px;

    transition: all 0.2s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(30, 41, 59, 0.9);
}

/* --------------------
   POST BUTTON
-------------------- */

#submit-comment {
    margin-top: 10px;

    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.3);

    color: #38bdf8;
    padding: 8px 14px;

    border-radius: 8px;
    cursor: pointer;

    font-size: 14px;
    font-weight: 500;

    transition: all 0.25s ease;
}

#submit-comment:hover {
    background: #38bdf8;
    color: #0f172a;
}

#submit-comment:active {
    transform: scale(0.96);
}

/* --------------------
   COMMENT CARD
-------------------- */

.anime-comments .comment {
    margin-top: 15px;
    font-style: normal;
    /* override rec-comments */
}

/* header (avatar + username) */
.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-header img.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* testo */
.comment-text {
    margin: 0;
    color: #e2e8f0;
    font-size: 14px;
}

/* footer */
.comment-footer {
    margin-top: 8px;
}

/* --------------------
   LIKE BUTTON
-------------------- */

.like-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);

    color: #94a3b8;
    font-size: 13px;

    padding: 4px 10px;
    border-radius: 999px;

    cursor: pointer;
    transition: all 0.2s ease;
}

/* hover */
.like-btn:hover {
    border-color: #38bdf8;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

/* liked state */
.like-btn.liked {
    color: #38bdf8;
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

/* click feel */
.like-btn:active {
    transform: scale(0.92);
}

/* --------------------
   LOAD MORE BUTTON
-------------------- */

#load-more-comments {
    margin: 20px auto 0;
    display: block;

    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.25);

    color: #38bdf8;
    padding: 8px 16px;

    border-radius: 8px;
    cursor: pointer;

    font-size: 14px;

    transition: all 0.25s ease;
}

#load-more-comments:hover {
    background: #38bdf8;
    color: #0f172a;
}

#not-logged-in {
    color: rgb(255, 255, 255);
    text-align: center;
}

.replies {
    margin-left: 30px;
    margin-top: 10px;
    border-left: 2px solid rgba(56, 189, 248, 0.2);
    padding-left: 10px;
}

.comment.reply {
    background: rgba(30, 41, 59, 0.5);
}

.reply-form {
    margin-top: 10px;
}

.reply-form textarea {
    width: 100%;
    min-height: 70px;

    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 8px;

    padding: 8px;
    color: #e2e8f0;
}

.submit-reply {
    margin-top: 6px;

    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(56, 189, 248, 0.3);

    color: #38bdf8;
    padding: 6px 12px;

    border-radius: 6px;
    cursor: pointer;
}

.submit-reply:hover {
    background: #38bdf8;
    color: #0f172a;
}

.hidden {
    display: none;
}

.comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.comment-actions button {
    background: transparent;
    border: 1px solid rgba(56, 189, 248, 0.2);

    color: #94a3b8;
    font-size: 13px;

    padding: 4px 10px;
    border-radius: 999px;

    cursor: pointer;

    transition: all 0.2s ease;

    backdrop-filter: blur(4px);
}

/* hover */
.comment-actions button:hover {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.6);
    background: rgba(56, 189, 248, 0.08);
}

/* click */
.comment-actions button:active {
    transform: scale(0.92);
}

.comment-error {
    margin-top: 6px;
    font-size: 13px;

    color: #f87171;
    /* rosso soft */
    background: rgba(248, 113, 113, 0.08);

    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 6px;

    padding: 6px 10px;
}

.comment-error.hidden {
    display: none;
}


.reply-error {
    margin-top: 5px;
    font-size: 12px;

    color: #f87171;
    background: rgba(248, 113, 113, 0.08);

    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 6px;

    padding: 5px 8px;
}

.reply-error.hidden {
    display: none;
}








@media (max-width: 768px) {
    .anime-container {
        grid-template-columns: 1fr;
        text-align: center;
        flex-direction: column;
    }

    .content {
        width: 95%;
    }

    .anime-left img {
        width: 100%;
        max-width: 220px;
    }

    .anime-right {
        align-items: center;
        text-align: center;
    }

    * {
        box-sizing: border-box;
    }
}