/* Features CSS - Stats, Gallery, Video Tutorials, Social Share, Discord Widget */

/* Stats System */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-2px);
}

.stat-icon {
  color: var(--primary-color, #22c55e);
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* User Gallery */
.gallery-subtitle {
  text-align: center;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.7);
}

.gallery-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery-filter-btn {
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.gallery-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
}

.gallery-filter-btn.active {
  background: var(--primary-color, #22c55e);
  border-color: var(--primary-color, #22c55e);
  color: #000;
}

#user-gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  justify-items: center;
}

.gallery-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-like-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-like-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(34, 197, 94, 0.5);
}

.gallery-like-btn.liked {
  color: #ef4444;
  border-color: #ef4444;
}

.gallery-info {
  padding: 1rem;
}

.gallery-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.gallery-author {
  color: rgba(255, 255, 255, 0.6);
}

.gallery-modlist-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  color: var(--primary-color, #22c55e);
  font-size: 0.75rem;
}

/* Video Tutorials */
.video-tutorials-wrapper {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
  margin: 2rem 0;
}

.video-player-wrapper {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
}

.video-placeholder svg {
  margin-bottom: 1rem;
}

.video-iframe {
  width: 100%;
  height: 100%;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.video-list::-webkit-scrollbar {
  width: 6px;
}

.video-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.video-list::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.5);
  border-radius: 3px;
}

.video-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-item:hover,
.video-item.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 197, 94, 0.5);
}

.video-thumbnail {
  width: 60px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color, #22c55e);
  flex-shrink: 0;
}

.video-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.video-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.video-details {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-duration {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Social Share */
.share-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-2px);
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

.share-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(34, 197, 94, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 10000;
}

.share-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Discord Widget */
.discord-widget-container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  margin: 2rem 0;
}

.feature-image .discord-widget-container {
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  height: 100%;
}

.feature-image .discord-widget-container .discord-header {
  display: none;
}

.feature-image .discord-widget-container .discord-iframe {
  height: 100%;
  min-height: 400px;
}

.discord-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.discord-icon {
  width: 40px;
  height: 40px;
  color: #5865F2;
}

.discord-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.discord-iframe {
  width: 100%;
  border-radius: 8px;
  border: none;
}

/* Light theme overrides */
html[data-theme="light"] .stat-item,
html[data-theme="light"] .gallery-filter-btn,
html[data-theme="light"] .gallery-item,
html[data-theme="light"] .video-player-wrapper,
html[data-theme="light"] .video-item,
html[data-theme="light"] .share-btn,
html[data-theme="light"] .discord-widget-container {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .gallery-filter-btn {
  color: #1b1b1b;
}

html[data-theme="light"] .gallery-filter-btn:hover {
  background: rgba(0, 0, 0, 0.07);
  border-color: rgba(234, 88, 12, 0.3);
}

html[data-theme="light"] .gallery-filter-btn.active {
  background: var(--primary-color, #ea580c);
  border-color: var(--primary-color, #ea580c);
  color: #fff;
}

html[data-theme="light"] .gallery-subtitle {
  color: #555;
}

html[data-theme="light"] .stat-value,
html[data-theme="light"] .gallery-title,
html[data-theme="light"] .video-title,
html[data-theme="light"] .discord-title {
  color: #1b1b1b;
}

html[data-theme="light"] .stat-label,
html[data-theme="light"] .gallery-author,
html[data-theme="light"] .video-duration {
  color: rgba(0, 0, 0, 0.6);
}

html[data-theme="light"] .share-btn {
  color: #1b1b1b;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .stats-container {
    grid-template-columns: 1fr;
  }

  .video-tutorials-wrapper {
    grid-template-columns: 1fr;
  }

  .video-list {
    max-height: 400px;
  }

  #user-gallery-container {
    grid-template-columns: 1fr;
  }

  .share-buttons {
    justify-content: center;
  }
}
