/* =========================
   VARIABLES
========================= */
:root {
  /* Palette */
  --color-primary: #ff2e63;
  --color-primary-glow: rgba(255, 46, 99, 0.5);
  --color-bg-dark: #050508;
  --color-bg-darker: #020203;
  --color-bg-overlay: rgba(5, 5, 10, 0.7);

  /* Text */
  --color-text-main: #e5e5e5;
  --color-text-muted: #a0a0a0;

  /* Effects */
  --glass-bg: rgba(5, 5, 10, 0.6);
  --glass-blur: blur(12px);
  --border-glow: 1px solid rgba(255, 46, 99, 0.3);

  /* Layout */
  --header-height: 70px;
}

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BODY
========================= */
body {
  background: radial-gradient(circle at top, #0f0f1a, var(--color-bg-dark));
  color: var(--color-text-main);
  font-family: 'Inter', Arial, sans-serif;
  /* Modern font stack */
  overflow-x: hidden;
  line-height: 1.6;
}

/* =========================
   VOID RADIO (AUDIO PLAYER)
========================= */
#void-radio {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 360px;
  /* Increased width */
  height: 80px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 46, 99, 0.3);
  border-radius: 12px;
  padding-right: 40px;
  /* Reserved space for toggle button */
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  align-items: center;
}

#void-radio:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  box-shadow: 0 5px 40px rgba(255, 46, 99, 0.2);
}

/* Minimize/Maximize Button - START SIDEBAR */
#radio-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(255, 46, 99, 0.1);
  border: 1px solid rgba(255, 46, 99, 0.3);
  border-radius: 50%;
  /* Make button circular */
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#radio-toggle:hover {
  background: rgba(255, 46, 99, 0.2);
  border-color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
  /* Maintain centering on hover */
}

#radio-toggle .toggle-icon {
  display: block;
  transition: transform 0.3s ease;
}

/* Collapsed State */
#void-radio.minimized {
  width: 60px;
  height: 60px;
  padding: 0;
  /* Reset padding */
  border-radius: 50%;
  cursor: pointer;
  justify-content: center;
}

#void-radio.minimized #radio-content {
  opacity: 0;
  pointer-events: none;
  width: 0;
  /* Collapse width */
}

#void-radio.minimized #radio-toggle {
  top: 50%;
  right: auto;
  /* Reset right position */
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

#void-radio.minimized #radio-toggle:hover {
  background: rgba(255, 46, 99, 0.1);
  transform: translate(-50%, -50%) scale(1);
}

#void-radio.minimized #radio-toggle .toggle-icon {
  transform: rotate(180deg);
  font-size: 1.5rem;
}

/* Radio Content */
#radio-content {
  width: 100%;
  height: 100%;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  #void-radio {
    width: calc(100vw - 40px);
    max-width: 360px;
    left: 20px;
    bottom: 15px;
  }

  #void-radio.minimized {
    width: 50px;
    height: 50px;
  }
}

.radio-interface {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  flex: 1;
}

#radio-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#radio-play-btn:hover {
  background: var(--color-primary);
  color: #000;
  box-shadow: 0 0 15px var(--color-primary);
}

#radio-next-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s;
}

#radio-next-btn:hover {
  color: #fff;
}

.radio-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
}

.radio-label {
  display: none;
  /* Hide label for compact mode */
}

/* Button Hover Effects */
.news-cta {
  display: inline-block;
  padding: 12px 30px;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 30px;
  margin-top: 25px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(255, 46, 99, 0.4);
}

.news-cta:hover {
  transform: translateY(-3px) scale(1.05);
  background: #ff477e;
  box-shadow: 0 8px 25px rgba(255, 46, 99, 0.6);
}

#radio-visualizer {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  /* Subtle background visualizer */
  pointer-events: none;
  z-index: -1;
  border-radius: 30px;
}

#void-radio.playing #radio-status {
  color: var(--color-primary);
  text-shadow: 0 0 5px var(--color-primary);
}

/* =========================
   VOID PARTICLES CANVAS
========================= */
#void-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* Above video background (0), below content (2+) */
  margin: 0;
  pointer-events: none;
}

/* =========================
   11. NYX GALLERY MODAL
   ========================= */
#nyx-gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 40px;
  overflow-y: auto;
}

#nyx-gallery-modal.active {
  opacity: 1;
  pointer-events: all;
}

