:root {
  --twitch: #9146FF;
  --youtube: #FF0000;
  --glass: rgba(255, 255, 255, 0.583);
}

.pro-container {
  display: flex;
  /* 1. Sets them horizontal on desktop */
  flex-direction: row; 
  /* 2. Allows them to drop to a new line when the screen is too small */
  flex-wrap: wrap;     
  /* 3. Spacing between the cards */
  gap: 40px;           
  justify-content: center;
  align-items: flex-start; /* Keeps them aligned at the top */
  padding: 50px 20px;
  perspective: 1500px;
}

.tilt-card-wrapper {
  flex: 0 1 auto; /* Allows the card to keep its 340px width */
  max-width: 340px;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-style: preserve-3d;
}

/* 3. HOVER EFFECT: Reduced Tilt for stacked layout */
.tilt-card-wrapper:hover {
  /* Reduced Y-rotation slightly since they are stacked vertically */
  transform: translateY(-10px) rotateX(6deg) rotateY(-4deg);
}

.glass-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  /* height: 210px; <--- Make sure this is still REMOVED */
  position: relative;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  text-decoration: none;
  background: #1a1a1a;
  border: 2px solid rgba(255, 255, 255, 0.2); 
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  isolation: isolate;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card-footer {
  /* position: absolute; <--- REMOVED: Now it sits naturally below the image */
  position: relative; 
  width: 100%;
  padding: 20px 15px;
  background: rgba(0, 0, 0, 0.8); 
  backdrop-filter: blur(12px); 
  
  display: flex;
  flex-direction: column; 
  align-items: center;    
  justify-content: center;
  gap: 4px;

  /* Matches your design */
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 0; 
  -webkit-backdrop-filter: blur(12px); /* Vital for Safari/iPhone support */
}

/* 6. TEXT STYLING */
.footer-text {
  text-align: center;
  width: 100%;
}

.footer-text h4 { 
  color: white; 
  margin: 0; 
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-text p { 
  color: #aaa; 
  margin: 0; 
  font-size: 0.85rem; 
  font-weight: 400;
}

.card-bg {
  width: 100%;
  aspect-ratio: 3 / 2;    /* Exact match for 1536 x 1024 */
  height: auto;           
  display: block;
  object-fit: cover;      /* Ensures the AI art fills the space perfectly */
  transition: transform 0.8s ease;
}

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

.live-status-container {
  position: absolute;
  top: 1px;
  left: 1px;
  z-index: 5;
}

.se-widget {
  border: none;
  width: 180px;
  height: 50px;
  background: transparent;
}

.twitch-border {
  border-color: rgba(145, 70, 255, 0.4);
}

.twitch-border:hover { 
  border-color: var(--twitch); 
  box-shadow: 0 0 40px rgba(145, 70, 255, 0.3), 0 15px 50px rgba(0,0,0,0.9); 
}

/* --- YOUTUBE SPECIFIC --- */
.youtube-border {
  border-color: rgba(255, 0, 0, 0.4);
}

/* THE FIX: Specifically targeting the YouTube card to close the gap */
.youtube-border .card-bg {
  margin-bottom: -1px; /* Pulls the footer up to hide any iframe ghost pixels */
}

.youtube-border .card-footer {
  /* You can even change the YouTube footer background color here if you want */
  background: rgba(10, 0, 0, 0.85); 
}

.youtube-border:hover { 
  border-color: var(--youtube); 
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.3), 0 15px 50px rgba(0,0,0,0.9);
}

/* 9. RESPONSIVENESS: Mobile Logic */
@media (max-width: 768px) {
  .tilt-card-wrapper:hover {
    /* Stop rotation on mobile to prevent 'stutter' while scrolling */
    transform: translateY(-5px); 
  }
  
  .pro-container {
    padding: 30px 15px;
    perspective: none; 
    gap: 20px; /* Tighter gap for small screens */
  }

  .glass-card {
    /* Thicker border on mobile to ensure visibility */
    border-width: 2px;
  }
}