/*==================================================
        FANCONNACT PREDICTION PAGE
        PART 2.1
==================================================*/

/*==========================
ROOT PAGE
==========================*/

.prediction-page {
  width: 100%;

  padding: 24px;

  background: var(--page-bg);

  color: var(--text);

  min-height: 100vh;
}

/*==========================
GRID
==========================*/

.prediction-layout {
  display: grid;

  grid-template-columns: minmax(0, 1fr) 340px;

  gap: 24px;

  align-items: start;
}

.prediction-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/*==========================
LEFT
==========================*/

.prediction-main {
  display: flex;

  flex-direction: column;

  gap: 24px;

  min-width: 0;
}

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

.prediction-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  flex-wrap: wrap;
}

.prediction-title {
  font-size: 38px;

  font-weight: 800;

  margin: 0;

  color: var(--text);
}

.prediction-subtitle {
  margin-top: 8px;

  font-size: 15px;

  color: var(--text-light);

  line-height: 1.6;
}

/*==========================
HOW TO PLAY
==========================*/

.how-play-btn {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 12px 18px;

  border: none;

  border-radius: 14px;

  background: var(--card-bg);

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

  color: var(--text);

  font-weight: 700;

  cursor: pointer;

  transition: 0.25s;
}

.how-play-btn:hover {
  background: var(--primary);

  color: #fff;

  transform: translateY(-2px);
}

/*==========================
SPORTS FILTER
==========================*/

.sports-filter {
  display: flex;

  gap: 12px;

  overflow-x: auto;

  padding-bottom: 6px;

  scrollbar-width: none;
}

.sports-filter::-webkit-scrollbar {
  display: none;
}

.sport-pill {
  flex: 0 0 auto;

  display: flex;

  align-items: center;

  gap: 8px;

  padding: 11px 18px;

  border-radius: 999px;

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

  background: var(--card-bg);

  color: var(--text);

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  transition: 0.25s;

  white-space: nowrap;
}

.sport-pill:hover {
  border-color: var(--primary);

  transform: translateY(-2px);
}

.sport-pill.active {
  background: var(--primary);

  border-color: var(--primary);

  color: #fff;
}

.default-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  flex-shrink: 0;
}

/*==========================
COMMON CARD
==========================*/

.match-banner,
.stats-card,
.prediction-banner,
.prediction-tabs {
  background: var(--card-bg);

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

  border-radius: 20px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);

  transition: 0.25s;
}

.match-banner:hover,
.stats-card:hover {
  border-color: var(--primary);
}

/*==========================
CONTAINER
=========================*/

.prediction-container {
  display: flex;

  flex-direction: column;

  gap: 20px;
}

/*==========================
MOBILE OVERRIDES
=========================*/

@media (max-width: 768px) {
  .prediction-layout {
    grid-template-columns: 1fr;
  }

  .prediction-sidebar {
    order: -1;
  }

  .prediction-page {
    padding: 14px;
  }

  .prediction-title {
    font-size: clamp(22px, 6vw, 32px) !important;
  }

  .prediction-subtitle {
    font-size: 13px;
  }

  .team-block h2 {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: clamp(16px, 4vw, 22px) !important;
  }

  .match-center {
    min-width: 120px;
  }

  .match-center h2 {
    font-size: clamp(18px, 5vw, 26px);
  }

  .team-score {
    font-size: clamp(20px, 5vw, 28px);
  }

  .team-block img {
    width: 60px;
    height: 60px;
  }

  .tab-btn {
    min-width: 140px;
    height: 44px;
    font-size: 13px;
  }

  .prediction-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .match-info {
    gap: 8px;
  }

  .info-chip {
    font-size: 12px;
    padding: 7px 12px;
  }
}

