/* --- Hero Section --- */
.hero-section {
    display: grid; 
    grid-template-columns: 2.5fr 1fr; 
    gap: 2rem;
    max-width: 1600px; 
    margin: 2rem auto; 
    padding: 0 2rem; 
    height: 450px;
    width: 100%;
}

.carousel {
    border-radius: 20px; 
    overflow: hidden; 
    position: relative;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5); 
    border: 1px solid var(--glass-border);
}

.carousel-inner, .carousel-item { height: 100%; width: 100%; }

.carousel-item {
    background-size: cover; 
    background-position: center;
    display: flex; 
    align-items: flex-end; 
    position: relative;
}

.carousel-item::before {
    content: ''; 
    position: absolute; 
    inset: 0;
    background: linear-gradient(to top, #050508 0%, transparent 60%);
}

.carousel-caption { position: relative; z-index: 2; padding: 3rem; max-width: 700px; }

.carousel-caption h2 {
    font-size: 3.5rem; line-height: 1; margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.carousel-caption p { font-size: 1.2rem; color: var(--primary); text-shadow: 0 0 10px var(--primary-dim); }

/* --- Sidebar Recommendations --- */
.sidebar-streamers {
    display: flex; flex-direction: column; gap: 1rem;
    overflow-y: auto; padding-right: 5px;
    height: 100%; 
}

.featured-header {
    font-size: 1.2rem; margin-bottom: 0.5rem;
    display: flex; justify-content: space-between; align-items: center;
}

.live-dot {
    width: 8px; height: 8px; background: red; border-radius: 50%;
    display: inline-block; margin-right: 5px;
    box-shadow: 0 0 10px red; animation: pulse 1.5s infinite;
}

.mini-card {
    display: flex; gap: 1rem; padding: 0.8rem;
    background: var(--bg-surface); border: 1px solid var(--glass-border);
    border-radius: 12px; transition: var(--transition); cursor: pointer;
}

.mini-card:hover {
    background: var(--card-hover); border-color: var(--primary); transform: translateX(-5px);
}

.mini-card img { width: 100px; height: 60px; object-fit: cover; border-radius: 6px; }
.mini-info h4 { font-size: 0.9rem; margin-bottom: 0.2rem; }
.mini-info p { font-size: 0.8rem; color: var(--text-muted); }

/* --- Main Sections --- */
section { 
    padding: 3rem 2rem; 
    max-width: 1600px; 
    margin: 0 auto; 
    width: 100%; 
}

.section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 2rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 1rem;
}
.section-header h2 { font-size: 2rem; color: var(--text-main); }
.section-header h2 span { color: var(--primary); }

/* --- GRID FIX: Explicit Columns --- */
.grid { 
    display: grid; 
    /* Force 4 columns on large screens */
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
    width: 100%;
}

/* --- Card Styling --- */
.card {
    background: var(--bg-surface); 
    border-radius: 16px; 
    overflow: hidden;
    border: 1px solid var(--glass-border); 
    transition: var(--transition);
    position: relative; 
    display: flex; 
    flex-direction: column;
    width: 100%; 
}

.card:hover {
    transform: translateY(-10px); 
    border-color: var(--primary);
    box-shadow: 0 10px 40px -10px rgba(0, 242, 255, 0.15);
}

.card-img-wrapper { 
    position: relative; 
    overflow: hidden; 
    aspect-ratio: 16/9; 
    width: 100%; 
}

.card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.card:hover img { transform: scale(1.1); }

.live-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(220, 38, 38, 0.9); color: white; font-size: 0.7rem;
    font-weight: 700; padding: 4px 8px; border-radius: 4px;
    backdrop-filter: blur(4px); display: flex; align-items: center; gap: 5px; z-index: 5;
}

.viewer-count {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(0,0,0,0.7); padding: 4px 8px; border-radius: 4px;
    font-size: 0.75rem; backdrop-filter: blur(4px);
    color: white; 
}

.card-body { padding: 1.2rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-main); }

.card-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
    font-size: 0.75rem; color: var(--text-muted);
    background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 10px;
}

.view-more-container { text-align: center; margin-top: 3rem; }
.view-more {
    display: inline-block; padding: 1rem 3rem; background: transparent;
    border: 1px solid var(--text-muted); color: var(--text-muted);
    text-decoration: none; border-radius: 50px; font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem; letter-spacing: 2px; transition: var(--transition);
}
.view-more:hover {
    border-color: var(--primary); color: var(--primary);
    box-shadow: 0 0 20px var(--primary-dim);
}

@keyframes pulse {
    0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; }
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1400px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
    .hero-section { grid-template-columns: 1fr; height: auto; }
    .carousel { height: 400px; }
    .sidebar-streamers { height: auto; max-height: 400px; }
}

@media (max-width: 1024px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
}

/* Carousel Video Styling */
.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind the caption */
}

.carousel-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills the area */
}

/* Ensure Caption sits on top */
.carousel-caption {
    position: relative;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 5rem;
}

/* Unmute Button Position */
.unmute-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
}
.unmute-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.live-badge-large {
    background: #ff4757;
    color: white;
    padding: 5px 10px;
    display: inline-block;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 1rem;
    width: fit-content;
    animation: pulse 2s infinite;
}

/* Card Link Reset */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* =========================
   INDEX MOBILE RESPONSIVE
   ========================= */

@media (max-width: 900px) {

  .home-container { padding: 0 14px; }

  /* Carousel becomes vertical layout */
  .hero-carousel-section {
    height: auto;
    min-height: 260px;
    margin: 18px 0;
    padding-bottom: 52px; /* room for arrows */
  }

  .t-slide {
    width: 94%;
    height: auto;
    flex-direction: column;
  }

  .t-slide-video {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }

  .t-slide-info {
    flex: none;
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 14px;
  }

  /* Make prev/next less extreme */
  .t-slide.prev { transform: translateX(-18%) scale(0.88); }
  .t-slide.next { transform: translateX(18%) scale(0.88); }

  /* Arrows become bottom controls */
  .carousel-arrow {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    top: auto;
    bottom: 10px;
    transform: none;
  }
  .carousel-arrow.left { left: 12px; }
  .carousel-arrow.right { right: 12px; }
}

@media (max-width: 520px) {
  /* On very small phones: hide side slides to avoid clipping */
  .t-slide.prev, .t-slide.next {
    opacity: 0;
    pointer-events: none;
    transform: translateX(0) scale(0.95);
  }

  .seo-section {
    padding: 22px;
    margin: 36px 0;
  }
  .seo-section h2 { font-size: 1.35rem; line-height: 1.25; }
  .seo-section p { font-size: 0.95rem; }
}

/* Reduce hover-only effects on touch */
@media (hover: none) {
  .game-card-hover:hover { transform: none; box-shadow: none; }
  .feature-card:hover { transform: none; }
}