/* Index Page Specific Styles */

:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #8b5cf6; /* Vibrant Purple */
    --accent-glow: rgba(139, 92, 246, 0.3);
}

.index-page-wrapper {
    padding: 20px 20px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix for suspected sidebar overflow issue */
.mainContainer .mainContent {
    flex: 1;
    min-width: 0;
    width: auto !important;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    min-height: 400px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #e2e8f0; /* Brighter, high-contrast text */
    margin-bottom: 40px;
    padding: 10px 0 10px 24px;
    border-left: 3px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.08) 0%, transparent 100%);
    border-radius: 0 8px 8px 0;
    max-width: 550px;
    position: relative;
}

.hero-text p::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.hero-cta {
    display: flex;
    gap: 16px;
}

.btn-primary-custom {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary-custom {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-secondary-custom:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* GIF Grid */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.gif-grid:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* Home Trending Media Optimization */
.home-trending-item {
    width: 175px !important;
    height: 175px !important;
    padding: 0 !important; /* Removed padding for edge-to-edge look */
    margin-bottom: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    overflow: hidden !important;
}

.home-trending-item .imgArea {
    height: 100% !important;
    border-radius: 0 !important; /* Square corners inside the card */
    transition: transform 0.3s ease, filter 0.3s ease;
    backface-visibility: hidden; /* Prevent animation reset on filter change */
    transform: translateZ(0); /* Hardware acceleration */
}

.home-trending-item:hover .imgArea {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1); /* Boost colors on hover */
}

.home-trending-item .play-btn {
    width: 55px !important;
    height: 55px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px) !important;
    border-radius: 50% !important;
}

.home-trending-item .play-btn:after,
.home-trending-item .play-btn:before {
    width: 25px !important;
    height: 25px !important;
}

.home-trending-item .custom-audio-wrapper {
    background: transparent !important; /* Removed dark overlay */
    transition: background 0.3s ease;
}

.home-trending-item:hover .custom-audio-wrapper {
    background: rgba(0, 0, 0, 0.1); /* Very subtle overlay only on hover */
}

.gif-item {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    overflow: hidden;
    background: #1f2937;
    border: 1px solid rgba(255,255,255,0.05);
}

.gif-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gif-item:hover img {
    transform: scale(1.1);
}

/* Streamers Section */
.streamers-section {
    margin-top: 40px;
    text-align: left;
    position: relative;
    padding: 0; /* Remove side padding from section to allow scroll and contain within parent if needed */
    overflow: hidden; 
}

.section-header {
    display: flex;
    justify-content: flex-start; /* Move buttons closer to title */
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    padding: 20px 80px; /* Increased vertical padding to prevent hover scale clipping */
    overflow: visible;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.carousel-controls {
    display: flex;
    gap: 12px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.1);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

.streamers-carousel-wrapper {
    position: relative;
    overflow: visible; 
    padding: 20px 0;
}

.streamers-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    padding: 30px 80px; /* More space for left/right scaling */
}

.streamers-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.streamer-card {
    position: relative;
    width: 580px;
    height: 190px;
    flex-shrink: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 20px 40px;
    overflow: hidden;
    scroll-snap-align: start;
}

.streamer-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    z-index: 10;
}

.streamer-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.streamer-banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streamer-card:hover .streamer-banner-bg {
    opacity: 0.5;
}

.streamer-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

.streamer-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 35px;
}

.streamer-photo-wrapper {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 3px;
    background: transparent;
}

.streamer-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000;
}

.streamer-info {
    text-align: left;
}

.streamer-name {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    transition: transform 0.3s ease;
}

.moderator-mode-indicator .streamer-name {
    margin-bottom: 0 !important;
}

.streamer-card:hover .streamer-name {
    transform: translateX(5px);
}

.shop-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-color);
    border-radius: 12px;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.shop-link:hover {
    background: #7c3aed;
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        max-width: 100%;
    }
    .hero-cta {
        justify-content: center;
    }
    .gif-grid {
        transform: none;
    }
}

@media (max-width: 640px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .gif-item {
        width: 140px;
        height: 140px;
    }
}
