/* Gledajte Zajedno — homepage red. Isti rail/scroll-snap/edge-fade pattern kao
   .cw-section (continue_watching.css), pod sopstvenim klasama radi nezavisnosti. */

.wt-section {
    max-width: none;
    margin: 0 0 40px 0;
}

.wt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: clamp(10px, 1.2vw, 20px);
}

.wt-header .section-title {
    margin-bottom: 0;
}

.wt-filters {
    display: flex;
    gap: 10px;
}

.wt-filter-pill {
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 6px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: #cfcfcf;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.wt-filter-pill.wt-filter-live.active {
    background: rgba(34, 197, 94, 0.18);
    border-color: #22c55e;
    color: #4ade80;
}

.wt-filter-pill.wt-filter-waiting.active {
    background: rgba(234, 179, 8, 0.18);
    border-color: #eab308;
    color: #facc15;
}

.wt-rail-wrap {
    position: relative;
}

.wt-rail {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 6px 2px 14px;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* bez ovoga, drag na ivici raila "iscuri" u horizontalni scroll cele stranice na mobilnom,
       a touch-action mora dozvoliti i pan-y da vertikalni swipe (skrol stranice) ne prestane da radi */
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.wt-rail::-webkit-scrollbar { display: none; }

.wt-rail.is-dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
    cursor: grabbing;
}

.wt-rail.is-dragging a, .wt-rail.is-dragging .wt-card { pointer-events: none; }

.wt-card {
    flex: 0 0 clamp(230px, 16vw, 300px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 40, 0.92);
    border: 2px solid #991b1e33;
    border-radius: 22px;
    box-shadow: 0 6px 32px #0007;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: background 0.22s, transform 0.16s, box-shadow 0.16s, border-color 0.22s;
    cursor: pointer;
}

.wt-card:hover, .wt-card:focus-visible {
    background: rgba(45, 45, 58, 0.96);
    border-color: #991b1e;
    transform: translateY(-4px);
    box-shadow: 0 10px 38px #000a;
}

.wt-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #0e0e0e;
    overflow: hidden;
}

.wt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

.wt-status-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #05170a;
}

.wt-status-pill.live { background: #22c55e; }
.wt-status-pill.waiting { background: #eab308; }

.wt-member-count {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: #000000a6;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.wt-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 16px;
    min-width: 0;
}

.wt-name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-ep {
    font-size: 0.85rem;
    font-weight: 600;
    color: #e11d48;
    letter-spacing: 0.3px;
}

.wt-host {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #cfcfcf;
}

.wt-host img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.wt-host-avatar-wrap {
    position: relative;
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.wt-host-avatar-wrap .avatar-decoration-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 116%;
    height: 150%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    object-fit: contain;
    background: transparent;
}

/* "+" kartica — kreiraj svoju sobu */
.wt-card-create {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 20px;
    border-style: dashed;
    border-color: #991b1e88;
    background: rgba(153, 27, 30, 0.08);
}

.wt-card-create .wt-plus {
    font-size: 2.4rem;
    font-weight: 300;
    line-height: 1;
    color: #e11d48;
}

.wt-card-create .wt-create-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.wt-nav {
    position: absolute;
    top: 0;
    bottom: 14px;
    width: 84px;
    display: flex;
    align-items: center;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}

.wt-nav svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 2px 6px #000c);
    transition: transform 0.18s;
}

.wt-nav-prev {
    left: 0;
    justify-content: flex-start;
    padding-left: 10px;
    background: linear-gradient(90deg, #0e0e0eef 0%, #0e0e0e00 100%);
}

.wt-nav-next {
    right: 0;
    justify-content: flex-end;
    padding-right: 10px;
    background: linear-gradient(270deg, #0e0e0eef 0%, #0e0e0e00 100%);
}

.wt-rail-wrap:hover .wt-nav.is-on {
    opacity: 1;
    pointer-events: auto;
}

.wt-nav-prev:hover svg { transform: translateX(-3px); }
.wt-nav-next:hover svg { transform: translateX(3px); }

@media (max-width: 1300px) {
    .wt-card { flex: 0 0 clamp(210px, 20vw, 280px); }
}

@media (max-width: 1000px) {
    .wt-rail { gap: 16px; }
    .wt-card { flex: 0 0 clamp(190px, 28vw, 260px); }
    .wt-nav { width: 64px; }
    .wt-nav svg { width: 26px; height: 26px; }
}

@media (max-width: 760px) {
    .wt-header { flex-direction: column; align-items: flex-start; }
    .wt-rail { gap: 12px; }
    .wt-card { flex-basis: 42vw; }
    .wt-nav { display: none; }
}

@media (max-width: 560px) {
    .wt-rail { gap: 10px; }
    .wt-card { flex-basis: 54vw; }
    .wt-name { font-size: 0.95rem; }
    .wt-meta { padding: 11px 12px 13px; }
}

@media (max-width: 400px) {
    .wt-card { flex-basis: 60vw; }
    .wt-name { font-size: 0.88rem; }
    .wt-meta { padding: 10px 11px 12px; }
}