.gallery-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.gallery-modal-header h2 {
  font-family: 'Cinzel', serif;
  color: var(--color-primary);
  font-size: 2rem;
  text-transform: uppercase;
  margin: 0;
}

.gallery-modal-close {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.gallery-modal-close:hover {
  background: var(--color-primary);
  color: #fff;
  transform: rotate(90deg);
}

.gallery-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 46, 99, 0.2);
  transition: all 0.3s ease;
  background: #000;
}

.gallery-item:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
  box-shadow: 0 5px 20px rgba(255, 46, 99, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-item-info {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.9);
}

.gallery-item-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}

.gallery-download-btn {
  background: rgba(255, 46, 99, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(255, 46, 99, 0.3);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gallery-download-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #nyx-gallery-modal {
    padding: 20px;
  }

  .gallery-modal-grid {
    grid-template-columns: 1fr;
  }

  .gallery-modal-header h2 {
    font-size: 1.5rem;
  }
}

/* =========================
   HEADER
========================= */
.main-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  color: var(--color-primary);
  font-weight: bold;
  letter-spacing: .3em;
  text-shadow: 0 0 10px var(--color-primary-glow);
}

.nav-links a {
  margin-left: 30px;
  color: var(--color-text-main);
  text-decoration: none;
  opacity: .7;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
  opacity: 1;
  text-shadow: 0 0 8px var(--color-primary-glow);
}

/* =========================
   HERO
========================= */
#hero-main {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  /* Needed for absolute video positioning */
  overflow: hidden;
}

/* Video 3 - Fondo Sutil */
.hero-ambient-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Detrás del contenido */
  opacity: 0.15;
  /* Muy sutil, casi transparente */
  pointer-events: none;
  filter: blur(4px) grayscale(40%);
  /* Difuminado para dar ambiente */
}

.hero-ambient-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay para integrar mejor el video con el fondo oscuro */
.ambient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 40%, #05050a 100%);
}

.hero-title {
  font-size: clamp(4rem, 12vw, 9rem);
  color: var(--color-primary);
  letter-spacing: .4em;
  text-shadow: 0 0 20px var(--color-primary-glow);
}

.hero-subtitle {
  margin-top: 20px;
  opacity: .8;
}

.hero-cta {
  margin-top: 40px;
  font-size: .8rem;
  letter-spacing: .3em;
  opacity: .6;
}

/* =========================
   NEWS BANNER
========================= */
#news-banner {
  padding: 20px 0;
  background: rgba(10, 10, 15, .6);
}

.news-track {
  display: inline-flex;
  gap: 60px;
  white-space: nowrap;
  animation: scroll 35s linear infinite;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* =========================
   HERO AVATARS LAYOUT
========================= */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1200px;
  width: 100%;
}

.hero-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hero-title {
  order: 2;
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: 20px;
  margin: 0 40px;
  line-height: 1;
  color: var(--color-primary);
}

.video-avatar:first-child {
  order: 1;
}

.video-avatar:last-child {
  order: 3;
}

.video-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--color-primary-glow);
  box-shadow: 0 0 20px var(--color-primary-glow);
  background: #000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-avatar video {
  width: 100%;
  height: 100%;
  /* Force FULL BODY visibility inside circle */
  object-fit: contain !important;
  background: #000 !important;
}

@media (max-width: 768px) {
  .hero-avatars {
    gap: 20px;
  }

  .hero-title {
    order: 1;
    width: 100%;
    margin-bottom: 30px;
  }

  .video-avatar {
    order: 2;
    width: 100px;
    height: 100px;
  }
}

.video-avatar:hover {
  transform: scale(1.1);
  border-color: #ff2e63;
  box-shadow: 0 0 30px rgba(255, 46, 99, 0.6);
  z-index: 10;
}

.video-avatar video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.3);
}

/* =========================
   FEATURED NEWS
========================= */
#featured-news {
  padding: 140px 8%;
}

.featured-text h2 {
  font-size: 2.8rem;
  margin: 20px 0;
  line-height: 1.2;
}

.featured-text p {
  opacity: .8;
  font-size: 1.05rem;
}

.news-tag {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255, 46, 99, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(255, 46, 99, 0.3);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  border-radius: 20px;
  font-weight: bold;
  text-transform: uppercase;
}

/* =========================
   WALLPAPERS SECTION
========================= */
#wallpapers {
  padding: 100px 8%;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
}

.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.wall-card {
  height: 250px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(255, 46, 99, 0.2);
}

