/* --- Page-Specific Layout & Sizing --- */
.browse-top-section {
    display: flex;
    justify-content: space-between;
    gap: calc(40px * var(--aux-ui-scale, 1));
    align-items: flex-start;
}

.featured-column {
    flex: 1;
    min-width: 0;
}

.trending-column {
    width: calc(480px * var(--aux-ui-scale, 1));
    flex-shrink: 0;
}

.section-title {
    color: #c2c2c2;
    font-size: calc(18px * var(--aux-ui-scale, 1));
    font-weight: 700;
    margin: 0 0 calc(15px * var(--aux-ui-scale, 1)) 0;
    letter-spacing: calc(0.5px * var(--aux-ui-scale, 1));
}

/* --- Slider Containers & Wrappers --- */
.recent-streams-section,
.top-categories-section {
    position: relative;
    margin-bottom: calc(35px * var(--aux-ui-scale, 1));
}

.slider-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* --- Responsive Scrollable Rows --- */
.featured-row,
.streams-row,
.category-grid,
.favorites-grid {
    display: flex;
    gap: calc(15px * var(--aux-ui-scale, 1));
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: calc(8px * var(--aux-ui-scale, 1));
    padding-bottom: calc(8px * var(--aux-ui-scale, 1));
    margin-top: calc(-8px * var(--aux-ui-scale, 1));
    width: 100%;
    scroll-behavior: smooth;
}

.featured-row::-webkit-scrollbar,
.streams-row::-webkit-scrollbar,
.category-grid::-webkit-scrollbar,
.favorites-grid::-webkit-scrollbar {
    display: none;
}

/* --- Stream Cards (Featured & Recent) --- */
.stream-thumbnail,
.trending-player-card {
    box-sizing: border-box;
    overflow: hidden;
    background-repeat: no-repeat;
    background-origin: border-box;
    background-clip: border-box;
}

.stream-card {
    flex: 0 0 calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    min-width: calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    max-width: calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    margin: calc(7.3px * var(--aux-ui-scale, 1)) 0;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.2s;
}

.featured-row .stream-card {
    flex: 0 0 calc((100% - calc(45px * var(--aux-ui-scale, 1))) / 4);
    min-width: calc((100% - calc(45px * var(--aux-ui-scale, 1))) / 4);
    max-width: calc((100% - calc(45px * var(--aux-ui-scale, 1))) / 4);
}

.stream-card:hover {
    transform: none !important;
}

.stream-thumbnail {
    width: 100%;
    aspect-ratio: 200 / 124;
    background-color: #121212;
    background-size: cover;
    background-position: center;
    border-radius: calc(10px * var(--aux-ui-scale, 1));
    position: relative;
    border: calc(1px * var(--aux-ui-scale, 1)) solid rgba(255, 255, 255, 0.03) !important;
    transition: box-shadow 0.2s ease;
}

.stream-card:hover .stream-thumbnail {
    border-color: rgba(255, 255, 255, 0.03) !important;
    box-shadow: inset 0 0 calc(10px * var(--aux-ui-scale, 1)) #9b2d2d !important;
}

.stream-info {
    margin-top: calc(10px * var(--aux-ui-scale, 1));
    padding: 0 calc(7px * var(--aux-ui-scale, 1));
}

.stream-title {
    color: #c2c2c2;
    font-size: calc(14px * var(--aux-ui-scale, 1));
    font-weight: 600;
    margin: 0 0 calc(4px * var(--aux-ui-scale, 1)) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stream-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #727272;
    font-size: calc(12px * var(--aux-ui-scale, 1));
    font-weight: 500;
}

/* --- View Icon Alignment --- */
.stream-viewer-count {
    display: inline-flex;
    align-items: center;
    gap: calc(4px * var(--aux-ui-scale, 1));
}

.viewer-icon {
    font-size: calc(14px * var(--aux-ui-scale, 1)) !important;
    color: #9b2d2d;
    vertical-align: middle;
}

