/* Version: 6.0.1 — Full Redesign */

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
  /* Surfaces */
  --tc-bg-primary: #fafafa;
  --tc-bg-secondary: #f1f2f4;
  --tc-bg-card: #ffffff;
  --tc-bg-elevated: #ffffff;
  --tc-bg-glass: rgba(255, 255, 255, 0.72);
  --tc-bg-dark: #111218;
  --tc-bg-dark-card: #1a1c25;

  /* Text */
  --tc-text-primary: #111218;
  --tc-text-secondary: #5a5e6b;
  --tc-text-muted: #8b8f9e;
  --tc-text-inverse: #ffffff;
  --tc-text-dark: #111218;

  /* Accent Palette — warm sunset gradient */
  --tc-primary: #e8553d;
  --tc-primary-soft: rgba(232, 85, 61, 0.10);
  --tc-primary-medium: rgba(232, 85, 61, 0.20);
  --tc-accent: #d9304a;
  --tc-gradient: linear-gradient(135deg, #e8553d 0%, #d9304a 100%);
  --tc-gradient-hover: linear-gradient(135deg, #d9304a 0%, #e8553d 100%);

  /* Semantic */
  --tc-success: #22c55e;
  --tc-warning: #f59e0b;
  --tc-danger: #ef4444;
  --tc-info: #3b82f6;
  --tc-special: #f59e0b;

  /* Borders & Shadows */
  --tc-border-color: rgba(0, 0, 0, 0.07);
  --tc-border-strong: rgba(0, 0, 0, 0.12);
  --tc-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --tc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --tc-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --tc-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --tc-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.14);
  --tc-shadow-glow: 0 0 0 4px rgba(232, 85, 61, 0.15);

  /* Radii */
  --tc-radius-xs: 6px;
  --tc-radius-sm: 10px;
  --tc-radius-md: 16px;
  --tc-radius-lg: 24px;
  --tc-radius-xl: 32px;
  --tc-radius-full: 9999px;

  /* Spacing */
  --tc-gap: 1.5rem;
  --tc-padding: 1.25rem;
  --tc-padding-sm: 0.75rem;

  /* Transitions */
  --tc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tc-transition: 0.25s var(--tc-ease);
  --tc-transition-slow: 0.4s var(--tc-ease);
}


/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: none;
}


/* ═══════════════════════════════════════════
   DEBUG PANEL
   ═══════════════════════════════════════════ */
.geo-debug {
  background: #1e2030;
  color: #c8cad8 !important;
  padding: 1rem 1.25rem;
  border-radius: var(--tc-radius-sm);
  margin-top: 1.5rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.geo-debug summary {
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #e2e4f0;
}

.debug-content {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}


/* ═══════════════════════════════════════════
   MATCHES SECTION
   ═══════════════════════════════════════════ */
.matches h2 {
  text-align: center;
  padding: 1.5rem 1rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--tc-text-primary);
}

.matches-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--tc-gap);
  max-width: 100%;
  margin: 0 auto;
}

/* ── Match Card ── */
.match-card {
  width: 100%;
  background: var(--tc-bg-card);
  border: 1px solid var(--tc-border-color);
  border-radius: var(--tc-radius-lg);
  padding: var(--tc-padding);
  box-shadow: var(--tc-shadow-sm);
  transition:
    transform var(--tc-transition),
    box-shadow var(--tc-transition),
    border-color var(--tc-transition);
  display: flex;
  flex-direction: column;
}

.match-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tc-shadow-lg);
  border-color: var(--tc-border-strong);
}

.match-card p {
  margin: 0.4rem 0;
  font-size: 0.72rem;
  text-align: center;
  color: var(--tc-text-muted);
}