/* Background Gradients/Images (simulated) */
/* Background Images (No Filters - Full Brightness) */
.wall-card.anime-dark {
  background-image: url('https://images4.alphacoders.com/936/thumb-1920-936378.jpg');
}

.wall-card.horror {
  background-image: url('https://images2.alphacoders.com/112/thumb-1920-1123013.jpg');
}

.wall-card.cyberpunk {
  background-image: url('https://images3.alphacoders.com/133/thumb-1920-1337965.jpeg');
}

.wall-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 10px 40px var(--color-primary-glow);
  filter: brightness(1.1);
  border-color: var(--color-primary);
}


.wall-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.wall-card:hover .wall-bg {
  transform: scale(1.1);
}

.wall-card:hover .wall-overlay {
  opacity: 1;
}

.wall-overlay h3 {
  color: #fff;
  font-size: 1.8rem;
  letter-spacing: 0.2em;
  text-shadow: 0 0 10px var(--color-primary-glow);
  margin-bottom: 10px;
}

.wall-overlay span {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 0.9rem;
  border: 1px solid var(--color-primary);
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.8);
}

/* Old video styles removed */

/* =========================
   PORTALS
========================= */
#external-portals {
  padding: 140px 8%;
  text-align: center;
}

.section-title {
  color: #ff2e63;
  font-size: 2.4rem;
  letter-spacing: .3em;
}

.section-subtitle {
  color: #ccc;
  margin: 20px auto 80px;
}

.portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.portal-card {
  height: 600px;
  /* Even taller for full 9:16 mobile view */
  border-radius: 24px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

/* Video Positioning to fill card */
.card-video-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Show full video without cropping */
  opacity: 1;
  /* Full brightness */
  transition: transform 0.4s ease;
}

.portal-card:hover .card-video-bg video {
  transform: scale(1.05);
  /* Only zoom, no opacity change needed */
}

/* Gradient Overlay - Only at the very bottom for text readability */
.portal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 2;
  pointer-events: none;
}

.portal-card.youtube {
  background: #000;
  /* Fallback */
}

.portal-card.crunchyroll {
  background: #000;
  /* Fallback */
}

.portal-content {
  position: absolute;
  inset: 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

/* =========================
   POPULAR POSTS SIDEBAR
========================= */
#popular-sidebar {
  position: fixed;
  right: 30px;
  top: 120px;
  width: 320px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  z-index: 50;
  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 46, 99, 0.5) transparent;
}

#popular-sidebar::-webkit-scrollbar {
  width: 6px;
}

#popular-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#popular-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 46, 99, 0.5);
  border-radius: 3px;
}

#popular-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 46, 99, 0.7);
}

.sidebar-content {
  background: linear-gradient(135deg, rgba(15, 15, 25, 0.85) 0%, rgba(5, 5, 10, 0.7) 100%);
  backdrop-filter: blur(30px) saturate(120%);
  -webkit-backdrop-filter: blur(30px) saturate(120%);
  border: 1px solid rgba(255, 46, 99, 0.3);
  border-radius: 24px;
  padding: 30px 25px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    inset 0 0 40px rgba(255, 46, 99, 0.05);
  transition: all 0.4s ease;
}

.sidebar-title {
  color: var(--color-primary);
  font-size: 1rem;
  letter-spacing: 0.3em;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 46, 99, 0.6);
  border-bottom: 1px solid rgba(255, 46, 99, 0.2);
  padding-bottom: 15px;
}

.popular-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.popular-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
}

.popular-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 46, 99, 0.1), transparent);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popular-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 46, 99, 0.1);
  border-color: rgba(255, 46, 99, 0.3);
  box-shadow: 0 8px 20px rgba(255, 46, 99, 0.2);
}

.popular-item:hover::before {
  opacity: 1;
}

.popular-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 46, 99, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.popular-item:hover .popular-thumb {
  border-color: var(--color-primary);
  box-shadow:
    0 6px 20px rgba(255, 46, 99, 0.4),
    0 0 15px rgba(255, 46, 99, 0.3);
  transform: scale(1.05);
}

.popular-info {
  flex: 1;
  position: relative;
  z-index: 2;
}

.popular-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
  border: 1px solid;
  transition: all 0.3s ease;
}

/* Tag Colors */
.popular-tag.anime {
  background: rgba(255, 46, 99, 0.15);
  color: #ff2e63;
  border-color: rgba(255, 46, 99, 0.3);
}

.popular-tag.horror {
  background: rgba(138, 43, 226, 0.15);
  color: #b967ff;
  border-color: rgba(138, 43, 226, 0.3);
}

