/* ============================================== */
/* YOUTUBE PAGE STYLES                           */
/* ============================================== */

/* Page Header */
.youtube-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.youtube-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 0, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 0, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.youtube-header__content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: relative;
}

.youtube-header__icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.youtube-header__icon svg {
  width: 45px;
  height: 45px;
  fill: white;
}

.youtube-header__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.youtube-header__title span {
  color: #ff0000;
}

.youtube-header__subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ============================================== */
/* CHANNEL SECTION                               */
/* ============================================== */

.channel-section {
  padding: 3rem 0;
  background: var(--bg-primary);
}

.channel-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.channel-card__avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-card__avatar svg {
  width: 50px;
  height: 50px;
  fill: white;
}

.channel-card__info {
  flex: 1;
  min-width: 250px;
}

.channel-card__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.channel-card__handle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.channel-card__desc {
  color: var(--text-secondary);
  line-height: 1.6;
}

.channel-card__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.channel-card__subscribe {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ff0000;
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.channel-card__subscribe svg {
  width: 20px;
  height: 20px;
}

.channel-card__subscribe:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.channel-card__visit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.875rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.channel-card__visit svg {
  width: 18px;
  height: 18px;
}

.channel-card__visit:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ============================================== */
/* VIDEOS SECTION                                */
/* ============================================== */

.videos-section {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.videos-section__header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.videos-section__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.videos-section__subtitle {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.videos-section__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
}

.status-dot--live {
  background: #00ff88;
  animation: pulse 2s infinite;
}

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

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.videos-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.videos-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: #ff0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Video Card */
.video-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: #ff0000;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.video-card--new {
  border-color: #ff0000;
}

.video-card__new-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ff0000;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-card__thumbnail {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.video-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-card:hover .video-card__thumbnail img {
  transform: scale(1.05);
}

.video-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.video-card__play svg {
  width: 28px;
  height: 28px;
  fill: white;
  margin-left: 4px;
}

.video-card:hover .video-card__play {
  opacity: 1;
}

.video-card__info {
  padding: 1.25rem;
}

.video-card__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card__title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.video-card__title a:hover {
  color: #ff0000;
}

.video-card__date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Load More */
.videos-section__load-more {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.load-more-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.load-more-btn svg {
  width: 20px;
  height: 20px;
}

.load-more-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Error State */
.videos-error {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.videos-error svg {
  width: 48px;
  height: 48px;
  fill: var(--text-muted);
  margin-bottom: 1rem;
}

.videos-error p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.videos-error__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ff0000;
  text-decoration: none;
  font-weight: 600;
}

.videos-error__link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  margin-bottom: 0;
}

.videos-error__link:hover {
  text-decoration: underline;
}

/* ============================================== */
/* CATEGORIES SECTION                            */
/* ============================================== */

.categories-section {
  padding: 4rem 0;
  background: var(--bg-primary);
}

.categories-section__title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
}

.category-card__icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.category-card__icon svg {
  width: 36px;
  height: 36px;
}

.category-card__icon--tutorials {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(138, 43, 226, 0.1));
  color: #a855f7;
}

.category-card__icon--devlogs {
  background: linear-gradient(135deg, rgba(0, 162, 255, 0.2), rgba(0, 162, 255, 0.1));
  color: var(--accent-primary);
}

.category-card__icon--tips {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 149, 0, 0.1));
  color: #ffd700;
}

.category-card__icon--showcases {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.1));
  color: #ff0000;
}

.category-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.category-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================== */
/* NOTIFICATION SECTION                          */
/* ============================================== */

.notify-section {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.notify-card {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(204, 0, 0, 0.05));
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.notify-card__icon {
  width: 80px;
  height: 80px;
  background: #ff0000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: bellRing 3s infinite;
}

@keyframes bellRing {
  0%, 90%, 100% { transform: rotate(0); }
  92%, 96% { transform: rotate(15deg); }
  94%, 98% { transform: rotate(-15deg); }
}

.notify-card__icon svg {
  width: 40px;
  height: 40px;
  fill: white;
}

.notify-card__content {
  flex: 1;
  min-width: 200px;
}

.notify-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.notify-card__desc {
  color: var(--text-secondary);
}

.notify-card__btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ff0000;
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.notify-card__btn svg {
  width: 22px;
  height: 22px;
}

.notify-card__btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

/* ============================================== */
/* HOME PAGE YOUTUBE SECTION                     */
/* ============================================== */

.youtube {
  background: var(--bg-secondary);
}

.youtube__content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.youtube__channel-info {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.youtube__channel-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.youtube__channel-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube__channel-avatar svg {
  width: 26px;
  height: 26px;
  fill: white;
}

.youtube__channel-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.youtube__channel-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.youtube__channel-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.youtube__subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ff0000;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  width: 100%;
}

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

.youtube__subscribe-btn:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

/* Home page video cards */
.youtube__videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.youtube__loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}

.youtube__spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border-color);
  border-top-color: #ff0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.75rem;
}

.youtube__video-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.youtube__video-card:hover {
  border-color: #ff0000;
  transform: translateY(-3px);
}

.youtube__video-thumbnail {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
}

.youtube__video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube__video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.youtube__video-play svg {
  width: 24px;
  height: 24px;
  fill: white;
  margin-left: 3px;
}

.youtube__video-card:hover .youtube__video-play {
  opacity: 1;
}

.youtube__video-info {
  padding: 1rem;
}

.youtube__video-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube__video-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.youtube__video-title a:hover {
  color: #ff0000;
}

.youtube__video-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.youtube__error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.youtube__error a {
  color: #ff0000;
}

/* YouTube CTA */
.youtube__cta {
  text-align: center;
}

.youtube__view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ff0000;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.youtube__view-all svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.youtube__view-all:hover {
  text-decoration: underline;
}

.youtube__view-all:hover svg {
  transform: translateX(4px);
}

/* ============================================== */
/* RESPONSIVE                                    */
/* ============================================== */

@media (max-width: 900px) {
  .youtube__content {
    grid-template-columns: 1fr;
  }
  
  .youtube__channel-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }
  
  .youtube__channel-banner {
    margin-bottom: 0;
  }
  
  .youtube__channel-desc {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
  }
  
  .youtube__subscribe-btn {
    width: auto;
  }
}

@media (max-width: 768px) {
  .youtube-header {
    padding: 5rem 0 3rem;
  }
  
  .youtube-header__content {
    flex-direction: column;
    text-align: center;
  }
  
  .youtube-header__icon {
    width: 70px;
    height: 70px;
  }
  
  .youtube-header__icon svg {
    width: 38px;
    height: 38px;
  }
  
  .channel-card {
    flex-direction: column;
    text-align: center;
  }
  
  .channel-card__actions {
    justify-content: center;
    width: 100%;
  }
  
  .videos-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .notify-card {
    flex-direction: column;
    text-align: center;
  }
  
  .youtube__videos {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .channel-card__actions {
    flex-direction: column;
  }
  
  .channel-card__subscribe,
  .channel-card__visit {
    width: 100%;
    justify-content: center;
  }
}
