.tipster-wrapper {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
  color: #0f172a;
}

.tipster-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* space between the two cards */
}

.tipster-card {
  border-radius: 24px;
  padding: 20px 22px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06),
    0 10px 10px rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.tipster-card--overview {
  background: radial-gradient(
      circle at 0 0,
      rgba(59, 130, 246, 0.08),
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(16, 185, 129, 0.06),
      transparent 55%
    ),
    #ffffff;
}

.tipster-card--history {
  background: rgba(255, 255, 255, 0.97);
}

.tipster-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tipster-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.tipster-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.tipster-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tipster-username {
  font-size: 16px;
  letter-spacing: 0.16em;
  font-weight: 700;
  /* text-transform: uppercase; */
}

.tipster-subtitle {
  font-size: 13px;
  color: #6b7280;
}

/* small animated dot next to subtitle (very subtle) */
.tipster-subtitle::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: tipster-pulse 1.8s ease-out infinite;
}

@keyframes tipster-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }

  70% {
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Overview content */
.tipster-section--overview-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

.tipster-overview-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.tipster-overview-topline-label {
/* text-transform: uppercase; */
  letter-spacing: 0.16em;
}

.tipster-overview-topline-value {
  font-size: 12px;
  color: #9ca3af;
}

.tipster-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .tipster-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .tipster-stats-row {
    grid-template-columns: 1fr 1fr;
  }
}

.tipster-pill {
  border-radius: 20px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  border: 1px solid rgba(209, 213, 219, 0.95);
  background: linear-gradient(
    135deg,
    rgba(248, 250, 252, 1),
    rgba(255, 255, 255, 1)
  );
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out,
    border-color 0.16s ease-out, background 0.16s ease-out;
  cursor: default;
}

.tipster-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  border-color: rgba(148, 163, 184, 0.9);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1),
    rgba(248, 250, 252, 1)
  );
}

.tipster-pill-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.tipster-pill-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tipster-pill-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #e5e7eb;
}

.tipster-pill-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6b7280;
  text-align: center;
}

.tipster-pill-tag {
  display: none;
}

.tipster-pill-main-value {
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin: 4px 0;
}

.tipster-pill-subtext {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.4;
}

.tipster-pill--wins .tipster-pill-icon {
  background: #dcfce7;
  color: #15803d;
}

.tipster-pill--losses .tipster-pill-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.tipster-pill--pending .tipster-pill-icon {
  background: #fef9c3;
  color: #92400e;
}

.tipster-pill--total .tipster-pill-icon {
  background: #e0f2fe;
  color: #1d4ed8;
}

.tipster-pill--wins .tipster-pill-main-value {
  color: #16a34a;
}

.tipster-pill--losses .tipster-pill-main-value {
  color: #b91c1c;
}

.tipster-pill--pending .tipster-pill-main-value {
  color: #d97706;
}

/* History header */
.tipster-section--history-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.tipster-bets-title {
  font-size: 12px;
  /* text-transform: uppercase; */
  letter-spacing: 0.18em;
  color: #6b7280;
}

.tipster-bets-count {
  font-size: 12px;
  color: #9ca3af;
}

.tipster-bets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 570px;
  overflow-y: auto;
  padding-right: 4px;
}

.tipster-bets-list > .tipster-bet-card:first-child {
  margin-top: 10px;
}

.tipster-bet-card {
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(248, 250, 252, 0.96);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) auto;
  gap: 10px;
  align-items: center;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out,
    border-color 0.14s ease-out, background 0.14s ease-out;
}

.tipster-bet-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  border-color: rgba(148, 163, 184, 0.95);
  background: #ffffff;
}

.tipster-bet-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tipster-bet-competition {
  font-size: 11px;
  /* text-transform: uppercase; */
  letter-spacing: 0.16em;
  color: #9ca3af;
}

.tipster-bet-matchup {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.tipster-bet-meta {
  font-size: 11px;
  color: #6b7280;
}

.tipster-bet-pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.tipster-bet-pick-label {
  font-size: 11px;
  /* text-transform: uppercase; */
  letter-spacing: 0.16em;
  color: #9ca3af;
}

.tipster-bet-pick-text {
  font-weight: 500;
  color: #0f172a;
}

.tipster-bet-odds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
}

.tipster-pill-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(255, 255, 255, 0.9);
}

.tipster-pill-sm span {
  font-weight: 500;
  color: #111827;
}

.tipster-bet-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 11px;
}

.tipster-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  min-width: 110px;
  /* text-transform: uppercase; */
}

.tipster-status-icon {
  font-size: 13px;
}

