/* ===== RESET & ROOT ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: #f7dede;
  background: #0a0000;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-attachment: fixed;
}

/* Enhanced animated gradient background - optimized */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(180, 0, 0, 0.1) 0%, transparent 50%);
  opacity: 0.2;
  z-index: -1;
  transition: background-position 0.3s ease;
  animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.25; }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

p {
  font-size: 1.1rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* ===== CONTAINER ===== */
.container {
  width: min(90%, 1200px);
  margin-inline: auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
.site-header {
  position: relative;
  padding: 70px 20px 50px;
  text-align: center;
  z-index: 1;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 0 0 30px 30px;
  z-index: -1;
  box-shadow: 0 10px 40px rgba(255, 0, 0, 0.3);
}

.site-header h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  color: #ff3333;
  text-shadow: 
    0 0 10px #ff0000,
    0 0 20px #ff3333,
    0 0 40px #b30000,
    2px 2px 6px rgba(0,0,0,0.9);
  margin: 0;
  animation: glow 3s ease-in-out infinite alternate;
}

.site-header p {
  font-size: 1.4rem;
  color: #ff9999;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
  margin-top: 0.5rem;
}

/* Social Links in Header */
.header-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: 30px;
  color: #ffb3b3;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  min-height: 44px;
  min-width: 44px;
}

.social-link:hover {
  background: rgba(255, 77, 77, 0.2);
  border-color: #ff4d4d;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(255, 77, 77, 0.5);
}

.social-link:focus-visible {
  outline: 3px solid #ff4d4d;
  outline-offset: 4px;
}

.social-link svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* ===== ANIMATIONS ===== */
@keyframes glow {
  0%, 100% { 
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ff3333, 0 0 40px #b30000, 2px 2px 6px rgba(0,0,0,0.9); 
  }
  50% { 
    text-shadow: 0 0 15px #ff4d4d, 0 0 30px #ff0000, 0 0 60px #b30000, 3px 3px 8px rgba(0,0,0,0.9); 
  }
}

@keyframes glowPulse {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* ===== INTRO SECTION ===== */
.intro {
  margin: 3rem auto 2rem;
  text-align: center;
  max-width: 900px;
}

.intro p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #f3dcdc;
}

/* ===== LAYOUT ===== */
.layout {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 2.5fr;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: start;
}

/* Video column */
.video-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 20px;
}

.video-wrapper {
  position: relative;
  width: 100%;
}

.video-column iframe {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.video-column iframe:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(255, 80, 80, 0.5);
}

.video-column iframe:focus-visible {
  outline: 3px solid #ff4d4d;
  outline-offset: 4px;
}

.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #c00;
  color: white;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  animation: glowPulse 2s ease-in-out infinite;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(255, 0, 0, 0.6);
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #ff1a1a, #cc0000);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  font-size: 0.95rem;
  min-height: 44px;
  min-width: 44px;
}

.cta-button:hover {
  background: linear-gradient(135deg, #ff3333, #ff1a1a);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 51, 51, 0.5);
}

.cta-button:focus-visible {
  outline: 3px solid #ff4d4d;
  outline-offset: 4px;
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-box {
  background: linear-gradient(135deg, rgba(50, 0, 0, 0.8), rgba(30, 0, 0, 0.9));
  border: 1px solid rgba(255, 0, 0, 0.4);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  text-align: left;
  text-decoration: none;
  display: block;
  min-height: 44px;
}

.info-box:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 10px 40px rgba(255, 80, 80, 0.5);
  background: linear-gradient(135deg, rgba(70, 0, 0, 0.95), rgba(50, 0, 0, 1));
  border-color: #ff4d4d;
}

.info-box:focus-visible {
  outline: 3px solid #ff4d4d;
  outline-offset: 4px;
  transform: translateY(-8px) scale(1.02);
}

.info-box h3 {
  color: #ff5555;
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.info-box h3 svg {
  flex-shrink: 0;
}

.info-box p {
  color: #f3dcdc;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== TOP COMICS SECTION ===== */
.top-comics {
  margin: 4rem auto;
  text-align: center;
  max-width: 800px;
}

.top-comics h3 {
  color: #ff4d4d;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.top-comics iframe {
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
  width: 100%;
  max-width: 600px;
}

.top-comics p {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #cc9999;
  opacity: 0.8;
}

/* Logo section */
.logo-section {
  text-align: center;
  margin: 5rem 0 3rem;
}

.logo-img {
  width: 200px;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.5));
}

.logo-img:hover {
  transform: scale(1.1) rotate(2deg);
}

/* ===== FOOTER ===== */
.site-footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  font-size: 0.95rem;
  color: #f3b3b3;
  border-top: 1px solid rgba(255, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  margin-top: 4rem;
}

.site-footer p {
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.footer-social a {
  color: #ffb3b3;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem;
}

.footer-social a:hover {
  color: #fff;
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(255, 77, 77, 0.8);
}

.footer-social a:focus-visible {
  outline: 3px solid #ff4d4d;
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-social a svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.footer-social a:hover svg {
  transform: scale(1.2);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #ff3333;
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: bold;
  z-index: 100;
  transition: top 0.3s;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Fade-in animation */
.fade-ready {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Mobile scroll indicator for videos */
@media (max-width: 1024px) {
  .video-column {
    position: relative;
  }
  
  .video-column::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ff4d4d;
    padding: 0.5rem 0.75rem;
    border-radius: 8px 0 0 8px;
    font-size: 1.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
  }
  
  .video-column:hover::after {
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }
  
  .video-column {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .video-wrapper {
    min-width: 300px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  
  .video-column iframe {
    height: 180px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 50px 15px 40px;
  }
  
  .site-header h1 {
    font-size: 2rem;
  }
  
  .site-header p {
    font-size: 1.1rem;
  }
  
  .header-social {
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .social-link {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .info-box {
    text-align: center;
    padding: 1.5rem;
  }
  
  .info-box h3 {
    justify-content: center;
    font-size: 1.2rem;
  }
  
  .footer-social {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .header-social {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .social-link {
    width: 100%;
    justify-content: center;
  }
  
  .intro p {
    font-size: 1rem;
  }
  
  .video-wrapper {
    min-width: 260px;
  }
  
  .footer-social {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .footer-social a {
    font-size: 0.95rem;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Latest Episodes auto-feed */
.video-section-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  color: #ff5555;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-align: center;
}

.video-placeholder {
  background: rgba(20, 0, 0, 0.5);
  border: 1px solid rgba(255, 0, 0, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.video-loading {
  color: #ff9999;
  font-size: 0.85rem;
  font-family: 'Poppins', sans-serif;
  opacity: 0.7;
  animation: pulse 1.5s ease-in-out infinite;
}

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