.popular-tag.cultura {
  background: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
  border-color: rgba(255, 140, 0, 0.3);
}

.popular-tag.manga {
  background: rgba(0, 191, 255, 0.15);
  color: #00bfff;
  border-color: rgba(0, 191, 255, 0.3);
}

.popular-tag.ia {
  background: rgba(50, 205, 50, 0.15);
  color: #32cd32;
  border-color: rgba(50, 205, 50, 0.3);
}

.popular-item:hover .popular-tag {
  transform: translateX(2px);
}

.popular-title {
  color: #e5e5e5;
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 500;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.popular-item:hover .popular-title {
  color: #fff;
}

/* Responsive Design for Sidebar */
@media (max-width: 1400px) {
  #popular-sidebar {
    right: 20px;
    width: 300px;
  }
}

@media (max-width: 1200px) {
  #popular-sidebar {
    position: static;
    width: 100%;
    max-width: 600px;
    margin: 80px auto 0;
    padding: 0 5%;
  }

  .sidebar-content {
    padding: 30px;
  }

  .popular-list {
    gap: 20px;
  }

  .popular-item {
    padding: 15px;
  }

  .popular-thumb {
    width: 70px;
    height: 70px;
  }

  .popular-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .popular-item {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .popular-thumb {
    width: 80px;
    height: 80px;
  }

  .popular-info {
    width: 100%;
  }

  .popular-title {
    font-size: 1rem;
  }
}


/* =========================
   CHAT BUBBLE (ASSISTANT VIDEO)
========================= */
#nyx-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 80px;
  /* Increased size for video */
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.3s ease;
  /* Removed old background/font styles */
}

/* Video Container */
.bubble-video-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-primary);
  background: #000;
  position: relative;
  z-index: 2;
}

.bubble-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  /* Focus on face */
}

/* Glow Effect */
.bubble-glow {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--color-primary);
  filter: blur(15px);
  opacity: 0.6;
  z-index: 1;
  animation: pulseGlow 2s infinite alternate;
}

#nyx-bubble:hover {
  transform: scale(1.1) rotate(-5deg);
}

#nyx-bubble:hover .bubble-glow {
  opacity: 0.9;
  filter: blur(20px);
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* =========================
   HOLOGRAPHIC CHAT INTERFACE
========================= */
#nyx-chat-mini {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 340px;
  height: 500px;
  background: rgba(8, 8, 12, 0.6);
  /* Super transparent dark glass */
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);

  /* Holographic Glow Border */
  border: 1px solid rgba(255, 46, 99, 0.5);
  box-shadow:
    0 0 30px rgba(255, 46, 99, 0.2),
    inset 0 0 20px rgba(255, 46, 99, 0.05);

  border-radius: 40px;
  /* Super rounded, almost distinct shape */
  border-bottom-right-radius: 5px;
  /* Connection to bubble */

  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  transform-origin: bottom right;
}

#nyx-chat-mini.active {
  display: flex;
  animation: hologramUnfold 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes hologramUnfold {
  0% {
    opacity: 0;
    transform: scale(0) translateY(100px) skewX(-20deg);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0) skewX(0);
    filter: blur(0);
  }
}

/* Header Integrated */
.nyx-chat-header {
  background: transparent;
  /* No blocky header */
  padding: 25px 25px 10px;
  color: #ff2e63;
  font-family: 'Courier New', monospace;
  /* Tech vibe */
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1.2rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(255, 46, 99, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
}

#nyx-chat-close {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  transition: all 0.3s;
}

#nyx-chat-close:hover {
  background: #ff2e63;
  transform: rotate(90deg);
}

.nyx-chat-body {
  flex: 1;
  padding: 20px 25px;
  gap: 15px;
  background: transparent;
  overflow-y: auto;
  /* Enable vertical scrolling */
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  /* Remove mask-image if it causes issues, or adjust it */
  mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: rgba(255, 46, 99, 0.5) transparent;
}

/* Tech Messages */
.nyx-msg {
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  max-width: 85%;
}

.nyx-msg.nyx {
  background: rgba(255, 46, 99, 0.15);
  border-left: 3px solid #ff2e63;
  color: #fff;
  border-radius: 4px 18px 18px 18px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nyx-msg.user {
  background: rgba(255, 255, 255, 0.1);
  color: #ddd;
  align-self: flex-end;
  border-radius: 18px 18px 4px 18px;
  border-right: 3px solid rgba(255, 255, 255, 0.5);
}

/* Modern Input Zone */
.nyx-chat-input {
  padding: 20px;
  background: transparent;
  border-top: 1px solid rgba(255, 46, 99, 0.2);
  gap: 12px;
}

#nyx-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 46, 99, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  color: #fff;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
  font-family: inherit;
}

