.recommendations-widget,
.recommendations-empty,
.similar-novels-section {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    background: rgba(15,15,22,.74);
    box-shadow: 0 18px 60px rgba(0,0,0,.26);
    padding: 18px;
    color: #e5e7eb;
}

.recommendations-head,
.similar-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.recommendations-head h3,
.similar-head h3,
.recommendations-empty h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
}

.recommendations-head p,
.recommendations-empty p,
.similar-head span {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: .82rem;
}

.recommendations-refresh,
.recommendation-actions button {
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.recommendations-refresh {
    padding: 8px 10px;
    color: #ddd6fe;
    background: rgba(139,92,246,.16);
    font-weight: 800;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.recommendation-card {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(139,92,246,0.3);
    border-color: rgba(139,92,246,0.5);
}

.recommendation-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    display: block;
    object-fit: cover;
}

.recommendation-copy {
    padding: 10px;
    flex: 1;
}

.recommendation-copy h4 {
    margin: 0;
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommendation-copy p {
    margin: 4px 0 0;
    color: #a78bfa;
    font-size: .75rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-card.is-removing {
    opacity: 0;
    transform: scale(.92);
    transition: opacity .25s ease, transform .25s ease;
}

.recommendations-skeleton {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.recommendations-skeleton span {
    min-height: 220px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.10), rgba(255,255,255,.04));
    background-size: 220% 100%;
    animation: recommendations-shimmer 1.35s infinite;
}

@keyframes recommendations-shimmer {
    to { background-position: -220% 0; }
}

.recommendations-empty {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.recommendations-empty a {
    color: #ddd6fe;
    font-weight: 900;
}

.similar-novels-section {
    margin: 36px 0;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.similar-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 8px;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,.035);
}

.similar-card img {
    width: 54px;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
    object-fit: cover;
}

.similar-card strong,
.similar-card small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.similar-card small {
    color: #94a3b8;
}

@media (max-width: 900px) {
    #recommendations-section {
        display: block;
        max-width: 100%;
        overflow: hidden;
    }

    #recommendations-section .recommendations-widget {
        padding: 14px;
        border-radius: 10px;
    }

    #recommendations-section .recommendations-head {
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    #recommendations-section .recommendations-head h3 {
        font-size: 1rem;
        line-height: 1.15;
    }

    #recommendations-section .recommendations-head p {
        font-size: .76rem;
        line-height: 1.35;
    }

    #recommendations-section .recommendations-refresh {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 7px 9px;
        font-size: .78rem;
        line-height: 1;
        white-space: nowrap;
    }

    #recommendations-section .recommendations-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 2px 8px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    #recommendations-section .recommendations-grid::-webkit-scrollbar {
        height: 4px;
    }

    #recommendations-section .recommendations-grid::-webkit-scrollbar-track {
        background: rgba(255,255,255,.04);
        border-radius: 999px;
    }

    #recommendations-section .recommendations-grid::-webkit-scrollbar-thumb {
        background: rgba(167,139,250,.35);
        border-radius: 999px;
    }

    #recommendations-section .recommendation-card {
        flex: 0 0 118px !important;
        width: 118px !important;
        min-width: 118px !important;
        max-width: 118px !important;
        scroll-snap-align: start;
        border-radius: 8px;
    }

    #recommendations-section .recommendation-cover img {
        height: 172px !important;
        aspect-ratio: 2 / 3;
        object-fit: cover;
    }

    #recommendations-section .recommendation-copy {
        padding: 8px;
    }

    #recommendations-section .recommendation-copy h4 {
        font-size: .76rem;
        line-height: 1.15;
    }

    #recommendations-section .recommendation-copy p {
        font-size: .68rem;
        line-height: 1.25;
        -webkit-line-clamp: 2;
    }

    #recommendations-section .recommendations-skeleton {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 10px;
        overflow: hidden;
    }

    #recommendations-section .recommendations-skeleton span {
        flex: 0 0 118px;
        min-height: 220px;
    }
}

@media (max-width: 420px) {
    #recommendations-section .recommendation-card {
        flex-basis: 112px !important;
        width: 112px !important;
        min-width: 112px !important;
        max-width: 112px !important;
    }

    #recommendations-section .recommendation-cover img {
        height: 168px !important;
    }
}
