.anime_card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 200px; /* Default size */
    min-width: 120px; /* Minimum size */
    position: relative;
    aspect-ratio: 10/16;
    flex-shrink: 0;
    margin: 0.5rem;
}

.anime_card .addto_list {
    background-color: transparent;
    position: absolute;
    right: 0.5em;
    bottom: 0.5em;
    width: fit-content;
    height: fit-content;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 2;
    display: flex;
    gap: 0.5em;
    transform: translateX(3em);
}

.anime_card .addto_list button {
    background-color: transparent;
    border: none;
    width: 1.5em;
    height: 1.5em;
    min-width: 1.5em;
    min-height: 1.5em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

.anime_card .addto_list svg {
    fill: rgb(var(--text-color));
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
}

.anime_card .addto_list button:hover svg {
    fill: rgb(var(--secondary-color));
}

.anime_card .onhover {
    position: absolute;
    width: 100%;
    height: 0%;
    left: 0;
    top: 0;
    background-color: rgba(var(--primary-color), 0.9);
    display: flex;
    flex-direction: column;
    border-radius: 0.5em;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    transition: all 0.6s ease;
    z-index: 1;
    padding: 0;
}

.anime_card:hover .onhover {
    height: 100%;
    padding: 0.5em;
    padding-bottom: 2em;
}

.anime_card:hover .addto_list {
    opacity: 1;
    transform: translateX(0);
}

.anime_card .onhover svg {
    width: 40%;
    max-width: 60px;
    height: auto;
    aspect-ratio: 1;
    fill: rgba(var(--secondary-color),0.8);
    transition: all 0.3s ease;
    margin: 0.5em 0;
}

.anime_card .onhover svg:hover {
    transform: translateY(-0.5em);
    fill: rgba(var(--secondary-color),1);
}

.anime_card .onhover h3 {
    font-weight: bold;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; 
    line-clamp: 2;
    overflow: hidden;
    margin: 0.2em 0;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.anime_card .onhover>div {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
    padding: 0 0.5em;
}

.anime_card .onhover p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; 
    line-clamp: 3;
    overflow: hidden;
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    margin: 0;
}

.anime_card .content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5em;
    height: 100%;
    text-decoration: none;
}

.anime_card .baseinfo {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0.3em 0;
    transition: all 0.3s ease;
}

.anime_card:hover .baseinfo {
    opacity: 0;
}

.anime_card .content img {
    width: 100%;
    height: auto;
    aspect-ratio: 10/14;
    object-fit: cover;
    border-radius: 0.5em;
    background-color: rgba(var(--secondary-color),0.3);
}

.anime_card .content .baseinfo h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1; 
    line-clamp: 1;
    overflow: hidden;
    font-weight: normal;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    text-align: left;
    color: rgba(var(--text-color));
    margin: 0.2em 0;
}

.sub_info {
    display: flex;
    box-sizing: border-box;
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: rgb(var(--secondary-color));
    margin: 0;
}

.active_user_content svg {
    fill: rgb(var(--secondary-color)) !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .anime_card {
        max-width: 180px;
    }
}

@media (max-width: 768px) {
    .anime_card {
        max-width: 160px;
        min-width: 110px;
    }
    
    .anime_card .onhover svg {
        width: 30%;
    }
}

@media (max-width: 480px) {
    .anime_card {
        max-width: 140px;
        min-width: 100px;
        margin: 0.3rem;
    }
    
    .anime_card .addto_list {
        right: 0.3em;
        bottom: 0.3em;
    }
    
    .anime_card .addto_list button {
        width: 1.2em;
        height: 1.2em;
        min-width: 1.2em;
        min-height: 1.2em;
    }
    
    .anime_card:hover .onhover {
        padding-bottom: 1.5em;
    }
}

/* Remove the touch devices media query completely to maintain hover behavior */