#nyx-input:focus {
  border-color: #ff2e63;
  box-shadow: 0 0 15px rgba(255, 46, 99, 0.2);
}

/* Options Container */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  animation: fadeIn 0.5s ease;
}

/* Tech Options Buttons */
.chat-option-btn {
  background: rgba(255, 46, 99, 0.1);
  border: 1px solid rgba(255, 46, 99, 0.4);
  color: #ffdae3;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.chat-option-btn:hover {
  background: rgba(255, 46, 99, 0.3);
  border-color: #ff2e63;
  padding-left: 20px;
  /* Slight movement */
  box-shadow: 0 0 10px rgba(255, 46, 99, 0.2);
}

.chat-option-btn::before {
  content: '>';
  position: absolute;
  left: 5px;
  opacity: 0;
  transition: opacity 0.2s;
}

.chat-option-btn:hover::before {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   FOOTER (ABYSSAL FAREWELL)
========================= */
#footer-abyss {
  position: relative;
  min-height: 50vh;
  /* Dynamic height */
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: visible;
  /* Show all content */
  margin-top: 100px;
  background: #000;
  padding: 80px 0;
  /* Add padding */
}

/* Video Layer */
.footer-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  /* Visible but atmospheric */
  filter: blur(2px) contrast(1.2) grayscale(30%);
}

.footer-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gradient Overlay for "Fade to Black" effect at bottom */
.footer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #05050a 0%, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
}

/* Footer Content */
.footer-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 0 20px;
}

.footer-title {
  font-family: 'Cinzel', serif;
  /* Or system serif */
  font-size: 2rem;
  /* Smaller to fit */
  color: #fff;
  letter-spacing: 0.2em;
  /* Reduced spacing */
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(255, 46, 99, 0.8);
  animation: pulseGlow 4s infinite alternate;
  line-height: 1.4;
  /* Better wrapping */
}

.footer-text {
  font-size: 1.2rem;
  color: #ccc;
  line-height: 1.8;
  margin-bottom: 40px;
  font-style: italic;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 50px;
}

.social-link {
  color: #ff2e63;
  text-decoration: none;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  transition: all 0.3s ease;
}

.social-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #ff2e63;
  transition: width 0.3s ease;
}

.social-link:hover {
  text-shadow: 0 0 10px var(--color-primary);
  color: #fff;
}

.social-link:hover::after {
  width: 100%;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

#nyx-send {
  width: 45px;
  height: 45px;
  background: #ff2e63;
  box-shadow: 0 0 20px rgba(255, 46, 99, 0.5);
  font-size: 18px;
}

#nyx-send:hover {
  transform: scale(1.1) rotate(-10deg);
  background: #fff;
  color: var(--color-primary);
}

/* =========================
   MENU
========================= */
#menu-toggle {
  position: fixed;
  top: 90px;
  left: 30px;
  font-size: 26px;
  color: var(--color-primary);
  cursor: pointer;
  z-index: 200;
}

#side-menu {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: linear-gradient(180deg, #0f0f19 0%, #05050a 100%);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
  transition: left 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 9999;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 20px;
  /* Custom Scrollbar for side menu */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 46, 99, 0.5) transparent;
}

#side-menu::-webkit-scrollbar {
  width: 6px;
}

#side-menu::-webkit-scrollbar-track {
  background: transparent;
}

#side-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 46, 99, 0.5);
  border-radius: 3px;
}

#side-menu.active {
  left: 0;
}

.side-menu-header {
  padding: 30px;
  background: rgba(255, 46, 99, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 46, 99, 0.3);
}

.side-menu-header span {
  color: #ff2e63;
  font-weight: bold;
  letter-spacing: 0.3em;
}

#menu-close {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#menu-close:hover {
  opacity: 0.7;
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.side-menu-nav a {
  padding: 18px 30px;
  color: #e5e5e5;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.side-menu-nav a:hover {
  background: rgba(255, 46, 99, 0.1);
  border-left-color: var(--color-primary);
  color: var(--color-primary);
}