.match-date {
  text-align: center;
  color: var(--tc-text-secondary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.match-league {
  text-align: center;
  font-style: normal;
  color: var(--tc-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  margin-bottom: 12px;
}

/* ── Teams Row ── */
.teams {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin: 14px 0;
}

.team {
  max-width: 110px;
  width: 100%;
  text-align: center;
}

.team img {
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  background: transparent !important;
  transition: transform var(--tc-transition);
}

.match-card:hover .team img {
  transform: scale(1.06);
}

.team span {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--tc-text-primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 42px;
  line-height: 1.4;
}

.vs {
  font-size: 16px;
  font-weight: 800;
  color: var(--tc-text-muted);
  letter-spacing: 0.05em;
}

/* ── Match Result ── */
.match-result {
  background: var(--tc-bg-secondary);
  border: 1px solid var(--tc-border-color);
  border-radius: var(--tc-radius-sm);
  padding: 10px 14px;
  text-align: center;
  margin: 12px 0;
}

.match-result strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--tc-text-primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* ── Odds ── */
.match-odds {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  padding: 6px 0;
}

.match-odds span {
  color: var(--tc-text-primary);
  padding: 8px 14px;
  border-radius: var(--tc-radius-xs);
  font-weight: 700;
  font-size: 14px;
  min-width: 52px;
  text-align: center;
  background: var(--tc-bg-secondary);
  border: 1px solid var(--tc-border-color);
  transition:
    transform var(--tc-transition),
    box-shadow var(--tc-transition),
    background var(--tc-transition);
  position: relative;
  overflow: hidden;
}

.match-odds span:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-md);
  background: var(--tc-bg-elevated);
}

.match-odds span::after {
  content: attr(data-type);
  display: block;
  font-size: 10px;
  opacity: 0.6;
  margin-top: 3px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--tc-text-muted);
}

.match-odds span:nth-child(1):hover {
  border-color: var(--tc-primary);
  box-shadow: 0 2px 12px rgba(232, 85, 61, 0.15);
}

.match-odds span:nth-child(2):hover {
  border-color: var(--tc-text-muted);
}

.match-odds span:nth-child(3):hover {
  border-color: var(--tc-info);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.15);
}

/* ── Visit Button ── */
.visit-btn {
  display: block;
  background: var(--tc-gradient);
  color: var(--tc-text-inverse) !important;
  text-decoration: none !important;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 12px 20px;
  text-align: center;
  border-radius: var(--tc-radius-full);
  transition:
    transform var(--tc-transition),
    box-shadow var(--tc-transition);
  margin-top: auto;
}

.visit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 85, 61, 0.3);
  color: var(--tc-text-inverse) !important;
}


/* ═══════════════════════════════════════════
   BRAND LIST
   ═══════════════════════════════════════════ */
.tc-brand-list {
  display: flex;
  flex-direction: column;
  /* gap: 1rem; */
  margin: 2rem auto;
}

/* ── Brand Card ── */
.tc-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  align-items: center;
  background: var(--tc-bg-card);
  padding: 1.25rem;
  border-radius: var(--tc-radius-lg);
  color: var(--tc-text-primary);
  border: 1px solid var(--tc-border-color);
  box-shadow: var(--tc-shadow-sm);
  transition:
    transform var(--tc-transition),
    box-shadow var(--tc-transition),
    border-color var(--tc-transition);
}

.tc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-md);
  border-color: var(--tc-border-strong);
}

