/* Splash Page Styles */
:root {
  --primary-color: #9333ea; /* purple-600 */
  --secondary-color: #ec4899; /* pink-500 */
  --bg-dark: #000000;
  --bg-dark-secondary: #111827; /* gray-900 */
  --border-color: #1f2937; /* gray-800 */
  --text-light: #ffffff;
  --text-muted: #9ca3af; /* gray-400 */
  --red-live: #dc2626; /* red-600 */
  --purple-accent: #9333ea;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding-bottom: 60px; /* Space for bottom nav */
  max-width: 100%;
  width: 100%;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo {
  font-size: 1.1rem;
  font-weight: bold;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.go-live-btn {
  display: flex;
  align-items: center;
  background-color: var(--purple-accent);
  color: white;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}

.go-live-btn i {
  margin-right: 4px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-light);
  padding: 8px;
  cursor: pointer;
}

/* Tabs Styles */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--purple-accent);
  background-color: var(--bg-dark);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.tab-btn {
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--text-light);
  border-bottom: 2px solid var(--purple-accent);
}

/* Content Styles */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  position: relative;
}

/* Mobile scroll snap for sections */
@media screen and (max-width: 768px) {
  .content {
    scroll-snap-type: y mandatory;
    scroll-padding: 10px;
  }
  
  /* Style section containers for better scrolling */
  .section-container {
    min-height: calc(100vh - 130px);
    padding-top: 20px;
    padding-bottom: 30px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    position: relative;
  }
  
  .section-header {
    scroll-margin-top: 10px;
    margin-bottom: 15px;
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 8px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #fe4141;
}

.streams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;
}

.stream-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-dark-secondary);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.thumbnail-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  opacity: 1;
}

.live-indicator {
  background-color: #ff0000;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.thumbnail-container:hover .thumbnail-overlay {
  background-color: rgba(0, 0, 0, 0.5);
}

.upload-icon {
  color: white;
  font-size: 24px;
  background-color: rgba(0, 0, 0, 0.6);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.upload-icon:hover {
  transform: scale(1.1);
}

.stream-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.stream-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--bg-dark-secondary);
  border-radius: 8px;
}

.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--red-live);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
}

.stream-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 8px;
}

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

.streamer-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.streamer-text {
  flex: 1;
  overflow: hidden;
}

.streamer-name {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streamer-game {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.viewers-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-light);
  background-color: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
}

.viewers-dot {
  width: 6px;
  height: 6px;
  background-color: var(--red-live);
  border-radius: 50%;
  margin-right: 4px;
}

.follow-btn {
  background-color: var(--purple-accent);
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background-color: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
  z-index: 10;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
}

.bottom-nav-item i {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.bottom-nav-item.active {
  color: var(--purple-accent);
}

.bottom-nav-item.go-live i {
  color: var(--purple-accent);
  font-size: 1.25rem;
}

/* Scroll indicator */
.scroll-indicator {
  display: none;
}

/* No streams message */
.no-streams {
  width: 100%;
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
}

/* Loading indicator */
.loading-indicator {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-muted);
}

.loading-indicator i {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* Empty state */
.empty-state {
  grid-column: span 2;
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* Responsive adjustments */
@media (min-width: 640px) {
  .streams-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .streams-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Stream card with category tag */
.category-tag {
  display: inline-block;
  padding: 2px 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 0.7rem;
  margin-top: 4px;
  color: var(--text-muted);
  align-self: flex-start;
}

.stream-details {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: var(--bg-dark-secondary);
}

.stream-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
  max-height: 2.4em; /* 2 lines */
  overflow: hidden;
  text-overflow: ellipsis;
}