/* =========================
   POPULAR POSTS IN SIDE MENU
========================= */
.popular-menu {
  padding: 20px 20px 15px;
  border-top: 1px solid rgba(255, 46, 99, 0.2);
  flex-shrink: 0;
}

.popular-menu h3 {
  color: var(--color-primary);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 46, 99, 0.6);
}

.popular-menu-loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: 20px;
  font-size: 0.85rem;
  opacity: 0.7;
}

.side-menu-popular {
  padding: 20px 20px 15px;
  border-top: 1px solid rgba(255, 46, 99, 0.2);
  flex-shrink: 0;
  /* Don't allow to be compressed */
}

.popular-section-title {
  color: var(--color-primary);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 46, 99, 0.6);
}

.popular-menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Removed max-height constraint */
  width: 100%;
}

.popular-menu-list::-webkit-scrollbar {
  width: 4px;
}

.popular-menu-list::-webkit-scrollbar-track {
  background: transparent;
}

.popular-menu-list::-webkit-scrollbar-thumb {
  background: rgba(255, 46, 99, 0.5);
  border-radius: 2px;
}

.popular-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid transparent;
}

.popular-menu-item:hover {
  background: rgba(255, 46, 99, 0.1);
  border-color: rgba(255, 46, 99, 0.3);
  transform: translateX(3px);
}

.popular-menu-thumb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 46, 99, 0.3);
  transition: all 0.3s ease;
}

.popular-menu-item:hover .popular-menu-thumb {
  border-color: var(--color-primary);
  box-shadow: 0 0 12px rgba(255, 46, 99, 0.4);
  transform: scale(1.05);
}

.popular-menu-info {
  flex: 1;
  min-width: 0;
  /* Allow text truncation */
}

.popular-menu-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 4px;
  text-transform: uppercase;
  border: 1px solid;
}

/* Tag Colors - Same as before */
.popular-menu-tag.anime {
  background: rgba(255, 46, 99, 0.15);
  color: #ff2e63;
  border-color: rgba(255, 46, 99, 0.3);
}

.popular-menu-tag.horror {
  background: rgba(138, 43, 226, 0.15);
  color: #b967ff;
  border-color: rgba(138, 43, 226, 0.3);
}

.popular-menu-tag.cultura {
  background: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
  border-color: rgba(255, 140, 0, 0.3);
}

.popular-menu-tag.manga {
  background: rgba(0, 191, 255, 0.15);
  color: #00bfff;
  border-color: rgba(0, 191, 255, 0.3);
}

.popular-menu-tag.ia {
  background: rgba(50, 205, 50, 0.15);
  color: #32cd32;
  border-color: rgba(50, 205, 50, 0.3);
}

.popular-menu-title {
  color: #e5e5e5;
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 500;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.popular-menu-item:hover .popular-menu-title {
  color: #fff;
}

/* =========================
   MENU MASCOT (EYE)
   ========================= */
.menu-mascot-container {
  margin-top: auto;
  /* Push to bottom */
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  /* Prevent crushing */
  border-top: 1px solid rgba(255, 46, 99, 0.2);
}

.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.mascot-img.hover {
  opacity: 0;
}

.menu-mascot-container:hover .mascot-img.default {
  opacity: 0;
}

.menu-mascot-container:hover .mascot-img.hover {
  opacity: 1;
}

/* Fix Side Menu Scroll */
#side-menu {
  /* Ensure flexible layout for content */
  display: flex !important;
  flex-direction: column !important;
  /* Scroll is handled by overflow-y: auto already */
}

/* =========================
   ANIMACIONES
========================= */
@keyframes armSwingLeft {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }

  50% {
    transform: translateX(-50%) rotate(-3deg);
  }

  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

@keyframes armSwingRight {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }

  50% {
    transform: translateX(-50%) rotate(3deg);
  }

  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

@keyframes headTilt {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }

  30% {
    transform: translateX(-50%) rotate(-1deg);
  }

  70% {
    transform: translateX(-50%) rotate(1deg);
  }

  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

@keyframes hairSway {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }

  50% {
    transform: translateX(-50%) rotate(2deg);
  }

  100% {
    transform: translateX(-50%) rotate(0deg);
  }
}

@keyframes blink {

  0%,
  90%,
  100% {
    opacity: 1;
  }

  95% {
    opacity: 0;
  }
}