/* ── #1 Rank Highlight ── */
.tc-card[data-rank="1"] {
  border: 2px solid var(--tc-special);
  background: linear-gradient(160deg, #fffdf5 0%, #fff8e1 40%, #ffffff 100%);
  box-shadow:
    var(--tc-shadow-md),
    0 0 0 1px rgba(245, 158, 11, 0.12),
    0 8px 30px rgba(245, 158, 11, 0.10);
}

.tc-card[data-rank="1"] .tc-rank {
  background: var(--tc-gradient);
  width: 42px;
  height: 42px;
  font-size: 22px;
  top: -14px;
  left: -14px;
  box-shadow: 0 4px 14px rgba(232, 85, 61, 0.35);
}

.tc-card[data-rank="1"] .tc-info-bottom {
  display: flex;
}

.tc-card[data-rank="1"] .tc-btn.visit {
  background: var(--tc-gradient);
  color: var(--tc-text-inverse) !important;
  font-weight: 700;
  text-decoration: none;
}

/* ── Rank Badge ── */
.tc-rank {
  width: 34px;
  height: 34px;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: -10px;
  left: -12px;
  font-weight: 800;
  color: var(--tc-text-inverse);
  background: var(--tc-accent);
  font-size: 18px;
  border-radius: var(--tc-radius-full);
  line-height: 1;
  box-shadow: var(--tc-shadow-sm);
  transition: transform var(--tc-transition);
}

.tc-card:hover .tc-rank {
  transform: scale(1.08);
}

/* ── Logo ── */
.tc-logo {
  width: 100px;
  min-width: 100px;
  min-height: 60px;
  max-height: 60px;
  border-radius: var(--tc-radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--tc-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
}

.tc-logo img {
  padding: 0.5rem;
  height: 100% !important;
  width: 100%;
  background: inherit;
  object-fit: contain;
  object-position: center;
  position: absolute;
  margin: auto;
  box-sizing: border-box;
}

/* ── Info Block ── */
.tc-info {
    display: flex;
    flex-wrap:wrap;
    align-items: center;
    row-gap: 0.5rem;
    column-gap: 2rem;
    flex: 1;
    /* justify-content: space-between; */
}
@media(min-width: 1240px) {
  .tc-info {
    justify-content: space-between;
  }
}
.tc-info button {
  color: var(--tc-text-primary) !important;
  text-decoration: none;
  font-weight: 700 !important;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: none;
  transition: opacity var(--tc-transition);
}

.tc-info button:hover {
  opacity: 0.7;
}

.tc-info .h3 {
  font-size: 1.4rem;
  text-align: left;
  margin-top: 0;
  padding: 0;
  color: var(--tc-text-dark);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tc-info p {
  position: relative;
  padding: 8px 14px;
  background: var(--tc-primary-soft);
  border-radius: var(--tc-radius-full);
  /* font-weight: 600; */
  max-width: max-content;
  min-width: 330px;
  color: var(--tc-primary) !important;
  margin: 8px 0;
  font-size: 0.875rem;
  text-align: center;
  border: 1px solid var(--tc-primary-medium);
}

.tc-info p::before {
  content: '🎁';
  margin-right: 8px;
}

/* ── Rating ── */
.tc-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  text-align: left;
}

.tc-rating img {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

/* ── CTA Buttons ── */
.tc-info-bottom {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tc-btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: var(--tc-radius-full);
  background: var(--tc-gradient);
  color: var(--tc-text-inverse) !important;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none !important;
  letter-spacing: 0.02em;
  transition:
    transform var(--tc-transition),
    box-shadow var(--tc-transition);
  position: relative;
}

.tc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 85, 61, 0.25);
  color: var(--tc-text-inverse) !important;
}

.tc-btn.review {
  background: var(--tc-bg-secondary) !important;
  color: var(--tc-text-primary) !important;
  border: 1px solid var(--tc-border-color) !important;
  text-decoration: none;
}

.tc-btn.review:hover {
  background: var(--tc-bg-elevated) !important;
  border-color: var(--tc-border-strong) !important;
  box-shadow: var(--tc-shadow-sm);
  color: var(--tc-text-primary) !important;
}

/* ── Toggle / Details ── */
.tc-toggle-details {
    display: none;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  color: var(--tc-text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  transition: color var(--tc-transition);
}

.tc-toggle-details:hover {
  color: var(--tc-primary);
}

.tc-details {
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

.tc-details-info-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 24px;
}

.tc-details-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--tc-border-color);
  transition: background var(--tc-transition);
}

.tc-details-info-item:hover {
  background: var(--tc-bg-secondary);
  border-radius: var(--tc-radius-xs);
}

.tc-details-info-name strong {
  color: var(--tc-text-dark) !important;
  font-weight: 600;
  font-size: 0.875rem;
}

.tc-details-info-value {
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: 0.3px;
  font-size: 0.875rem;
  color: var(--tc-text-secondary) !important;
}

.tc-top-title {
  text-align: center;
}


/* ═══════════════════════════════════════════
   FLOATING BANNER
   ═══════════════════════════════════════════ */