.tipster-status--won {
  background: rgba(220, 252, 231, 0.95);
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.tipster-status--lost {
  background: rgba(254, 226, 226, 0.95);
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.tipster-status--pending {
  background: rgba(255, 251, 235, 0.95);
  color: #92400e;
  border: 1px solid #fed7aa;
}

.tipster-bet-score {
  font-size: 11px;
  color: #6b7280;
}

@media (max-width: 640px) {
  .tipster-card {
    padding: 16px 12px;
    border-radius: 20px;
    max-width: 100%;
    overflow: hidden;
  }

  .tipster-header {
    align-items: flex-start;
  }

  .tipster-layout {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .tipster-bet-card {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr);
    grid-template-rows: auto auto;
  }

  .tipster-bet-status {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .tipster-bet-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .tipster-bet-status {
    align-items: flex-start;
  }
}

/* =================================================================
   Charts Section - ECharts Integration
   ================================================================= */

.tipster-card--charts {
  background: radial-gradient(
      circle at 0 0,
      rgba(139, 92, 246, 0.06),
      transparent 55%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(59, 130, 246, 0.05),
      transparent 55%
    ),
    #ffffff;
}

.tipster-charts-header {
  margin-bottom: 20px;
  text-align: center;
}

.tipster-charts-title {
  font-size: 14px;
  /* text-transform: uppercase; */
  letter-spacing: 0.18em;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.tipster-charts-subtitle {
  font-size: 12px;
  color: #6b7280;
}

.tipster-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.tipster-chart-container {
  background: rgba(248, 250, 252, 0.7);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(209, 213, 219, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tipster-chart-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.tipster-chart-label {
  font-size: 11px;
  /* text-transform: uppercase; */
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 600;
}

.tipster-chart-period {
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 12px;
  font-style: italic;
}

.tipster-chart {
  width: 100%;
  height: 300px;
  min-height: 250px;
}

@media (max-width: 900px) {
  .tipster-charts-grid {
    grid-template-columns: 1fr;
  }

  .tipster-chart {
    height: 280px;
  }
}

@media (max-width: 640px) {
  .tipster-card--charts {
    padding: 16px 8px;
  }

  .tipster-charts-grid {
    padding: 0;
    gap: 16px;
  }

  .tipster-chart {
    height: 280px;
    width: 100%;
    max-width: 100%;
  }

  .tipster-chart-container {
    padding: 16px 12px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
}

/* =================================================================
   SVG Icon Enhancements - Professional Design
   ================================================================= */

/* Icon containers - smooth transitions */
.tipster-pill-icon svg,
.tipster-status-icon svg,
.tipster-pill-sm svg,
.tipster-bet-meta svg,
.tipster-bet-pick-text svg {
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hover effects for pill icons */
.tipster-pill:hover .tipster-pill-icon svg {
  transform: scale(1.1) rotate(5deg);
}

/* Status icon animations */
.tipster-status--won .tipster-status-icon svg {
  animation: tipster-success-bounce 0.6s ease;
}

@keyframes tipster-success-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.tipster-status--lost .tipster-status-icon svg {
  opacity: 0.9;
}

.tipster-status--pending .tipster-status-icon svg {
  animation: tipster-pending-pulse 2s ease-in-out infinite;
}

@keyframes tipster-pending-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Small pill icons alignment */
.tipster-pill-sm svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.tipster-pill-sm:hover svg {
  opacity: 1;
  transform: translateY(-1px);
}

/* Bet metadata icons */
.tipster-bet-meta svg,
.tipster-bet-pick-text svg {
  margin-right: 4px;
  opacity: 0.7;
}

/* Color adjustments for different states */
.tipster-pill--wins svg {
  color: #15803d;
}

.tipster-pill--losses svg {
  color: #b91c1c;
}

.tipster-pill--pending svg {
  color: #d97706;
}

.tipster-pill--total svg {
  color: #1d4ed8;
}

/* Status badge icon colors */
.tipster-status--won svg {
  color: #15803d;
  filter: drop-shadow(0 1px 2px rgba(21, 128, 61, 0.2));
}

.tipster-status--lost svg {
  color: #b91c1c;
  filter: drop-shadow(0 1px 2px rgba(185, 28, 28, 0.2));
}

.tipster-status--pending svg {
  color: #d97706;
  filter: drop-shadow(0 1px 2px rgba(217, 119, 6, 0.2));
}

/* Ensure proper alignment in flex containers */
.tipster-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Smooth icon loading */
svg {
  opacity: 1;
  animation: tipster-icon-fade-in 0.3s ease;
}

@keyframes tipster-icon-fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