@keyframes nyxFloat {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes nyxBreathe {
  0% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.02) translateY(-3px);
  }

  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes nyxGlow {
  0% {
    filter: drop-shadow(0 0 20px rgba(255, 46, 99, 0.3)) brightness(1);
  }

  50% {
    filter: drop-shadow(0 0 40px rgba(255, 46, 99, 0.6)) brightness(1.05);
  }

  100% {
    filter: drop-shadow(0 0 20px rgba(255, 46, 99, 0.3)) brightness(1);
  }
}

@keyframes auraPulse {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }

  100% {
    opacity: 0.4;
    transform: scale(1);
  }
}



/* =========================
   REVEAL ANIMATION
========================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE DESIGN - COMPREHENSIVE MOBILE FIXES
========================= */

/* ===== TABLET & SMALL LAPTOPS (768px - 1024px) ===== */
@media (max-width: 1024px) {

  /* Reduce padding on sections */
  #featured-news,
  #external-portals,
  #wallpapers {
    padding: 60px 5%;
  }

  /* Stack news presenter */
  .news-container-main {
    flex-direction: column;
  }

  .news-presenter {
    position: static;
    margin: 0 auto 40px;
  }
}

/* ===== TABLETS & LARGE PHONES (max-width: 768px) ===== */
@media (max-width: 768px) {

  /* === HEADER & NAVIGATION === */
  .main-header {
    padding: 15px 5%;
    height: auto;
  }

  .logo {
    font-size: 1.5rem;
    letter-spacing: 0.2em;
  }

  .nav-links {
    display: none;
    /* Hide on mobile - would need hamburger menu */
    flex-direction: column;
    gap: 15px;
    font-size: 0.9rem;
  }

  /* === HERO SECTION === */
  #hero-main {
    min-height: 70vh;
    padding: 100px 5% 60px;
  }

  .hero-title {
    font-size: 3rem !important;
    letter-spacing: 0.15em;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
    max-width: 90%;
  }

  .scroll-indicator {
    font-size: 0.8rem;
    padding: 10px 20px;
  }

  /* === TYPOGRAPHY === */
  .section-title {
    font-size: 2rem;
    letter-spacing: 0.1em;
  }

  .section-subtitle {
    font-size: 0.9rem;
    max-width: 100%;
  }

  /* === GRIDS - SINGLE COLUMN === */
  .portals-grid,
  .wallpapers-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }

  .featured-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .featured-text,
  .featured-image {
    width: 100%;
  }

  /* === CARDS === */
  .portal-card,
  .wallpaper-card {
    max-width: 100%;
  }

  .portal-content h3 {
    font-size: 1.3rem;
  }

  .portal-content p {
    font-size: 0.9rem;
  }

  /* === PAGINATION === */
  .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .pagination-btn {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(255, 46, 99, 0.3);
    color: #e5e5e5;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
  }

  .pagination-btn:hover:not(:disabled) {
    background: rgba(255, 46, 99, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 46, 99, 0.2);
  }

  .pagination-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(255, 46, 99, 0.4);
    font-weight: bold;
  }

  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
  }

  /* === BLOG HIGHLIGHT === */
  #blog-highlight {
    padding: 60px 5% !important;
  }

  .blog-preview-card {
    flex-direction: column !important;
  }

  .blog-img-col,
  .blog-text-col {
    min-width: 100% !important;
  }

  .blog-text-col {
    padding: 30px !important;
  }

  .blog-text-col h3 {
    font-size: 1.5rem !important;
  }

  /* === FOOTER === */
  #footer-abyss {
    padding: 60px 5%;
    min-height: auto;
  }

  .footer-title {
    font-size: 1.8rem;
    letter-spacing: 0.15em;
  }

  .footer-subtitle {
    font-size: 0.9rem;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .newsletter-form input {
    width: 100%;
    margin-bottom: 15px;
    font-size: 0.9rem;
  }

  .newsletter-form button {
    width: 100%;
  }

  .footer-copyright {
    margin-top: 30px;
  }

  .footer-copyright div {
    flex-direction: column !important;
    gap: 15px !important;
  }

  .footer-copyright a {
    font-size: 0.85rem !important;
  }

  /* === NYX CHAT === */
  #nyx-ai {
    width: 90vw;
    max-width: 350px;
    height: 500px;
    right: 5%;
    bottom: 80px;
  }

  #nyx-bubble {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
  }

  #nyx-chat-mini {
    bottom: 90px;
    right: 20px;
    width: calc(100vw - 40px);
    max-width: 320px;
  }

  .chat-messages {
    font-size: 0.9rem;
  }

  .chat-options button {
    font-size: 0.85rem;
    padding: 10px 15px;
  }

  /* === SECTIONS PADDING === */
  #featured-news,
  #external-portals,
  #wallpapers {
    padding: 60px 5%;
  }

  /* === DISABLE HEAVY ANIMATIONS FOR PERFORMANCE === */
  #particles-js {
    opacity: 0.3;
    /* Reduce instead of hide */
  }

  .glitch-effect {
    animation-duration: 8s;
    /* Slower = less CPU */
  }
}

