/* =========================
   Cleaned & Fixed Stylesheet (with centered card text)
   ========================= */

:root{
  --ring-blur: 8px;
  --card-radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', monospace;
  color: #fff;
  overflow-x: hidden;
  background: linear-gradient(45deg, #000428, #004e92, #8B00FF, #FF1493, #00FF7F, #FFD700);
  background-size: 400% 400%;
  animation: bg-shift 10s ease infinite;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 4em;
  text-shadow: 0 0 20px #00FFFF, 0 0 40px #00FFFF, 0 0 60px #FF00FF;
  animation: glow 2s ease-in-out infinite alternate;
}

.header {
  text-align: center;
  padding: 50px 20px;
  position: relative;
  z-index: 10;
}

.intro {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  font-size: 1.2em;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #FF00FF;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  animation: float 3s ease-in-out infinite;
  margin-bottom: 2rem; /* pushes explore-intro down */

}

.intro p {
  animation: pulse-text 3s ease-in-out infinite;
  will-change: text-shadow;
}

.intro:hover {
  border-color: #00FFFF;
  box-shadow: 0 0 50px #FF00FF, inset 0 0 50px rgba(255, 0, 255, 0.2);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  perspective: 900px;
}

.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00FFFF;
  border-radius: 50%;
  animation: twinkle 3s linear infinite;
}

@property --ty {
  syntax: '<length>';
  initial-value: 0px;
  inherits: false;
}

.video-card {
  position: relative;
  border-radius: var(--card-radius);
  padding: 14px;
  background: rgba(10,10,20,0.6);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  overflow: hidden;
  transform: translateY(var(--ty, 0px));
  transition: transform 400ms cubic-bezier(.2,.8,.2,1),
              filter 400ms ease,
              box-shadow 400ms ease;
  will-change: transform, filter;
  animation: float 4s ease-in-out infinite;
  text-align: center; /* Center all text inside cards */
}

.video-card:hover {
  box-shadow: 0 18px 55px rgba(0, 255, 255, 0.18), 0 10px 30px rgba(0,0,0,0.45);
  filter: drop-shadow(0 0 10px rgba(0,255,255,.15));
}

.video-card .card-inner {
  position: relative;
  border-radius: var(--card-radius);
  transform-style: preserve-3d;
  transition: transform 400ms cubic-bezier(.2,.8,.2,1),
              filter 400ms ease,
              box-shadow 400ms ease;
  will-change: transform, filter;
}

.video-card:hover .card-inner {
  transform: rotateX(3deg) rotateY(-3deg);
  box-shadow: 0 18px 55px rgba(0, 255, 255, 0.18), 0 10px 30px rgba(0,0,0,0.45);
  filter: drop-shadow(0 0 10px rgba(0,255,255,.15));
}

.video-card .card-inner::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, #0ff, #80f, #f0f, #ff0, #0ff);
  filter: blur(var(--ring-blur)) saturate(1.6);
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 0;
  animation: spin 6s linear infinite paused;
}
.video-card:hover .card-inner::after {
  opacity: 0.65;
  animation-play-state: running;
}

.video-card .card-inner > * { position: relative; z-index: 1; }

.video-card .card-inner img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  transform: translateZ(24px) scale(1);
  transition: transform 400ms cubic-bezier(.2,.8,.2,1), filter 400ms ease;
  will-change: transform;
  
  width: 100%;
  height: 200px;   /* adjust to the size you want */
  object-fit: cover; /* crop and fill while keeping aspect ratio */

}
.video-card:hover .card-inner img {
  transform: translateZ(36px) scale(1.06);
  filter: saturate(1.3) contrast(1.05);
}

.video-card .card-inner h3,
.video-card .card-inner p {
  transform: translateZ(12px);
  margin: 8px 2px 0;
  color: #eaf7ff;
  text-shadow:
    0 0 6px rgba(0,255,255,.6),
    0 0 12px rgba(128,0,255,.35);
}
.video-card .card-inner h3 {
  letter-spacing: 0.5px;
  text-shadow:
    1px 0 rgba(255,0,102,.45),
    -1px 0 rgba(0,255,255,.45),
    0 0 10px rgba(0,255,255,.35);
}

.video-card .card-inner a {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #0ff;
  transform: translateZ(18px);
  transition: transform 300ms ease, box-shadow 300ms ease, background 300ms ease, color 200ms ease, text-shadow 200ms ease;
}
.video-card .card-inner a:hover,
.video-card .card-inner a:focus-visible {
  transform: translateZ(24px);
  box-shadow: 0 0 14px rgba(0,255,255,.5);
  background: rgba(0,255,255,.08);
  outline: none;
}

.video-card a:focus-visible {
  outline: 2px dashed #00FFFF;
  outline-offset: 3px;
}

@keyframes bg-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes glow {
  from { text-shadow: 0 0 20px #00FFFF, 0 0 30px #00FFFF, 0 0 40px #FF00FF; }
  to   { text-shadow: 0 0 10px #FF00FF, 0 0 20px #FF00FF, 0 0 30px #00FFFF; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 255, 255, 0.3); }
  50% { box-shadow: 0 0 50px #FF00FF; }
}

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

@keyframes pulse-text {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(0,255,255,0.9),
      0 0 14px rgba(0,255,255,0.6);
  }
  50% {
    text-shadow:
      0 0 20px #FF00FF,
      0 0 40px #FF00FF;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  body { background: #000428; background-size: auto; }
}

/* Glowing image frame */
.glowing-image {
  border: 2px solid #ff00ff;
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  animation: glowPulse 3.2s ease infinite;
}
.glowing-image:hover {
  box-shadow: 0 0 50px #FF00FF, inset 0 0 50px rgba(255, 0, 255, 0.2);
  border-color: #00FFFF;
}

@keyframes glowPulse {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.centered { text-align: center; }
.pad-36 { padding: 36px; }
.pad-27 { padding: 27px; }
.w-42 { width: 42%; display: block; margin: 0 auto; }
.w-35 { width: 35%; display: block; margin: 0 auto; }

.explore-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.2em;
  line-height: 1.6;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 15px;
  border: 2px solid #40ff00;
  box-shadow: 0 0 30px rgba(64, 255, 0, 0.3);
  animation: pulseGreen 3s ease infinite;
  color: #40ff00;
  text-shadow: 0 0 6px #00ff99, 0 0 12px #00ffcc;
}

.explore-intro:hover {
  box-shadow: 0 0 50px #40ff00, inset 0 0 50px rgba(64, 255, 0, 0.2);
  border-color: #00ffff;
}

/* Green glowing pulse */
@keyframes pulseGreen {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.footer {
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    color: #ffffff;
    text-align: center;
    padding: 20px 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.4);
    position: relative;
  }

  .footer a {
    color: #00FFFF;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
  }

  .footer a:hover {
    color: #66fcf1;
    text-decoration: underline;
  }

  .heart {
    animation: pulse 1.5s infinite;
    display: inline-block;
  }

  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }