/* ============================================================
   fancode.css - FanCode Section Styles
   ============================================================ */

.fancode-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(0.6rem, 1.5vw, 1.2rem) 0 clamp(1rem, 3vw, 2rem);
  position: relative;
  background: #0b0d0f;
}

/* ---- HEADER ---- */
.fancode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(0.7rem, 1.8vw, 1.4rem);
  padding: 0 clamp(1rem, 5vw, 3rem);
}

.fancode-title {
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.6vw, 0.6rem);
  color: #ffffff;
}

.fancode-title small {
  font-size: clamp(0.6rem, 0.8vw, 0.8rem);
  font-weight: 400;
  opacity: 0.5;
  margin-left: clamp(0.1rem, 0.3vw, 0.3rem);
}

.fancode-badge {
  background: rgba(255,255,255,0.05);
  padding: clamp(0.2rem, 0.4vw, 0.4rem) clamp(0.6rem, 1vw, 1rem);
  border-radius: 30px;
  font-size: clamp(0.6rem, 0.7vw, 0.75rem);
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ---- CAROUSEL WRAPPER ---- */
.fancode-carousel-wrapper {
  position: relative;
  width: 100%;
  padding: 0;
}

.fancode-track {
  display: flex;
  gap: clamp(0.8rem, 1.8vw, 1.6rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: clamp(0.2rem, 0.4vw, 0.4rem) clamp(1rem, 5vw, 3rem) clamp(0.5rem, 1vw, 0.8rem);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.fancode-track::-webkit-scrollbar { display: none; }

/* ---- CARD - EXACT SAME SIZE AS HIGHLIGHTS/WILLOW ---- */
.fancode-card {
  flex: 0 0 auto;
  width: clamp(260px, 34vw, 480px);
  background: #111214;
  border-radius: clamp(8px, 1vw, 14px);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
  box-shadow: 0 clamp(4px, 0.8vw, 10px) clamp(15px, 2.5vw, 30px) rgba(0,0,0,0.45);
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
}

.fancode-card:hover {
  transform: scale(1.045);
  box-shadow: 0 clamp(8px, 1.2vw, 16px) clamp(25px, 4vw, 50px) rgba(0,0,0,0.7);
  border-color: rgba(255,255,255,0.08);
  z-index: 5;
}

.fancode-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1c1e;
  overflow: hidden;
}

.fancode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.fancode-card:hover .fancode-thumb img {
  transform: scale(1.08);
}

/* ---- CATEGORY TAG - FIXED: No black background ---- */
.fancode-category-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #ffffff;
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
  font-size: clamp(0.5rem, 0.7vw, 0.78rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.8);
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
}

/* ---- LIVE BADGE ---- */
.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 0, 0, 0.85);
  color: #fff;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 3;
  animation: pulse-live 1.5s ease-in-out infinite;
}

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

/* ---- CARD INFO ---- */
.fancode-info {
  padding: clamp(0.5rem, 1.1vw, 0.9rem) clamp(0.6rem, 1vw, 1rem) clamp(0.7rem, 1.2vw, 1rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.2rem, 0.4vw, 0.5rem);
  background: #111214;
}

.fancode-tournament {
  font-size: clamp(0.6rem, 0.9vw, 0.78rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f5c518;
  font-weight: 700;
  margin-bottom: clamp(0.1rem, 0.2vw, 0.2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fancode-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.3rem, 0.6vw, 0.8rem);
  padding: clamp(0.1rem, 0.2vw, 0.2rem) 0;
}

.fancode-team {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.5vw, 0.6rem);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.2vw, 1.15rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(120px, 18vw, 200px);
  color: rgba(255,255,255,0.9);
}

.fancode-team img {
  width: clamp(28px, 3vw, 38px);
  height: clamp(28px, 3vw, 38px);
  border-radius: 50%;
  object-fit: contain;
  background: #1e1f22;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.fancode-team span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fancode-vs {
  color: rgba(255,255,255,0.15);
  font-weight: 600;
  font-size: clamp(0.7rem, 0.9vw, 1rem);
  padding: 0 clamp(0.1rem, 0.2vw, 0.3rem);
  letter-spacing: 0.05em;
}

/* ---- META DATA ---- */
.fancode-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(0.2rem, 0.3vw, 0.4rem);
  padding-top: clamp(0.3rem, 0.5vw, 0.6rem);
  border-top: 1px solid rgba(255,255,255,0.06);
  gap: clamp(0.3rem, 0.5vw, 0.8rem);
}

.fancode-meta-left {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.5vw, 0.7rem);
}

/* ---- STATUS BADGE ---- */
.fancode-status {
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(0.55rem, 0.7vw, 0.78rem);
  letter-spacing: 0.06em;
  padding: clamp(0.15rem, 0.25vw, 0.3rem) clamp(0.5rem, 0.7vw, 0.9rem);
  border-radius: clamp(10px, 1.2vw, 16px);
  flex-shrink: 0;
}

.fancode-status.live {
  background: rgba(255, 0, 0, 0.15);
  color: #ff4444;
  border: 1px solid rgba(255, 0, 0, 0.2);
  animation: pulse-live 1.5s ease-in-out infinite;
}

.fancode-status.upcoming {
  background: rgba(245, 197, 24, 0.12);
  color: #f5c518;
  border: 1px solid rgba(245, 197, 24, 0.12);
}

.fancode-status.ended {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.05);
}

/* ---- TIME ---- */
.fancode-time {
  font-size: clamp(0.6rem, 0.8vw, 0.85rem);
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  white-space: nowrap;
}

.fancode-time i {
  font-style: normal;
  margin-right: clamp(0.15rem, 0.2vw, 0.3rem);
}

/* ---- STREAM INDICATOR ---- */
.stream-indicator {
  font-size: 0.5rem;
  text-align: right;
  margin-top: 0.2rem;
  letter-spacing: 0.03em;
}

.stream-indicator.available {
  color: rgba(0, 255, 100, 0.5);
}

.stream-indicator.unavailable {
  color: rgba(255, 0, 0, 0.2);
}

/* ---- FANCODE SKELETON ---- */
.fc-skeleton-card {
  flex: 0 0 auto;
  width: clamp(260px, 34vw, 480px);
  background: #14161a;
  border-radius: clamp(8px, 1vw, 14px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.02);
}

.fc-skeleton-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(90deg, #1a1c1e 25%, #23262c 50%, #1a1c1e 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.5s ease-in-out infinite;
}

.fc-skeleton-info {
  padding: clamp(0.5rem, 1.1vw, 0.9rem) clamp(0.6rem, 1vw, 1rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 0.6vw, 0.7rem);
  background: #14161a;
}

.fc-skeleton-line {
  height: clamp(12px, 1vw, 16px);
  border-radius: 4px;
  background: linear-gradient(90deg, #1a1c1e 25%, #23262c 50%, #1a1c1e 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.5s ease-in-out infinite;
}

.fc-skeleton-line.short { width: 35%; }
.fc-skeleton-line.medium { width: 60%; }
.fc-skeleton-line.long { width: 80%; }

.fc-skeleton-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.3rem, 0.5vw, 0.6rem);
  margin-top: clamp(0.1rem, 0.2vw, 0.2rem);
}

.fc-skeleton-team-block {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 0.5vw, 0.6rem);
  flex: 1;
}

.fc-skeleton-flag {
  width: clamp(28px, 3vw, 38px);
  height: clamp(28px, 3vw, 38px);
  border-radius: 50%;
  background: linear-gradient(90deg, #1a1c1e 25%, #23262c 50%, #1a1c1e 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.fc-skeleton-name {
  height: clamp(12px, 1vw, 16px);
  border-radius: 4px;
  flex: 1;
  background: linear-gradient(90deg, #1a1c1e 25%, #23262c 50%, #1a1c1e 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.5s ease-in-out infinite;
}

.fc-skeleton-vs {
  color: rgba(255,255,255,0.05);
  font-size: clamp(0.5rem, 0.7vw, 0.8rem);
  padding: 0 clamp(0.1rem, 0.2vw, 0.2rem);
}

.fc-skeleton-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(0.2rem, 0.3vw, 0.4rem);
  padding-top: clamp(0.3rem, 0.5vw, 0.6rem);
  border-top: 1px solid rgba(255,255,255,0.03);
}

.fc-skeleton-meta-left {
  display: flex;
  gap: clamp(0.3rem, 0.5vw, 0.7rem);
}

.fc-skeleton-badge {
  height: clamp(20px, 1.8vw, 26px);
  width: clamp(55px, 7vw, 75px);
  border-radius: clamp(10px, 1.2vw, 16px);
  background: linear-gradient(90deg, #1a1c1e 25%, #23262c 50%, #1a1c1e 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.5s ease-in-out infinite;
}

.fc-skeleton-time {
  height: clamp(14px, 1.2vw, 18px);
  width: clamp(65px, 8vw, 85px);
  border-radius: 4px;
  background: linear-gradient(90deg, #1a1c1e 25%, #23262c 50%, #1a1c1e 75%);
  background-size: 200% 100%;
  animation: fc-shimmer 1.5s ease-in-out infinite;
}

@keyframes fc-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- CAROUSEL ARROWS ---- */
.fancode-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: clamp(30px, 3.5vw, 46px);
  height: clamp(30px, 3.5vw, 46px);
  border-radius: 50%;
  background: rgba(11,13,15,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 1.5vw, 1.2rem);
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  user-select: none;
}

.fancode-arrow:hover {
  background: rgba(11,13,15,0.95);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.08);
}

.fancode-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.fancode-arrow.arrow-left { left: clamp(0.2rem, 1.2vw, 0.8rem); }
.fancode-arrow.arrow-right { right: clamp(0.2rem, 1.2vw, 0.8rem); }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .fancode-arrow {
    width: clamp(26px, 8vw, 34px);
    height: clamp(26px, 8vw, 34px);
    font-size: clamp(0.7rem, 3vw, 0.9rem);
  }

  .fancode-title {
    font-size: clamp(0.95rem, 4vw, 1.2rem);
  }

  .fancode-header {
    padding: 0 clamp(0.5rem, 3vw, 1rem);
  }

  .fancode-track {
    padding: clamp(0.15rem, 0.3vw, 0.3rem) clamp(0.5rem, 3vw, 1rem) clamp(0.4rem, 0.8vw, 0.6rem);
  }

  .fancode-team {
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    max-width: clamp(80px, 18vw, 100px);
  }

  .fancode-team img {
    width: clamp(20px, 3.5vw, 26px);
    height: clamp(20px, 3.5vw, 26px);
  }

  /* Fix category tag on mobile */
  .fancode-category-tag {
    font-size: 0.45rem;
    padding: 0.1rem 0.5rem;
    bottom: 6px;
    left: 6px;
  }

  .live-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.4rem;
    top: 6px;
    right: 6px;
  }
}

/* ---- FIX: No black background on category tag - Additional selector for safety ---- */
.fancode-thumb .fancode-category-tag {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}
