/* Streaming-style carousel (ported from UnQbdWeb) */

.streaming-carousel-container { width: 100%; position: relative; padding: 0; }
.streaming-carousel-empty { text-align: center; padding: 3rem 1rem; color: var(--text-color); opacity: 0.7; }
.streaming-carousel-wrapper { position: relative; display: flex; align-items: center; width: 100%; outline: none; }

.streaming-carousel-track {
    display: flex;
    gap: 12px;
    padding: 1.5rem 3.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.streaming-carousel-track::-webkit-scrollbar { display: none; }

.streaming-book-item { flex: 0 0 auto; scroll-snap-align: start; transition: transform 0.25s ease-out, z-index 0s 0.25s; position: relative; z-index: 1; }
.streaming-book-item:first-child { padding-left: 2rem; }
.streaming-book-item:first-child:hover { transform: translateY(-3px); z-index: 10; transition: transform 0.25s ease-out, z-index 0s; }
.streaming-book-item:hover { transform: scale(1.02) translateY(-3px); z-index: 10; transition: transform 0.25s ease-out, z-index 0s; }
.streaming-book-item:focus-within { transform: scale(1.02) translateY(-2px); z-index: 10; }

.streaming-book-item .book-card { width: 240px; max-width: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); transition: box-shadow 0.25s ease; }
.streaming-book-item:hover .book-card { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); }

.streaming-nav-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    border: none;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, background 0.3s ease;
    background: transparent;
}

.streaming-nav-prev { left: 0; justify-content: flex-start; padding-left: 12px; }
.streaming-nav-next { right: 0; justify-content: flex-end; padding-right: 12px; }

.streaming-nav-btn.hidden { opacity: 0 !important; pointer-events: none; }
.streaming-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.streaming-nav-icon {
    width: 48px;
    height: 48px;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b0b0b;
    background: #ffffff;
    border: 2px solid rgba(0,0,0,0.6);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.streaming-nav-btn:hover .streaming-nav-icon {
    background: #f2f2f2;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}

.streaming-nav-btn:focus-visible .streaming-nav-icon {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.streaming-carousel-indicators { display: flex; justify-content: center; gap: 8px; padding: 1rem 0; margin-top: 0.5rem; }
.streaming-indicator { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--divider-color); cursor: pointer; transition: all 0.3s ease; padding: 0; }
.streaming-indicator:hover { background: var(--primary-color); transform: scale(1.2); }
.streaming-indicator.active { background: var(--primary-color); width: 24px; border-radius: 4px; }
.streaming-indicator:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }

@media (max-width: 1200px) { .streaming-book-item .book-card { width: 215px; } .streaming-nav-btn { width: 50px; } }
@media (max-width: 992px) {
    .streaming-book-item .book-card { width: 200px; }
    .streaming-book-item:first-child { padding-left: 1.5rem; }
    .streaming-carousel-track { padding: 1rem 2.5rem; gap: 10px; }
    .streaming-nav-btn { width: 45px; }
    .streaming-nav-icon { width: 36px; height: 36px; }
}
@media (max-width: 768px) {
    .streaming-book-item .book-card { width: 180px; }
    .streaming-book-item:first-child { padding-left: 1rem; }
    .streaming-carousel-track { padding: 1rem 1rem; gap: 8px; }
    .streaming-nav-btn { 
        display: none;
    }
    .streaming-book-item:hover { transform: scale(1.02) translateY(-2px); }
}
@media (max-width: 576px) {
    .streaming-book-item .book-card { width: 165px; }
    .streaming-book-item:first-child { padding-left: 1rem; }
    .streaming-carousel-track { padding: 0.75rem 0.5rem; gap: 6px; }
    .streaming-nav-btn { 
        display: none;
    }
    .streaming-carousel-indicators { padding: 0.75rem 0; }
    .streaming-indicator { width: 6px; height: 6px; }
    .streaming-indicator.active { width: 18px; }
}

body.dark-mode .streaming-nav-icon {
    background: #ffffff !important;
    color: #111111 !important;
    border: 2px solid rgba(255,255,255,0.9) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6) !important;
    opacity: 1 !important;
}