.tc-floating-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--tc-bg-dark);
  color: var(--tc-text-inverse);
  padding: 0.75rem 1.25rem;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform var(--tc-transition-slow),
    opacity var(--tc-transition-slow);
  pointer-events: none;
  will-change: transform, opacity;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tc-floating-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.banner-container {
  max-width: 800px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.tc-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tc-banner-content img {
  width: auto;
  max-width: 72px;
  border-radius: var(--tc-radius-xs);
  background: transparent !important;
  margin: auto;
  cursor: pointer;
  transition: transform var(--tc-transition);
}

.tc-banner-content img:hover {
  transform: scale(1.06);
}

.tc-banner-info strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tc-text-inverse);
  cursor: pointer;
  transition: opacity var(--tc-transition);
}

.tc-banner-info strong:hover {
  opacity: 0.8;
}

.tc-banner-info span {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--tc-radius-full);
  color: var(--tc-success);
  font-size: 0.85rem;
  font-weight: 500;
}

.tc-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tc-banner-actions .tc-btn.visit {
  background: var(--tc-gradient);
  border-radius: var(--tc-radius-full);
  padding: 0.55rem 1.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--tc-text-inverse);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.tc-banner-actions .tc-btn.visit:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(232, 85, 61, 0.35);
}

.tc-banner-close {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: var(--tc-radius-full);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  transition:
    transform var(--tc-transition),
    background var(--tc-transition),
    color var(--tc-transition);
}

.tc-banner-close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.14);
  color: var(--tc-text-inverse);
}


/* ═══════════════════════════════════════════
   LAYOUT WRAPPER
   ═══════════════════════════════════════════ */
.brand-wrapper {
  display: flex;
  gap: 2rem;
}

.brand-wrapper .matches {
  max-width: 320px;
  width: 100%;
  order: 2;
}

.brand-wrapper .tc-brand-list {
  order: 1;
}


/* ═══════════════════════════════════════════
   STATES: Loading, Error, Empty
   ═══════════════════════════════════════════ */
.tc-loading {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--tc-text-muted);
}

.tc-loading .tc-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--tc-border-color);
  border-top-color: var(--tc-primary);
  border-radius: 50%;
  animation: tc-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes tc-spin {
  to {
    transform: rotate(360deg);
  }
}

.tc-error {
  text-align: center;
  padding: 2rem;
  color: var(--tc-danger);
}

.tc-error-message {
  text-align: center;
  padding: 1.5rem 2rem;
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--tc-radius-md);
  color: var(--tc-danger);
  font-weight: 500;
}

.tc-retry-btn {
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  background: var(--tc-gradient);
  color: var(--tc-text-inverse);
  border: none;
  border-radius: var(--tc-radius-full);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.875rem;
  transition:
    transform var(--tc-transition),
    box-shadow var(--tc-transition);
}

.tc-retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(232, 85, 61, 0.25);
}

.tc-no-data,
.tc-no-matches {
  text-align: center;
  padding: 2rem;
  color: var(--tc-text-muted);
  font-style: normal;
  font-weight: 500;
}

.tc-owner {
  font-size: 0.75rem;
  color: #373736;
}
.tc-header {
  max-width: 250px;
    width: 100%;
}

  .tc-card:nth-child(2n+1) {
    background-color: #f5f5f5;
  }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 800px) {
  .banner-container {
    justify-content: center;
  }
  .tc-rating { 
    width: 100%;
  }
}

@media (max-width: 768px) {
  .tc-header{
    width: 100%;
    max-width: 100%;
  }
  .tc-details-info-items {
    display: block;
  }

  .tc-info .h3 {
    text-align: center;
  }

  .tc-card {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .tc-info {
    padding: 0;
    text-align: center;
    justify-content: center;
  }

  .tc-info p {
    margin: 8px auto;
    text-align: center;
  }

  .tc-rating {
    text-align: center;
    justify-content: center;
  }

  .matches-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .tc-floating-banner {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .tc-info-bottom {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .tc-info p {
    min-width: auto;
  }

  .tc-rank+button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 1rem auto;
  }

  .tc-btn.visit {
    width: 100%;
    text-align: center;
    margin: 1rem auto;
  }

  .match-odds {
    gap: 6px;
  }

  .match-odds span {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 44px;
  }

  .teams {
    gap: 16px;
  }

  .team span {
    font-size: 13px;
  }
}
