main {
    width: 100%;
  }
  
  /* Twitch iframe border */
  
  .iframe-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 10px;
    padding: 3px;
    overflow: visible;
  }
  
  .twitch {
    content: '';
    inset: 0;
    border-radius: inherit;
    padding: 15px;
  
    background:
    conic-gradient(
      from 170deg,
      #2a7f55,
      #56de93,
      #a0f1c4,
      #56de93,
      #2a7f55
    );
  
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
  
    z-index: -1;
    box-sizing: border-box;
  }
  
  /* Carousel container */
  
  .carousel {
    margin: 20px auto;
    width: 90%;
    overflow-x: auto;
    position: relative;
  
    /* fade edges */
    -webkit-mask-image: linear-gradient(
      to right,
      transparent,
      black 10%,
      black 90%,
      transparent
    );
  
    mask-image: linear-gradient(
      to right,
      transparent,
      black 10%,
      black 90%,
      transparent
    );
  
    scrollbar-width: thin;
    scrollbar-color: white transparent;
  }
  
  /* Scrollbar */
  
  .carousel::-webkit-scrollbar {
    height: 10px;
  }
  
  .carousel::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .carousel::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 999px;
  }
  
  .carousel::-webkit-scrollbar-thumb:hover {
    background: #e6e6e6;
  }
  
  /* Track */
  
  .track {
    display: flex;
    gap: 20px;
    margin-left: 50px;
    margin-right:50px;
    margin-bottom:20px;
    width: max-content;
    padding: 10px 0;
  }
  
  /* Stream card */
  
  .card {
    flex: 0 0 320px;
    width: 320px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--sec-color) 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease;
  }
  
  .card:hover {
    transform: translateY(-6px);
  }
  
  /* Thumbnail (exact stream size) */
  
/* Thumbnail container */

.thumb {
  position: relative;
  width: 320px;
  height: 180px;
  background: var(--green);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Gradient overlay */

.thumb-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: flex-end;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.65),
    rgba(0,0,0,0.25),
    rgba(0,0,0,0)
  );
}

/* Stream title */

.thumb-title {
  color: white;
  font-weight: bold;
  font-size: 1.2rem;

  padding: 10px;

  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
  
  /* Metadata */
  
  .meta {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  /* Tag */

  .tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .tag {
    font-size: 0.8rem;
    background: var(--green);
    color: var(--bg-color);
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
  }
  
  /* Views + date */
  
  .stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .views {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
  }
  
  .views svg {
    width: 16px;
    height: 16px;
  }
  
  .date {
    opacity: 0.5;
    font-size: 0.85rem;
  }
  .event-popup-backdrop {
    position: fixed;
    inset: 0;
  
    background: rgba(0,0,0,.7);
  
    display: flex;
    justify-content: center;
    align-items: center;
  
    z-index: 99999;
  }
  
  .event-popup {
    background: var(--bg-color);
    border-radius: 14px;
  
    padding: 30px;
    width: min(500px, 90vw);
  
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
  }
  
  .event-popup h2 {
    margin-top: 0;
  }
  
  .event-popup p {
    white-space: pre-line;
    line-height: 1.6;
  }
  
  .event-popup-link {
    display: inline-block;
    margin-top: 18px;
  
    color: var(--green);
    font-weight: bold;
    text-decoration: none;
  }
  
  .event-popup-close {
    display: block;
    margin-top: 20px;
  
    padding: 8px 18px;
  
    border: none;
    border-radius: 8px;
  
    background: var(--green);
    color: var(--bg-color);
  
    font-weight: bold;
    cursor: pointer;
  }