@media (max-width: 480px) {
  .prediction-page {
    padding: 10px;
  }

  .tab-btn {
    min-width: 120px;
    height: 40px;
    font-size: 12px;
  }

  .team-block img {
    width: 48px;
    height: 48px;
  }

  .team-block:nth-child(1),
  .team-block:nth-child(3) {
    flex-direction: row;
    gap: 10px;
  }

  .sport-pill {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/*==================================================
        MATCH BANNER
==================================================*/

.match-banner {
  display: grid;

  grid-template-columns: 1fr auto 1fr;

  align-items: center;

  gap: 30px;

  padding: 26px;

  background: var(--card-bg);

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

  border-radius: 22px;

  overflow: hidden;
}

/*==========================
TEAM
==========================*/

.team-block {
  display: flex;

  align-items: center;

  gap: 18px;

  min-width: 0;
}

.team-block:first-child {
  justify-content: flex-start;
}

.team-block:last-child {
  justify-content: flex-end;

  text-align: right;
}

.team-block img {
  width: 78px;

  height: 78px;

  border-radius: 50%;

  object-fit: contain;

  background: rgba(255, 255, 255, 0.05);

  padding: 8px;

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

  flex-shrink: 0;
}

.team-logo-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #3F69A8, #2A547E);
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(63,105,168,0.35);
  border: 2px solid rgba(63,105,168,0.3);
}

.team-block h2 {
  margin: 0;

  font-size: 26px;

  font-weight: 800;

  color: var(--text);

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}

.team-block .team-label {
  display: block;

  margin-top: 6px;

  font-size: 13px;

  color: var(--text-light);
}

.team-score-big {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.dark .team-score-big {
  color: #f3f4f6;
}

/*==========================
CENTER
==========================*/

.match-center {
  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 14px;

  min-width: 150px;
}

.match-center h2 {
  margin: 0;

  font-size: 30px;

  font-weight: 900;

  color: var(--text);

  letter-spacing: 2px;
}

/*==========================
LIVE BADGE
==========================*/

.live-badge {
  padding: 8px 20px;

  border-radius: 999px;

  background: #ef4444;

  color: #fff;

  font-size: 13px;

  font-weight: 800;

  letter-spacing: 0.6px;

  animation: livePulse 1.4s infinite;
}

@keyframes livePulse {
  0% {
    transform: scale(0.96);

    opacity: 0.8;
  }

  50% {
    transform: scale(1.05);

    opacity: 1;
  }

  100% {
    transform: scale(0.96);

    opacity: 0.8;
  }
}

/*==========================
MATCH STATUS
==========================*/

.match-status {
  padding: 10px 18px;

  border-radius: 14px;

  background: rgba(34, 197, 94, 0.12);

  color: #22c55e;

  font-size: 14px;

  font-weight: 700;
}

/*==========================
MATCH INFO CHIPS
==========================*/

.match-info {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 12px;

  margin-top: 18px;
}

.info-chip {
  padding: 9px 16px;

  border-radius: 999px;

  background: var(--hover);

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

  font-size: 13px;

  font-weight: 600;

  color: var(--text);
}

/*==========================
TEAM SCORE
==========================*/

.team-score {
  margin-top: 10px;

  font-size: 32px;

  font-weight: 900;

  color: var(--text);
}

/*==========================
MATCH TYPE
==========================*/

.match-type {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 8px 16px;

  border-radius: 999px;

  background: rgba(124, 58, 237, 0.15);

  color: #8b5cf6;

  font-size: 13px;

  font-weight: 700;

  margin-top: 10px;
}

/*==========================
HOVER
==========================*/

.match-banner:hover {
  transform: translateY(-2px);

  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

/*==========================
TABLET
==========================*/

@media (max-width: 992px) {
  .match-banner {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .team-block {
    justify-content: center !important;

    text-align: center !important;
  }

  .match-center {
    order: -1;
  }
}

/*==========================
MOBILE
==========================*/

@media (max-width: 600px) {
  .match-banner {
    padding: 20px;

    gap: 20px;
  }

  .team-block {
    flex-direction: column;

    gap: 10px;
  }

  .team-block img {
    width: 64px;

    height: 64px;
  }

  .team-block h2 {
    font-size: 20px;
  }

  .match-center h2 {
    font-size: 24px;
  }

  .team-score {
    font-size: 24px;
  }

  .live-badge {
    padding: 7px 16px;
  }
}

/*==================================================
            PREDICTION NAVIGATION
==================================================*/

.prediction-tabs {
  display: flex;

  align-items: center;

  gap: 8px;

  padding: 8px;

  background: var(--card-bg);

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

  border-radius: 18px;

  overflow-x: auto;

  overflow-y: hidden;

  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;
}

.prediction-tabs::-webkit-scrollbar {
  display: none;
}

/*==========================
TAB BUTTON
==========================*/

.tab-btn {
  flex: 0 0 auto;

  min-width: 180px;

  height: 52px;

  border: none;

  border-radius: 14px;

  background: transparent;

  color: var(--text-light);

  font-size: 14px;

  font-weight: 700;

  letter-spacing: 0.4px;

  cursor: pointer;

  transition: 0.25s;

  display: flex;

  align-items: center;

  justify-content: center;

  white-space: nowrap;
}

/*==========================
HOVER
==========================*/

.tab-btn:hover {
  background: var(--hover);

  color: var(--text);
}

/*==========================
ACTIVE
==========================*/

.tab-btn.active {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);

  color: #fff;

  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/*==========================
FOCUS
==========================*/

.tab-btn:focus {
  outline: none;
}

/*==========================
CLICK
==========================*/

.tab-btn:active {
  transform: scale(0.97);
}

/*==========================
TABLET
==========================*/

@media (max-width: 992px) {
  .tab-btn {
    min-width: 170px;

    font-size: 13px;

    padding: 0 18px;
  }
}

/*==========================
MOBILE
==========================*/

@media (max-width: 600px) {
  .prediction-tabs {
    padding: 6px;

    gap: 6px;
  }

  .tab-btn {
    min-width: 155px;

    height: 46px;

    font-size: 12px;

    font-weight: 700;
  }
}

/*====================================================
        FANCONNACT PREMIUM PREDICTION CARD
====================================================*/

.prediction-card {
  background: #081221;

  border: 1px solid #1d3252;

  border-radius: 18px;

  padding: 20px;

  margin-bottom: 20px;

  transition: 0.3s;

  overflow: hidden;
}

.prediction-card:hover {
  border-color: #2A547E;

  transform: translateY(-3px);

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

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

.prediction-card-header {
  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  margin-bottom: 16px;
}

.prediction-live {
  display: flex;

  align-items: center;

  gap: 8px;

  font-size: 14px;

  font-weight: 700;

  color: #ff4d4f;
}

.live-dot {
  width: 10px;

  height: 10px;

  background: #ff3b30;

  border-radius: 50%;

  animation: livePulse 1s infinite;
}

.live-dot.completed {
  background: #3F69A8;
  animation: none;
}

@keyframes livePulse {
  0% {
    opacity: 0.5;

    transform: scale(0.9);
  }

  50% {
    opacity: 1;

    transform: scale(1.2);
  }

  100% {
    opacity: 0.5;

    transform: scale(0.9);
  }
}

/*====================================================
TIMER
====================================================*/

.prediction-timer {
  display: flex;

  align-items: flex-start;

  gap: 10px;
}

.prediction-timer i {
  color: #ffffff;

  font-size: 18px;

  margin-top: 3px;
}

.time-value {
  display: block;

  color: #ff5a5f;

  font-size: 26px;

  font-weight: 700;

  line-height: 1;
}

.prediction-timer small {
  color: #b8c1d1;

  font-size: 12px;
}

/*====================================================
QUESTION
====================================================*/

.prediction-question {
  color: #ffffff;

  font-size: 28px;

  font-weight: 700;

  margin: 20px 0;
}

/*====================================================
OPTIONS
====================================================*/

.prediction-options {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 14px;
}

.prediction-option {
  background: #0d1d33;

  border: 1px solid #24406d;

  border-radius: 12px;

  padding: 18px 10px;

  cursor: pointer;

  transition: 0.25s;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;
}

.prediction-option:hover {
  border-color: #4d8bff;

  transform: translateY(-2px);
}

.prediction-option.active {
  background: #11391d;

  border: 2px solid #38d26b;

  box-shadow: 0 0 20px rgba(56, 210, 107, 0.25);
}

.option-title {
  color: #fff;

  font-size: 26px;

  font-weight: 700;
}

.option-percent {
  margin-top: 8px;

  color: #d9e3f1;

  font-size: 18px;

  font-weight: 600;
}

/*====================================================
USER
====================================================*/

.prediction-user {
  margin-top: 18px;

  display: flex;

  justify-content: space-between;

  align-items: center;

  flex-wrap: wrap;

  gap: 15px;
}

.user-left {
  display: flex;

  align-items: center;

  gap: 12px;
}

.user-left img {
  width: 38px;

  height: 38px;

  border-radius: 50%;
}

.user-left span {
  color: #d9e3f1;

  font-size: 16px;
}

.user-left strong {
  color: #34d05c;
}

.prediction-position {
  color: #d9e3f1;

  font-size: 15px;
}

.prediction-position strong {
  color: #ffc94b;
}

/*====================================================
FOOTER
====================================================*/

.prediction-footer {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-top: 18px;

  padding-top: 16px;

  border-top: 1px solid rgba(255, 255, 255, 0.08);

  flex-wrap: wrap;

  gap: 15px;
}

.reward-section {
  display: flex;

  align-items: center;

  gap: 14px;

  flex-wrap: wrap;
}

.reward-section span {
  color: #cfd6e4;

  font-size: 15px;
}

.reward-item {
  padding: 8px 14px;

  border-radius: 20px;

  font-size: 14px;

  font-weight: 700;
}

.reward-item.coins {
  background: rgba(255, 184, 0, 0.12);

  color: #ffcb45;
}

.reward-item.xp {
  background: rgba(124, 92, 255, 0.15);

  color: #9b7bff;
}

.prediction-count {
  text-align: right;
}

.prediction-count strong {
  display: block;

  color: #ffffff;

  font-size: 24px;
}

.prediction-count span {
  color: #aab4c7;

  font-size: 14px;
}

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

@media (max-width: 992px) {
  .prediction-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .prediction-question {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .prediction-options {
    grid-template-columns: 1fr;
  }

  .prediction-question {
    font-size: 20px;
  }

  .prediction-card {
    padding: 16px;
  }

  .prediction-footer {
    flex-direction: column;

    align-items: flex-start;
  }

  .prediction-user {
    flex-direction: column;

    align-items: flex-start;
  }

  .time-value {
    font-size: 20px;
  }
}

/*====================================================
  LIVE SCOREBOARD (in prediction card)
====================================================*/

.match-info-strip {
  background: linear-gradient(135deg, rgba(63,105,168,0.05), rgba(59,130,246,0.05));
  border: 1px solid rgba(63,105,168,0.15);
  border-radius: 14px;
  padding: 14px 16px 12px;
  margin: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dark .match-info-strip {
  background: linear-gradient(135deg, rgba(63,105,168,0.08), rgba(59,130,246,0.06));
  border-color: rgba(63,105,168,0.2);
}

:root:not(.dark) .match-info-strip {
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border-color: #a7f3d0;
}

/* score row */
.live-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.lsb-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
}

.lsb-short {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--prediction-text-light);
}

.lsb-score {
  font-size: 28px;
  font-weight: 900;
  color: var(--prediction-text);
  line-height: 1.2;
}

.lsb-vs {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lsb-vs span {
  font-size: 11px;
  font-weight: 700;
  color: var(--prediction-text-light);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

:root:not(.dark) .lsb-vs span {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

/* extra info */
.lsb-extra {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--prediction-success);
  letter-spacing: 0.5px;
}

/* player stats row */
.lsb-players {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--prediction-text-light);
  padding: 2px 0;
}

.lsb-label {
  background: rgba(124,58,237,0.12);
  color: #8b5cf6;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.dark .lsb-label {
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
}

.lsb-name {
  font-weight: 500;
  color: var(--prediction-text-light);
}

/*====================================================
  OPTION IMAGE
====================================================*/

.option-image {
  display: flex;

  justify-content: center;

  align-items: center;

  margin-bottom: 12px;
}

.option-image img {
  width: 58px;

  height: 58px;

  border-radius: 50%;

  object-fit: cover;

  border: 2px solid rgba(255, 255, 255, 0.12);

  transition: 0.3s;
}

.prediction-option:hover .option-image img {
  transform: scale(1.08);

  border-color: #2A547E;
}

/*====================================================
OPTION CONTENT
====================================================*/

.option-content {
  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 8px;
}

.option-title {
  font-size: 18px;

  font-weight: 700;

  color: #fff;

  text-align: center;

  line-height: 1.4;
}

.option-percent {
  font-size: 16px;

  font-weight: 600;

  color: #c7d2e2;
}

/*====================================================
SELECTED
====================================================*/

.prediction-option.active .option-title {
  color: #ffffff;
}

.prediction-option.active .option-percent {
  color: #90ffb2;
}

.prediction-option.active::after {
  content: "✔";

  position: absolute;

  top: 12px;

  right: 12px;

  width: 26px;

  height: 26px;

  border-radius: 50%;

  background: #16a34a;

  color: #fff;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 13px;

  font-weight: 700;
}

.prediction-option {
  position: relative;

  overflow: hidden;
}

/*====================================================
ANIMATION
====================================================*/

.prediction-option {
  transition:
    transform 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.prediction-option:hover {
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.18);
}

/*=====================================================
        FANCONNACT THEME VARIABLES
=====================================================*/

/*
These variables MUST come from your settings/theme.css.

If they already exist in your project,
DO NOT duplicate them.

These are fallback values.
*/

:root {
  --prediction-bg: var(--card-bg, #081221);

  --prediction-hover: var(--card-hover, #10243d);

  --prediction-border: var(--border-color, #1f3554);

  --prediction-border-active: var(--primary-color, #7c3aed);

  --prediction-text: var(--text-primary, #ffffff);

  --prediction-text-light: var(--text-secondary, #b8c1d1);

  --prediction-success: var(--success-color, #22c55e);

  --prediction-warning: var(--warning-color, #f59e0b);

  --prediction-danger: var(--danger-color, #ef4444);

  --prediction-gold: #ffc533;

  --prediction-purple: #8b5cf6;
}

/*=====================================================
      CARD TRANSITION
=====================================================*/

.prediction-card {
  background: var(--prediction-bg);

  border: 1px solid var(--prediction-border);

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

/*=====================================================
HOVER
=====================================================*/

.prediction-card:hover {
  transform: translateY(-4px);

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

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

/*=====================================================
QUESTION
=====================================================*/

.prediction-question {
  color: var(--prediction-text);

  transition: color 0.3s;
}

/*=====================================================
OPTION CARD
=====================================================*/

.prediction-option {
  background: rgba(255, 255, 255, 0.02);

  border: 1px solid var(--prediction-border);

  color: var(--prediction-text);

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

.prediction-option:hover {
  transform: translateY(-3px);

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

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/*=====================================================
SELECTED
=====================================================*/

.prediction-option.active {
  background: rgba(34, 197, 94, 0.12);

  border: 2px solid var(--prediction-success);
}

/*=====================================================
CHECK ICON
=====================================================*/

.prediction-option.active::after {
  content: "✓";

  position: absolute;

  top: 12px;

  right: 12px;

  width: 26px;

  height: 26px;

  border-radius: 50%;

  display: flex;

  justify-content: center;

  align-items: center;

  background: var(--prediction-success);

  color: #fff;

  font-size: 13px;

  font-weight: 700;
}

/*=====================================================
TITLE
=====================================================*/

.option-title {
  color: var(--prediction-text);
}

/*=====================================================
PERCENT
=====================================================*/

.option-percent {
  color: var(--prediction-text-light);
}

/*=====================================================
ACTIVE TEXT
=====================================================*/

.prediction-option.active .option-percent {
  color: var(--prediction-success);
}

/*=====================================================
LIVE BADGE
=====================================================*/

.prediction-live {
  color: var(--prediction-danger);
}

.live-dot {
  background: var(--prediction-danger);
}

/*=====================================================
TIMER
=====================================================*/

.time-value {
  color: var(--prediction-danger);
}

/*=====================================================
REWARD BADGES
=====================================================*/

.reward-item {
  transition: 0.25s;
}

.reward-item.coins {
  background: rgba(255, 197, 51, 0.1);

  color: var(--prediction-gold);
}

.reward-item.xp {
  background: rgba(139, 92, 246, 0.12);

  color: var(--prediction-purple);
}

.reward-item:hover {
  transform: translateY(-2px);
}

/*=====================================================
TOP POSITION
=====================================================*/

.prediction-position strong {
  color: var(--prediction-gold);
}

/*=====================================================
PLAYER COUNT
=====================================================*/

.prediction-count strong {
  color: var(--prediction-text);
}

.prediction-count span {
  color: var(--prediction-text-light);
}

/*=====================================================
SMOOTH APPEAR
=====================================================*/

.prediction-card {
  animation: predictionFade 0.45s ease;
}

@keyframes predictionFade {
  from {
    opacity: 0;

    transform: translateY(20px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

/*=====================================================
OPTION CLICK
=====================================================*/

.prediction-option:active {
  transform: scale(0.98);
}

/*=====================================================
THEME CHANGE
=====================================================*/

.prediction-card,
.prediction-option,
.reward-item {
  transition:
    background 0.35s,
    color 0.35s,
    border-color 0.35s,
    box-shadow 0.35s;
}

/*====================================================
        FANCONNACT PREMIUM FOOTER
====================================================*/

/*-----------------------------
 USER PREDICTION ROW
------------------------------*/

.prediction-user {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  margin-top: 18px;

  padding-top: 16px;

  flex-wrap: wrap;
}

/*-----------------------------
 LEFT
------------------------------*/

.user-left {
  display: flex;

  align-items: center;

  gap: 12px;
}

.user-left img {
  width: 42px;

  height: 42px;

  border-radius: 50%;

  object-fit: cover;

  border: 2px solid var(--prediction-border);
}

.user-left span {
  color: var(--prediction-text-light);

  font-size: 15px;
}

.user-left strong {
  color: var(--prediction-success);

  font-weight: 700;
}

/*-----------------------------
 TOP PERCENTAGE
------------------------------*/

.prediction-position {
  display: flex;

  align-items: center;

  gap: 8px;

  font-size: 15px;

  color: var(--prediction-text-light);
}

.prediction-position i {
  color: var(--prediction-gold);
}

.prediction-position strong {
  color: var(--prediction-gold);
}

/*====================================================
 DIVIDER
====================================================*/

.prediction-divider {
  width: 100%;

  height: 1px;

  background: rgba(255, 255, 255, 0.08);

  margin: 18px 0;
}

/*====================================================
 FOOTER
====================================================*/

.prediction-footer {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  flex-wrap: wrap;
}

/*====================================================
 REWARD
====================================================*/

.reward-section {
  display: flex;

  align-items: center;

  gap: 16px;

  flex-wrap: wrap;
}

.reward-title {
  color: var(--prediction-text-light);

  font-size: 15px;

  font-weight: 600;
}

/*====================================================
 XP
====================================================*/

.reward-item {
  display: flex;

  align-items: center;

  gap: 8px;

  padding: 9px 16px;

  border-radius: 30px;

  font-size: 14px;

  font-weight: 700;

  transition: 0.3s;
}

.reward-item i {
  font-size: 15px;
}

/* XP */

.reward-item.xp {
  color: #a78bfa;

  background: rgba(124, 58, 237, 0.18);
}

/* Coins */

.reward-item.coins {
  color: #ffc533;

  background: rgba(255, 197, 51, 0.14);
}

/* Hover */

.reward-item:hover {
  transform: translateY(-2px);
}

/*====================================================
 PLAYER COUNT
====================================================*/

.prediction-count {
  display: flex;

  flex-direction: column;

  align-items: flex-end;
}

.prediction-count strong {
  font-size: 34px;

  color: var(--prediction-text);

  line-height: 1;
}

.prediction-count span {
  margin-top: 4px;

  color: var(--prediction-text-light);
}

/*====================================================
 PLAYER ICON
====================================================*/

.prediction-count::before {
  content: "\f0c0";

  font-family: "Font Awesome 6 Free";

  font-weight: 900;

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

  margin-bottom: 8px;
}

/*====================================================
 HOVER EFFECT
====================================================*/

.prediction-count:hover strong {
  color: var(--prediction-border-active);
}

/*====================================================
 REWARD GLOW
====================================================*/

.reward-item.xp:hover {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.25);
}

.reward-item.coins:hover {
  box-shadow: 0 0 20px rgba(255, 197, 51, 0.2);
}

/*====================================================
 MOBILE
====================================================*/

@media (max-width: 768px) {
  .prediction-user {
    flex-direction: column;

    align-items: flex-start;
  }

  .prediction-footer {
    flex-direction: column;

    align-items: flex-start;
  }

  .prediction-count {
    align-items: flex-start;
  }
}

/*====================================================
                YOUR STATS
====================================================*/

.stats-panel {
  width: 100%;

  background: var(--card-bg, #ffffff);

  border-radius: 24px;

  padding: 24px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  border: 1px solid var(--border, #ececec);
}

.dark .stats-panel {
  background: #16191E;
  border-color: #2A2E35;
}

.stats-title {
  font-size: 28px;

  font-weight: 800;

  color: #111827;

  margin-bottom: 20px;

  letter-spacing: 0.5px;
}

.dark .stats-title {
  color: #f3f4f6;
}

/*========================
        LIST (vertical)
=========================*/

.stats-list {
  display: flex;

  flex-direction: column;

  gap: 12px;
}

/*========================
        ITEM
=========================*/

.stats-item {
  background: #ffffff;

  border: 1px solid #e5e7eb;

  border-radius: 16px;

  padding: 20px;

  transition: 0.3s;

  cursor: pointer;

  display: flex;

  align-items: center;

  gap: 16px;
}

.dark .stats-item {
  background: #1a1d23;
  border-color: #2a2e35;
}

.stats-item:hover {
  transform: translateY(-2px);
  border-color: #3F69A8;
  box-shadow: 0 8px 20px rgba(63,105,168,0.1);
}

/*========================
        ICON
=========================*/

.stats-icon {
  width: 48px;

  height: 48px;

  border-radius: 14px;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 20px;

  flex-shrink: 0;
}

.blue {
  background: #E6EDF6;

  color: #2563eb;
}

.dark .blue {
  background: #113a73;
  color: #4ea1ff;
}

.green {
  background: #d1fae5;

  color: #2A547E;
}

.dark .green {
  background: #123d2d;
  color: #39d98a;
}

.yellow {
  background: #fef3c7;

  color: #d97706;
}

.dark .yellow {
  background: #49391a;
  color: #f7b731;
}

.orange {
  background: #ffedd5;

  color: #ea580c;
}

.dark .orange {
  background: #4a2d19;
  color: #ff8c42;
}

.purple {
  background: #ede9fe;

  color: #7c3aed;
}

.dark .purple {
  background: #2d235d;
  color: #8b5cf6;
}

.pink {
  background: #fce7f3;

  color: #db2777;
}

.dark .pink {
  background: #4a2148;
  color: #ff4fa3;
}

/*========================
        TEXT
=========================*/

.stats-content {
  display: flex;

  flex-direction: column;

  gap: 2px;

  min-width: 0;
}

.stats-content span {
  color: #6b7280;

  font-size: 11px;

  font-weight: 600;

  line-height: 1.3;

  text-transform: uppercase;

  letter-spacing: 0.4px;
}

.dark .stats-content span {
  color: #9ca3af;
}

.stats-content h3 {
  color: #111827;

  font-size: 26px;

  font-weight: 800;

  line-height: 1.2;
}

.dark .stats-content h3 {
  color: #f3f4f6;
}

.stats-content small {
  color: #6b7280;

  font-size: 11px;

  font-weight: 500;
}

.dark .stats-content small {
  color: #9ca3af;
}

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

/*====================================================
  LIVE FEED PANEL (sidebar)
====================================================*/

.live-feed-panel {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #ececec);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.dark .live-feed-panel {
  background: #16191E;
  border-color: #2A2E35;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.dark .feed-item {
  border-color: rgba(255,255,255,0.05);
}

.feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feed-item:first-child {
  padding-top: 0;
}

.feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
  margin-top: 4px;
}

.feed-dot.live-feed {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239,68,68,0.5);
}

.feed-dot.live-feed {
  animation: feedPulse 1.5s infinite;
}

@keyframes feedPulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/*=====================================================
        LIGHT MODE OVERRIDES
=====================================================*/
:root:not(.dark) .prediction-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
:root:not(.dark) .prediction-card:hover {
  border-color: #2A547E;
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}
:root:not(.dark) .prediction-question {
  color: #0f172a;
}
:root:not(.dark) .prediction-option {
  background: #f8fafc;
  border-color: #e2e8f0;
}
:root:not(.dark) .prediction-option:hover {
  border-color: #2A547E;
}
:root:not(.dark) .prediction-option.active {
  background: #eff6ff;
  border-color: #2A547E;
}
:root:not(.dark) .prediction-option.active .opt-label {
  color: #1e40af;
}
:root:not(.dark) .opt-label {
  color: #334155;
}
:root:not(.dark) .opt-odds {
  color: #64748b;
}
:root:not(.dark) .live-feed-item {
  background: #ffffff;
  border-color: #e2e8f0;
}
:root:not(.dark) .feed-content p {
  color: #334155;
}
:root:not(.dark) .feed-time {
  color: #94a3b8;
}

@media (max-width: 992px) {
  .prediction-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-panel {
    padding: 18px;
  }

  .stats-title {
    font-size: 24px;
  }

  .stats-item {
    padding: 16px;
  }

  .stats-content h3 {
    font-size: 22px;
  }

  .stats-icon {
    width: 42px;

    height: 42px;

    font-size: 18px;
  }
}


/* FINAL LOCKED PREDICTION INTERACTION */
.prediction-option{position:relative;min-height:58px;cursor:pointer}
.prediction-option.active{border-color:#2A547E!important;background:rgba(59,130,246,.12)!important}
.prediction-selected-check{position:absolute;top:8px;right:8px;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#3F69A8;color:#fff;font-size:12px;font-weight:900}
.prediction-submit-wrap{display:flex;justify-content:flex-end;margin-top:14px}
.prediction-submit-btn{border:0;border-radius:10px;padding:9px 15px;min-height:36px;background:#3F69A8;color:#04130d;font-size:12px;line-height:1;font-weight:800;cursor:pointer;box-shadow:0 7px 18px rgba(63,105,168,.2);transition:.18s}
.prediction-submit-btn:hover{background:#5A87C8;transform:translateY(-1px)}
.prediction-result-line{margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(63,105,168,.10);border:1px solid rgba(63,105,168,.22);color:#3F69A8;font-size:13px}
.prediction-my-pick{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:10px;padding:10px 12px;border-radius:10px;background:rgba(59,130,246,.08);border:1px solid rgba(59,130,246,.18);color:#64748b;font-size:13px}
.dark .prediction-my-pick{color:#cbd5e1}
.prediction-result-badge{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;font-size:10px;font-weight:900}
.prediction-result-badge.won{color:#065f46;background:#a7f3d0}.prediction-result-badge.lost{color:#991b1b;background:#fecaca}
.prediction-reward-earned{color:#2A547E;font-weight:800}
.prediction-confirm-modal{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:18px}.prediction-confirm-modal.is-open{display:flex}
.prediction-confirm-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.62);backdrop-filter:blur(4px)}
.prediction-confirm-dialog{position:relative;width:min(360px,100%);padding:22px;border-radius:18px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 24px 70px rgba(0,0,0,.28);text-align:center}
.dark .prediction-confirm-dialog{background:#16191e;border-color:#2a2e35;color:#fff}.prediction-confirm-icon{width:42px;height:42px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:rgba(63,105,168,.12);color:#3F69A8;font-size:20px;font-weight:900}.prediction-confirm-dialog h3{margin:0;font-size:18px;font-weight:800}.prediction-confirm-dialog p{margin:8px 0 18px;color:#64748b;font-size:13px;line-height:1.5}.dark .prediction-confirm-dialog p{color:#94a3b8}.prediction-confirm-actions{display:flex;gap:9px}.prediction-confirm-actions button{flex:1;min-height:38px;border-radius:10px;font-size:12px;font-weight:800;cursor:pointer}.prediction-confirm-cancel{border:1px solid #cbd5e1;background:transparent;color:#475569}.dark .prediction-confirm-cancel{border-color:#374151;color:#cbd5e1}.prediction-confirm-submit{border:0;background:#3F69A8;color:#04130d}
@media(max-width:600px){.prediction-options{grid-template-columns:1fr!important}.prediction-submit-wrap{justify-content:stretch}.prediction-submit-btn{width:100%}.prediction-confirm-dialog{padding:20px 16px}}

/* ==========================================================
   FANCONNACT UI SAFE RESPONSIVE PATCH
   UI-only: keeps existing HTML/JS structure and prediction logic intact.
   Fixes compact desktop + mobile match hero + long team names + cards.
   ========================================================== */

/* Never let a grid/flex child force the prediction column wider than its viewport. */
.prediction-page,
.prediction-layout,
.prediction-main,
.prediction-sidebar,
.match-banner,
.prediction-card,
.prediction-card-header {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Team names are allowed to wrap instead of colliding with VS. */
.team-block > div:last-child {
  min-width: 0;
  flex: 1 1 auto;
}

.team-block h2 {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.15;
  max-width: 100%;
}

/* The center VS section must never be squeezed by a long team name. */
.match-center {
  min-width: 64px;
  flex-shrink: 0;
}

/* Compact desktop/tablet: when the stats column would squeeze the hero,
   move stats below the main prediction area instead of breaking the hero. */
@media (max-width: 1180px) {
  .prediction-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .prediction-main {
    width: 100%;
    min-width: 0;
  }

  .prediction-sidebar {
    width: 100%;
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .prediction-page {
    padding: 18px;
  }

  .match-banner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 18px;
    padding: 20px;
  }

  .team-block {
    min-width: 0;
  }

  .team-block h2 {
    font-size: clamp(18px, 2.2vw, 24px);
  }

  .prediction-card {
    width: 100%;
  }
}

/* Tablet/phone: keep both teams on the same row with VS in the middle.
   Do NOT use the old one-column hero layout that pushed VS to the top. */
@media (max-width: 768px) {
  .prediction-page {
    padding: 12px;
  }

  .prediction-sidebar {
    order: 2;
    grid-template-columns: 1fr;
  }

  .match-banner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    width: 100%;
  }

  .team-block,
  .team-block:first-child,
  .team-block:last-child {
    min-width: 0;
    width: 100%;
    flex-direction: column;
    justify-content: center !important;
    align-items: center;
    gap: 7px;
    text-align: center !important;
  }

  .team-block > div:last-child {
    width: 100%;
    min-width: 0;
  }

  .team-logo-circle {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }

  .team-block h2 {
    width: 100%;
    font-size: clamp(14px, 4vw, 19px) !important;
    line-height: 1.18;
    text-align: center !important;
  }

  .team-block .team-label {
    font-size: 10px;
    margin-top: 3px;
  }

  .team-score-big {
    font-size: 17px;
    margin-top: 2px;
  }

  .match-center {
    min-width: 48px;
    width: auto;
    gap: 7px;
  }

  .match-center h2 {
    font-size: 18px !important;
    line-height: 1;
    letter-spacing: 1px;
  }

  .live-badge {
    padding: 5px 9px;
    font-size: 10px;
  }

  .match-status {
    padding: 5px 8px;
    font-size: 9px;
    white-space: nowrap;
  }

  .prediction-card {
    padding: 14px;
    border-radius: 16px;
  }

  .prediction-card-header {
    gap: 10px;
    flex-wrap: wrap;
  }

  .prediction-live,
  .prediction-timer {
    min-width: 0;
  }

  .prediction-timer {
    margin-left: auto;
  }

  .prediction-question {
    font-size: clamp(18px, 5vw, 23px) !important;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .prediction-options {
    grid-template-columns: 1fr !important;
    min-width: 0;
  }

  .prediction-option {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 10px;
  }

  .option-content,
  .option-title {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .option-title {
    font-size: 16px;
    line-height: 1.25;
  }

  .prediction-footer {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .prediction-page {
    padding: 8px;
  }

  .match-banner {
    gap: 5px;
    padding: 12px 7px;
    border-radius: 18px;
  }

  .team-logo-circle {
    width: 46px;
    height: 46px;
    font-size: 16px;
  }

  .team-block h2 {
    font-size: 13px !important;
    line-height: 1.15;
  }

  .team-block .team-label {
    font-size: 9px;
  }

  .team-score-big {
    font-size: 15px;
  }

  .match-center {
    min-width: 42px;
    gap: 6px;
  }

  .match-center h2 {
    font-size: 16px !important;
  }

  .live-badge {
    padding: 4px 7px;
    font-size: 9px;
  }

  .match-status {
    padding: 4px 6px;
    font-size: 8px;
  }

  .prediction-card {
    padding: 12px;
  }

  .prediction-card-header {
    align-items: center;
  }

  .prediction-timer {
    margin-left: 0;
  }

  .time-value {
    font-size: 18px;
  }
}

/* Prevent any horizontal page drift caused by long real team/question names. */
.prediction-main,
.prediction-page,
.prediction-container,
.prediction-card {
  overflow-x: hidden;
}


/* ==========================================================
   FINAL MATCH HERO ALIGNMENT PATCH
   UI ONLY — no HTML/JS/prediction logic changes.
   Fixes:
   1) VS must stay between both teams on mobile/tablet.
   2) Right-side team name must not be pushed to the far edge.
   3) Long team names stay inside their own column.
   ========================================================== */

/* Desktop: keep the two team groups visually closer to the center. */
.match-banner {
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  column-gap: 12px;
}

.match-banner > .team-block {
  min-width: 0;
  max-width: 100%;
}

.match-banner > .team-block:first-child {
  justify-content: flex-end;
  text-align: right;
}

.match-banner > .team-block:last-child {
  justify-content: flex-start !important;
  text-align: left !important;
}

/* Never allow a long team name to push the center VS away. */
.match-banner .team-block > div:last-child {
  min-width: 0;
  max-width: min(100%, 360px);
}

.match-banner .team-block h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* IMPORTANT: an older @media rule set order:-1.
   Override it so VS remains in the middle. */
.match-banner .match-center {
  order: 0 !important;
  min-width: 64px;
  width: 100%;
  flex-shrink: 0;
}

/* Compact desktop/tablet */
@media (max-width: 1180px) {
  .match-banner {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    column-gap: 8px;
  }

  .match-banner > .team-block:first-child {
    justify-content: flex-end !important;
    text-align: right !important;
  }

  .match-banner > .team-block:last-child {
    justify-content: flex-start !important;
    text-align: left !important;
  }

  .match-banner .team-block > div:last-child {
    max-width: 100%;
  }
}

/* Phone: three fixed visual zones — TEAM | VS | TEAM */
@media (max-width: 768px) {
  .match-banner {
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr) !important;
    column-gap: 4px !important;
    row-gap: 0 !important;
    padding: 14px 8px !important;
  }

  .match-banner > .team-block,
  .match-banner > .team-block:first-child,
  .match-banner > .team-block:last-child {
    width: 100%;
    min-width: 0;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    flex-direction: column;
  }

  .match-banner .team-block > div:last-child {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .match-banner .team-block h2 {
    width: 100%;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center !important;
  }

  .match-banner .match-center {
    order: 0 !important;
    min-width: 46px !important;
    width: 46px !important;
    justify-self: center;
    align-self: center;
  }
}

/* Very small phones */
@media (max-width: 480px) {
  .match-banner {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) !important;
    column-gap: 3px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .match-banner .match-center {
    min-width: 40px !important;
    width: 40px !important;
  }

  .match-banner .match-center h2 {
    font-size: 16px !important;
  }

  .match-banner .team-block h2 {
    font-size: 13px !important;
    line-height: 1.15;
  }
}
