/* Movie Card Style for Stream Cards */
:root {
  --accent-color: #e7e7e7;
  --brand-color: #fe4141;
  --dark-color: #1e1b26;
}

.stream-card {
  width: 375px;
  height: 500px;
  background-color: #1e1b26;
  margin: 20px;
  box-shadow: 5px 5px 115px -14px black;
  border-radius: 4px;
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.thumbnail-container {
  width: 100%;
  height: 380px;
  position: relative;
  z-index: 1;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  overflow: hidden;
}

.stream-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, 
    color-stop(0.00, rgba(0,0,0,1)),
    color-stop(0.35, rgba(0,0,0,1)),
    color-stop(0.50, rgba(0,0,0,1)),
    color-stop(0.65, rgba(0,0,0,1)),
    color-stop(0.85, rgba(0,0,0,0.6)),
    color-stop(1.00, rgba(0,0,0,0)));
  mask-image: linear-gradient(to bottom,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 35%,
    rgba(0,0,0,1) 50%,
    rgba(0,0,0,1) 65%,
    rgba(0,0,0,0.6) 85%,
    rgba(0,0,0,0) 100%);
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(255,255,255,0) 38%,
    rgba(255,255,255,0.06) 39%,
    rgba(30,27,38,0.88) 53%,
    rgba(30,27,38,1) 55%);
  z-index: 2;
}

.live-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #fe4141;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: bold;
  z-index: 5;
  width: auto;
  min-width: 40px;
  text-align: center;
  box-sizing: border-box;
  overflow: visible;
}

.stream-details {
  padding: 0 12px;
  position: absolute;
  bottom: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 3;
}

.streamer-details {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.streamer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.streamer-text {
  flex: 1;
}

.streamer-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #e7e7e7;
  margin-bottom: 2px;
}

.host-username {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  color: #a8a8a8;
  font-weight: 500;
  margin-bottom: 2px;
}

.streamer-game {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  color: #fe4141;
  font-weight: 600;
  margin-top: 4px; /* Added to pull down the game category */
  margin-bottom: 4px;
}

.stream-description {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #a8a8a8;
  text-align: justify;
  line-height: 1.3;
  max-height: 32px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  position: relative;
  top: 3px;
}

.stream-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  margin-bottom: 12px;
}

.follow-btn {
  display: block;
  border: 1px solid #fe4141;
  border-radius: 5px;
  padding: 4px 12px;
  background: transparent;
  color: #fe4141;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.follow-btn:hover {
  background-color: #fe4141;
  color: white;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin-bottom: 10px;
}

/* Position Live Now image to the left in PC view only */
@media screen and (min-width: 769px) {
  .section-header {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 16px;
  }
  
  .live-now-image {
    margin-right: auto; /* Push to the left */
  }
  
  /* Hide the Go Live button in bottom navigation for PC web version only */
  .bottom-nav .go-live {
    display: none;
  }
}

.streams-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 20px 0;
  margin-left: 20px;
}

/* Mobile view adjustments */
@media screen and (max-width: 768px) {
  .streams-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    position: relative;
    width: 100%;
    max-width: 100vw;
  }
  
  .streams-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .stream-card {
    width: 260px;
    height: 420px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    margin: 0;
    position: relative;
  }
  
  .stream-card::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    height: 80%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
  }
  
  .stream-card:last-child::after {
    display: none;
  }
  
  /* Ensure LIVE indicator is fully visible on mobile */
  .live-indicator {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    font-size: 14px;
    min-width: 45px;
  }
  
  .thumbnail-container {
    height: 300px;
  }
}

/* Scroll indicator */
.scroll-indicator {
  display: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  color: var(--brand-color);
  text-align: center;
  margin-top: 5px;
  animation: pulse 2s infinite;
  width: 100%;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

@media screen and (max-width: 768px) {
  .scroll-indicator {
    display: block;
  }
  
  .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    width: 100%;
    text-align: center;
  }
  
  /* Fix Go Live button centering in bottom navigation */
  .bottom-nav {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
    z-index: 100;
  }
  
  .bottom-nav-item.go-live {
    position: relative;
    margin: 0;
  }
}

/* Import fonts */
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800,300italic,400italic,600italic,700italic,800italic);