/* --- Top Trending Player Card --- */
.trending-player-card {
    width: calc(460px * var(--aux-ui-scale, 1));
    height: calc(259px * var(--aux-ui-scale, 1));
    margin: calc(7.3px * var(--aux-ui-scale, 1)) calc(10px * var(--aux-ui-scale, 1)) 0;
    background-color: #121212;
    background-size: cover;
    background-position: center;
    border-radius: calc(10px * var(--aux-ui-scale, 1));
    position: relative;
    border: calc(1px * var(--aux-ui-scale, 1)) solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.live-indicator-dot {
    position: absolute;
    top: calc(15px * var(--aux-ui-scale, 1));
    right: calc(15px * var(--aux-ui-scale, 1));
    width: calc(12px * var(--aux-ui-scale, 1));
    height: calc(12px * var(--aux-ui-scale, 1));
    background-color: #9b2d2d;
    border-radius: 50%;
    box-shadow: 0 0 calc(10px * var(--aux-ui-scale, 1)) #9b2d2d;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* --- Scroll Arrows --- */
.slider-arrow {
    position: absolute;
    width: calc(36px * var(--aux-ui-scale, 1));
    height: calc(36px * var(--aux-ui-scale, 1));
    background-color: #202020;
    border: calc(1px * var(--aux-ui-scale, 1)) solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #c2c2c2;
    transition: background-color 0.2s, color 0.2s;
    outline: none;
}

.slider-arrow:hover {
    background-color: #9b2d2d;
    color: #ffffff;
}

.slider-arrow.left {
    left: 0;
}

.slider-arrow.right {
    right: 0;
}

/* --- Position Scroll Arrows Halfway Up Stream Thumbnails --- */
.featured-column .slider-arrow,
.recent-streams-section .slider-arrow {
    top: 50%;
    transform: translateY(-100%);
}

.favourite-categories-section {
    margin-bottom: calc(35px * var(--aux-ui-scale, 1));
}

/* --- Category Sizing (Placeholders Only) --- */
.placeholder-category-card {
    flex: 0 0 calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    min-width: calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    max-width: calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    height: calc(290px * var(--aux-ui-scale, 1));
    margin: calc(7.3px * var(--aux-ui-scale, 1)) 0;
    background-color: #121212;
    border: calc(1px * var(--aux-ui-scale, 1)) solid rgba(255, 255, 255, 0.03) !important;
    border-radius: calc(10px * var(--aux-ui-scale, 1));
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(15px * var(--aux-ui-scale, 1));
    cursor: default;
}

.placeholder-text {
    color: #444444;
    font-size: calc(11px * var(--aux-ui-scale, 1));
    font-weight: 700;
    letter-spacing: calc(0.5px * var(--aux-ui-scale, 1));
    text-transform: uppercase;
}

/* --- Active Category Sizing --- */
.category-item {
    flex: 0 0 calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    min-width: calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    max-width: calc((100% - calc(75px * var(--aux-ui-scale, 1))) / 6);
    margin: calc(7.3px * var(--aux-ui-scale, 1)) 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.category-card {
    width: 100%;
    height: calc(290px * var(--aux-ui-scale, 1));
    background-color: #121212;
    border: calc(1px * var(--aux-ui-scale, 1)) solid rgba(255, 255, 255, 0.03) !important;
    border-radius: calc(10px * var(--aux-ui-scale, 1));
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.category-card:hover {
    border-color: rgba(255, 255, 255, 0.03) !important;
}

/* Overlay to force the inset glow on top of the background image */
.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: calc(9px * var(--aux-ui-scale, 1));
    pointer-events: none;
    box-shadow: inset 0 0 0 #9b2d2d;
    transition: box-shadow 0.2s ease;
    z-index: 2;
}

.category-card:hover::after {
    box-shadow: inset 0 0 calc(10px * var(--aux-ui-scale, 1)) #9b2d2d !important;
}

.category-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1;
}

.category-card:hover .category-card-bg {
    opacity: 1.0;
}

/* --- Category Meta & Views --- */
.category-meta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(4px * var(--aux-ui-scale, 1));
    margin-top: calc(10px * var(--aux-ui-scale, 1));
    width: 100%;
}

.category-title {
    margin-top: 0 !important;
    font-size: calc(14px * var(--aux-ui-scale, 1));
    font-weight: 600;
    color: #c2c2c2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 calc(4px * var(--aux-ui-scale, 1));
}

.category-views {
    display: inline-flex;
    align-items: center;
    gap: calc(4px * var(--aux-ui-scale, 1));
    color: #727272;
    font-size: calc(12px * var(--aux-ui-scale, 1));
    font-weight: 500;
}

.category-views-icon {
    font-size: calc(13px * var(--aux-ui-scale, 1)) !important;
    color: #727272;
}
