/* Twitch Streams Section */
.twitch-streams-title {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  font-size: clamp(1.7rem, 3.3vw, 2.8rem);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.twitch-icon {
  width: 42px;
  height: 42px;
  fill: var(--blue-2);
  flex-shrink: 0;
}

#twitch-streams-subtitle {
  margin: 0;
  color: var(--text-soft);
  max-width: 60ch;
}

.twitch-streams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

/* Cards */
.twitch-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: all 180ms ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.twitch-card:hover {
  border-color: rgba(34, 152, 230, 0.6);
  background: var(--panel-soft);
}

.twitch-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
}

.twitch-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 200ms ease;
}

.twitch-card:hover .twitch-card-thumb img {
  transform: scale(1.05);
}

.twitch-live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e91916;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: "Exo 2", sans-serif;
}

.twitch-viewer-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(2, 5, 10, 0.85);
  color: var(--text-main);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.twitch-viewer-badge svg {
  fill: var(--blue-2);
  width: 11px;
  height: 11px;
}

.twitch-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}

.twitch-card:hover .twitch-play-overlay {
  opacity: 1;
}

.twitch-play-overlay svg {
  width: 48px;
  height: 48px;
  fill: var(--blue-2);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6));
}

.twitch-card-info {
  padding: 12px;
  display: flex;
  gap: 10px;
  flex: 1;
}

.twitch-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.twitch-card-text {
  flex: 1;
  min-width: 0;
}

.twitch-card-title {
  font-size: 0.8rem;
  color: var(--text-main);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 4px;
}

.twitch-card-user {
  font-size: 0.72rem;
  color: var(--blue-2);
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
}

/* Loading / Empty states */
.twitch-streams-loading,
.twitch-streams-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.twitch-streams-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.twitch-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--line);
  border-top-color: var(--blue-2);
  border-right-color: var(--blue-1);
  border-radius: 50%;
  animation: twitch-spin 0.8s linear infinite;
}

@keyframes twitch-spin {
  to { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 768px) {
  .twitch-streams-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 600px) {
  .twitch-streams-grid {
    grid-template-columns: 1fr;
  }
}