/* ===== SMALL PHONES (max-width: 480px) ===== */
@media (max-width: 480px) {

  /* === HERO === */
  .hero-title {
    font-size: 2.2rem !important;
    letter-spacing: 0.1em;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  /* === TYPOGRAPHY === */
  .section-title {
    font-size: 1.6rem;
  }

  .featured-text h2 {
    font-size: 1.5rem;
  }

  .footer-title {
    font-size: 1.5rem;
  }

  /* === CARDS === */
  .portal-content h3 {
    font-size: 1.2rem;
  }

  .portal-content p {
    font-size: 0.85rem;
  }

  .portal-cta,
  .news-cta {
    font-size: 0.85rem;
    padding: 10px 20px;
  }

  /* === CHAT === */
  #nyx-bubble {
    width: 55px;
    height: 55px;
    bottom: 15px;
    right: 15px;
  }

  #nyx-ai {
    width: 95vw;
    height: 450px;
  }

  /* === FOOTER === */
  .newsletter-form input,
  .newsletter-form button {
    font-size: 0.85rem;
  }

  /* === REDUCE PADDING === */
  #featured-news,
  #external-portals,
  #wallpapers,
  #blog-highlight {
    padding: 50px 5% !important;
  }

  /* === DISABLE PARTICLES ON SMALL PHONES === */
  #particles-js {
    display: none;
  }
}

/* ===== VERY SMALL PHONES (max-width: 360px) ===== */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.8rem !important;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  body {
    font-size: 14px;
  }
}

/* ===== LANDSCAPE MODE ON PHONES ===== */
@media (max-height: 500px) and (orientation: landscape) {
  #hero-main {
    min-height: 100vh;
  }

  .hero-title {
    font-size: 2.5rem !important;
  }

  #nyx-ai {
    height: 80vh;
  }

  /* =========================================
   MOBILE FORCE FIX (ULTIMATE PATCH)
   ========================================= */
  @media (max-width: 768px) {

    /* 1. Global Layout Fixes */
    body,
    html {
      overflow-x: hidden;
      width: 100%;
    }

    .container,
    section {
      padding-left: 15px !important;
      padding-right: 15px !important;
      width: 100% !important;
      box-sizing: border-box;
    }

    /* 2. Grid & Flex Resets */
    .grid-2,
    .grid-3,
    .portals-grid,
    .wallpaper-grid,
    .news-grid {
      display: flex !important;
      flex-direction: column !important;
      width: 100% !important;
      gap: 30px !important;
    }

    /* 3. Hero Adjustments */
    .hero-content {
      padding: 0 15px;
    }

    .hero-title {
      font-size: 2rem !important;
      line-height: 1.2;
    }

    .hero-subtitle {
      font-size: 0.95rem;
      padding: 0 10px;
    }

    /* 4. NYX Gallery Modal Fixes */
    #nyx-gallery-modal {
      padding: 15px !important;
      align-items: center;
      justify-content: flex-start;
      /* Start from top */
    }

    .gallery-modal-header {
      flex-direction: row;
      /* Keep header active */
      margin-bottom: 20px;
      width: 100%;
    }

    .gallery-modal-header h2 {
      font-size: 1.4rem !important;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .gallery-modal-grid {
      grid-template-columns: 1fr !important;
      /* Single column */
      gap: 20px !important;
      padding-bottom: 50px;
      /* Space for scrolling */
    }

    .gallery-item img {
      height: auto !important;
      max-height: 300px;
    }

    /* 5. Navigation & Menu */
    nav ul {
      background: rgba(10, 10, 15, 0.98);
      /* Solid background */
      backdrop-filter: blur(20px);
    }

    #side-menu {
      width: 85% !important;
      /* Take mostly full screen */
      max-width: 320px;
    }
  }

  /* Very Small Screens */
  @media (max-width: 380px) {
    .hero-title {
      font-size: 1.6rem !important;
    }

    .gallery-modal-header h2 {
      font-size: 1.2rem !important;
    }
  }
}