
/* ============================================
   GOALTIPS — PREMIUM SPORTS PREDICTIONS UI
   ============================================ */

/* Uses the global variables from your main CSS */

:root {
  --gt-blue: #3B82F6;
  --gt-blue-light: #60A5FA;
  --gt-purple: #8B5CF6;
  --gt-cyan: #22D3EE;
  --gt-green: #10B981;
  --gt-gold: #FBBF24;

  --gt-blue-glow: rgba(59, 130, 246, 0.20);
  --gt-purple-glow: rgba(139, 92, 246, 0.16);
  --gt-green-glow: rgba(16, 185, 129, 0.13);

  --gt-panel:
    linear-gradient(
      145deg,
      rgba(20, 35, 63, 0.96),
      rgba(12, 22, 43, 0.98)
    );

  --gt-border: rgba(148, 163, 184, 0.16);
  --gt-border-active: rgba(96, 165, 250, 0.65);

  --gt-card-shadow:
    0 12px 30px rgba(0, 0, 0, 0.20);

  --gt-card-hover-shadow:
    0 20px 42px rgba(0, 0, 0, 0.30),
    0 0 24px rgba(59, 130, 246, 0.10);
}


/* ============================================
   FILTERS
   ============================================ */

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;

  padding: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(17, 28, 50, 0.88),
      rgba(12, 22, 43, 0.92)
    );

  border: 1px solid var(--gt-border);
  border-radius: var(--radius);

  box-shadow: var(--gt-card-shadow);
}

.filters select {
  min-width: 145px;
  max-width: 100%;

  padding: 11px 38px 11px 14px;

  appearance: none;
  -webkit-appearance: none;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  color: var(--text);
  background-color: var(--bg-2);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2360A5FA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px;

  border: 1px solid var(--gt-border);
  border-radius: var(--radius-sm);

  outline: none;
  cursor: pointer;

  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.filters select:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background-color: var(--surface-2);
}

.filters select:focus-visible {
  border-color: var(--gt-blue-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filters select option {
  color: var(--text);
  background: var(--bg-2);
}


/* ============================================
   PREDICTION CARDS
   ============================================ */

.pcard {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  gap: 16px;

  min-width: 0;
  padding: 22px;

  background: var(--gt-panel);
  border: 1px solid var(--gt-border);
  border-radius: var(--radius);

  box-shadow: var(--gt-card-shadow);

  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

/* Soft ambient light in each card */

.pcard::before {
  content: "";
  position: absolute;
  z-index: -1;

  top: -100px;
  right: -90px;

  width: 190px;
  height: 190px;

  border-radius: 50%;
  background: rgba(59, 130, 246, 0.10);
  filter: blur(45px);

  pointer-events: none;

  transition:
    transform 0.35s ease,
    background 0.35s ease;
}

.pcard:hover {
  transform: translateY(-5px);

  border-color: var(--gt-border-active);

  box-shadow: var(--gt-card-hover-shadow);
}

.pcard:hover::before {
  transform: scale(1.35);
  background: rgba(139, 92, 246, 0.16);
}


/* ============================================
   CARD HEADER
   ============================================ */

.pcard__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;

  font-size: 12px;
  color: var(--muted);
}

.pcard__top > :last-child {
  text-align: right;
}

.pcard__top time {
  color: var(--muted-light);
  font-weight: 500;
}


/* ============================================
   FREE AND PREMIUM BADGES
   ============================================ */

.pcard__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  width: fit-content;
  max-width: 100%;

  padding: 5px 10px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;

  white-space: nowrap;
}

.pcard__tag--free {
  color: #6EE7B7;

  background:
    linear-gradient(
      135deg,
      rgba(16, 185, 129, 0.18),
      rgba(5, 150, 105, 0.08)
    );

  border: 1px solid rgba(52, 211, 153, 0.38);

  box-shadow: 0 0 14px rgba(16, 185, 129, 0.06);
}

.pcard__tag--premium {
  color: #BFDBFE;

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.23),
      rgba(139, 92, 246, 0.13)
    );

  border: 1px solid rgba(96, 165, 250, 0.42);

  box-shadow: 0 0 15px rgba(59, 130, 246, 0.10);
}


/* ============================================
   TEAMS AND MATCHUP
   ============================================ */

.pcard__teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  font-size: 15px;
  font-weight: 700;
}

.pcard__teams .team {
  flex: 1;
  min-width: 0;

  text-align: center;
  line-height: 1.5;

  overflow-wrap: anywhere;

  transition: color 0.25s ease;
}

.pcard:hover .pcard__teams .team {
  color: #F8FAFC;
}

.pcard__teams .vs {
  flex-shrink: 0;

  color: var(--gt-blue-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;

  padding: 5px 8px;

  background: rgba(59, 130, 246, 0.09);
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 8px;
}


/* ============================================
   PREDICTION / PICK
   ============================================ */

.pcard__pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;

  padding: 12px 14px;

  color: #93C5FD;
  background:
    linear-gradient(
      110deg,
      rgba(37, 99, 235, 0.17),
      rgba(139, 92, 246, 0.09)
    );

  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: var(--radius-sm);

  font-size: 13px;
  font-weight: 700;
}

