#recently-viewed {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 14px 16px 20px;
    box-sizing: border-box;
    font-family: inherit;
    z-index: 9998;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.25);
}

.rv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rv-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #fff;
    letter-spacing: 0.5px;
}
.rv-header h3 .star {
    color: yellow; /* or your hex: #ff9800 */
    margin-right: 6px;
    font-size: 18px; /* adjust size if needed */
}


.rv-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rv-controls button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    color: #eee;
    cursor: pointer;
    transition: all 0.25s ease;
}
.rv-controls button:hover {
    background: #ff4655;
    border-color: #ff4655;
    color: #fff;
}

.rv-items-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.rv-items-wrapper::-webkit-scrollbar {
    height: 6px;
}
.rv-items-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
}
.rv-items-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.rv-items {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
}

.rv-items a {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 70px;
    max-width: 140px;
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}
.rv-items a:hover { color: #fff; }

.rv-items img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.rv-items img.loaded {
    opacity: 1;
    transform: scale(1);
}
.rv-items a:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}

.rv-items span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
}

.rv-nav {
    display: none;
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}
.rv-nav:hover { background: rgba(255,70,85,0.9); }
#rv-prev { left: 8px; }
#rv-next { right: 8px; }

@media(min-width:768px){
    .rv-items img { width: 150px; height: 150px; }
    .rv-items a { max-width: 150px; font-size: 13px; }
}

/* empty state styling */
.rv-empty {
    color: #aaa;
    font-size: 14px;
    font-style: italic;
    padding: 20px;
    text-align: center;
    width: 100%;
}