.pcard__pick strong {
  color: #DBEAFE;
}

.pcard__pick .odds {
  color: var(--gt-cyan);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}


/* ============================================
   MATCH METADATA
   ============================================ */

.pcard__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;

  color: var(--muted);
  font-size: 12px;
}

.pcard__meta > * {
  min-width: 0;
}

.pcard__meta .league {
  font-weight: 600;
  color: var(--muted-light);
}


/* ============================================
   MATCH PREVIEW
   ============================================ */

.pcard__preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;

  overflow: hidden;

  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;

  margin: 0;
}


/* ============================================
   PREMIUM LOCKED CONTENT
   ============================================ */

.pcard__locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 16px;

  color: #93C5FD;
  background: rgba(59, 130, 246, 0.07);

  border: 1px dashed rgba(96, 165, 250, 0.42);
  border-radius: var(--radius-sm);

  font-size: 12px;
  font-weight: 600;
  text-align: center;

  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.pcard__locked:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.7);
}


/* ============================================
   CONFIDENCE METER
   ============================================ */

.conf {
  position: relative;
  overflow: hidden;

  width: 100%;
  height: 8px;

  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.07);
  border-radius: 999px;
}

.conf__bar {
  position: relative;

  height: 100%;
  width: 0;

  background:
    linear-gradient(
      90deg,
      #3B82F6 0%,
      #6366F1 45%,
      #10B981 100%
    );

  border-radius: inherit;

  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);

  transition: width 0.8s ease;
}


/* ============================================
   MATCH DETAIL PANEL
   ============================================ */

.detail {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding: 30px;

  background:
    radial-gradient(
      ellipse at top right,
      rgba(59, 130, 246, 0.09),
      transparent 40%
    ),
    var(--gt-panel);

  border: 1px solid var(--gt-border);
  border-radius: 22px;

  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.detail h1 {
  margin: 0 0 10px;

  font-size: clamp(23px, 4vw, 30px);
  font-weight: 850;
  line-height: 1.3;
  letter-spacing: -0.8px;
}


/* ============================================
   DETAIL MATCHUP
   ============================================ */

.detail__match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;

  padding: 28px 0;
  margin: 24px 0;

  border-top: 1px solid var(--gt-border);
  border-bottom: 1px solid var(--gt-border);
}

.detail__match .team {
  flex: 1;
  min-width: 0;

  text-align: center;

  font-size: clamp(15px, 2.5vw, 20px);
  font-weight: 800;
  line-height: 1.5;

  overflow-wrap: anywhere;
}

.detail__match .vs {
  flex-shrink: 0;

  padding: 8px 12px;

  color: var(--gt-blue-light);
  background: rgba(59, 130, 246, 0.10);

  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 10px;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}


/* ============================================
   DETAIL INFORMATION ROWS
   ============================================ */

.detail__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;

  padding: 13px 0;

  border-bottom: 1px solid rgba(148, 163, 184, 0.10);

  font-size: 14px;
  line-height: 1.6;
}

.detail__row:last-child {
  border-bottom: none;
}

.detail__row > :last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.detail__label {
  flex-shrink: 0;

  color: var(--muted);
  font-weight: 500;
}


/* ============================================
   MATCH ANALYSIS
   ============================================ */

.detail__analysis {
  white-space: pre-wrap;
  overflow-wrap: anywhere;

  margin-top: 20px;
  padding: 22px;

  color: var(--muted-light);
  background:
    linear-gradient(
      145deg,
      rgba(23, 37, 64, 0.82),
      rgba(13, 21, 40, 0.88)
    );

  border: 1px solid var(--gt-border);
  border-left: 3px solid var(--gt-blue);
  border-radius: var(--radius);

  font-size: 14px;
  line-height: 1.9;
}

.detail__analysis h3 {
  margin-top: 0;
  color: var(--text);
}


/* ============================================
   PREMIUM UPGRADE PANEL
   ============================================ */

.detail__locked {
  position: relative;
  overflow: hidden;

  margin-top: 22px;
  padding: 30px 22px;

  text-align: center;

  background:
    radial-gradient(
      ellipse at top,
      rgba(59, 130, 246, 0.15),
      transparent 75%
    ),
    rgba(11, 18, 32, 0.65);

  border: 1px dashed rgba(96, 165, 250, 0.55);
  border-radius: var(--radius);

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.detail__locked:hover {
  border-color: rgba(167, 139, 250, 0.8);

  box-shadow:
    0 0 30px rgba(59, 130, 246, 0.10);

  background:
    radial-gradient(
      ellipse at top,
      rgba(139, 92, 246, 0.16),
      transparent 75%
    ),
    rgba(11, 18, 32, 0.75);
}

.detail__locked h3 {
  margin: 0 0 12px;

  color: #BFDBFE;
  font-size: 20px;
  font-weight: 800;
}

.detail__locked p {
  max-width: 480px;
  margin: 0 auto 20px;

  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.detail__locked .btn {
  background:
    linear-gradient(
      120deg,
      #2563EB,
      #7C3AED
    );

  color: #fff;

  border: 1px solid rgba(255, 255, 255, 0.13);

  box-shadow:
    0 8px 24px rgba(79, 70, 229, 0.23);
}

.detail__locked .btn:hover {
  box-shadow:
    0 12px 30px rgba(79, 70, 229, 0.38);
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .filters {
    padding: 15px;
    gap: 10px;
  }

  .filters select {
    flex: 1 1 145px;
    min-width: 0;
  }

  .pcard {
    padding: 19px;
    gap: 14px;
  }

  .detail {
    padding: 23px;
    border-radius: 18px;
  }

  .detail__match {
    padding: 22px 0;
    gap: 10px;
  }

  .detail__analysis {
    padding: 18px;
  }

  .detail__locked {
    padding: 25px 18px;
  }
}

@media (max-width: 480px) {
  .filters {
    padding: 12px;
    gap: 9px;
  }

  .filters select {
    flex: 1 1 100%;
    width: 100%;
    padding: 12px;
    padding-right: 38px;
  }

  .pcard {
    padding: 17px;
    gap: 13px;
    border-radius: 15px;
  }

  .pcard__top {
    font-size: 11px;
  }

  .pcard__teams {
    gap: 7px;
    font-size: 13px;
  }

  .pcard__teams .vs {
    padding: 4px 6px;
  }

  .pcard__pick {
    padding: 11px;
    font-size: 12px;
  }

  .pcard__meta {
    font-size: 11px;
  }

  .detail {
    padding: 18px;
    border-radius: 16px;
  }

  .detail__match {
    gap: 7px;
    padding: 20px 0;
    margin: 18px 0;
  }

  .detail__match .vs {
    padding: 6px 8px;
    font-size: 10px;
  }

  .detail__row {
    gap: 12px;
    font-size: 13px;
  }

  .detail__analysis {
    padding: 15px;
    font-size: 13px;
    line-height: 1.8;
  }

  .detail__locked {
    padding: 23px 14px;
  }

  .detail__locked h3 {
    font-size: 18px;
  }

  .detail__locked .btn {
    width: 100%;
  }
}


/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .pcard,
  .pcard::before,
  .filters select,
  .conf__bar,
  .detail__locked {
    transition: none !important;
  }

  .pcard:hover {
    transform: none;
  }
}


/* Public results table */
.results-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  font-size:14px;
}
.results-table thead th{
  background:var(--bg-2);
  color:var(--muted);
  font-weight:600;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  text-align:left;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
}
.results-table tbody td{
  padding:14px;
  border-bottom:1px solid var(--border);
  vertical-align:middle;
}
.results-table tbody tr:last-child td{border-bottom:none}
.results-table tbody tr:hover{background:rgba(59,130,246,.04)}

.results-table .match-cell{font-weight:600;color:var(--text)}
.results-table .muted{color:var(--muted);font-size:12px}
.results-table .score{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-weight:700;
  font-size:15px;
  color:var(--text);
}
.results-table .pick{color:var(--blue-2)}

.result-badge{
  display:inline-block;
  padding:3px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.result-badge--won{
  background:rgba(16,185,129,.12);
  color:var(--green);
  border:1px solid rgba(16,185,129,.35);
}
.result-badge--lost{
  background:rgba(239,68,68,.12);
  color:var(--red);
  border:1px solid rgba(239,68,68,.35);
}
.result-badge--void{
  background:rgba(148,163,184,.12);
  color:var(--muted);
  border:1px solid rgba(148,163,184,.35);
}
.result-badge--pending{
  background:rgba(148,163,184,.08);
  color:var(--muted);
  border:1px solid var(--border);
}

.tier-pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.tier-pill--free{
  background:rgba(16,185,129,.1);
  color:var(--green);
  border:1px solid rgba(16,185,129,.3);
}
.tier-pill--premium{
  background:rgba(59,130,246,.1);
  color:var(--blue-2);
  border:1px solid rgba(59,130,246,.3);
}

/* On phones, stack table rows into cards */
@media(max-width:640px){
  .results-table thead{display:none}
  .results-table,
  .results-table tbody,
  .results-table tr,
  .results-table td{display:block;width:100%}
  .results-table{
    border:none;
    background:transparent;
  }
  .results-table tr{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:14px;
    margin-bottom:12px;
  }
  .results-table td{
    border:none;
    padding:4px 0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
  }
  .results-table td::before{
    content:attr(data-label);
    color:var(--muted);
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.06em;
    font-weight:600;
  }
  .results-table td:first-child{padding-top:0}
  .results-table td:last-child{padding-bottom:0}
}