.tsm-tournament-results {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  max-width: 1000px;
  margin: 20px auto;
  color: #333;
}

/* Sections */
.tsm-results-section {
  margin-bottom: 40px;
}

.tsm-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #6366f1;
  display: inline-block;
}

/* Accordion */
.tsm-accordion-item {
  margin-bottom: 12px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tsm-accordion-item:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.tsm-accordion-header {
  background: #f8fafc;
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border-bottom: 1px solid transparent;
}

.tsm-accordion-item.active .tsm-accordion-header {
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.tsm-date {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

.tsm-icon {
  font-size: 24px;
  color: #64748b;
  transition: transform 0.3s ease;
  transform: rotate(0deg);
}

.tsm-accordion-item.active .tsm-icon {
  transform: rotate(180deg);
}

.tsm-accordion-content {
  display: none;
  padding: 24px;
  background: #fff;
}

.tsm-accordion-item.active .tsm-accordion-content {
  display: block;
}

/* Matches Grid */
.tsm-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 20px;
}

@media (max-width: 600px) {
  .tsm-matches-grid {
    grid-template-columns: 1fr;
  }
}

/* Match Card */
.tsm-match-card {
  background: #fcfdfe;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 18px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tsm-match-card:hover {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.tsm-match-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.tsm-round {
  color: #6366f1;
}

.tsm-match-teams {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tsm-team-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.tsm-team-name {
  font-weight: 500;
  color: #475569;
  font-size: 1rem;
  flex: 1;
}

.tsm-winner .tsm-team-name {
  color: #0f172a;
  font-weight: 700;
}

.tsm-winner .tsm-team-name::after {
  content: "🏆";
  font-size: 0.8rem;
  margin-left: 8px;
}

.tsm-seed {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-left: 4px;
}

.tsm-team-scores {
  display: flex;
  gap: 6px;
  min-width: 120px;
  justify-content: flex-end;
}

.tsm-set-score {
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  min-width: 24px;
  text-align: center;
}

.tsm-winner .tsm-set-score {
  background: #e0e7ff;
  color: #4338ca;
}

.tsm-set-score sup {
  font-size: 0.6rem;
  margin-left: 2px;
  color: #94a3b8;
}

.tsm-match-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: #10b981;
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  text-transform: uppercase;
}

.atp-flag {
  width: 1.625rem;
  height: 1.125rem;
  border: 1px solid #d7d9dc;
  border-radius: 0.25rem;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

/* Rankings Styles */
.tsm-rankings-container {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 24px;
}

.tsm-rankings-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.tsm-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tsm-rankings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.tsm-rankings-table th {
  background: #f8fafc;
  padding: 16px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.tsm-rankings-table td {
  padding: 16px 12px;
  font-size: 0.95rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.tsm-rankings-table tr:hover td {
  background-color: #f8fafc;
}

.tsm-rankings-table tr:last-child td {
  border-bottom: none;
}

.tsm-player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tsm-player-name {
  font-weight: 600;
  color: #0f172a;
}

.tsm-player-country-code {
  font-size: 0.75rem;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.rank-col {
  font-weight: 800;
  color: #1e293b;
  width: 40px;
}

.rank-change-col {
  width: 70px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.rank-up {
  color: #10b981 !important;
}
.rank-down {
  color: #ef4444 !important;
}
.rank-same {
  color: #94a3b8 !important;
}

.tsm-icon-up {
  margin-right: 2px;
}
.tsm-icon-down {
  margin-right: 2px;
}

.points-col {
  font-weight: 700;
  color: #4338ca;
}

.points-change-col {
  font-size: 0.85rem;
  font-weight: 600;
}

.points-up {
  color: #10b981 !important;
}
.points-down {
  color: #ef4444 !important;
}

.next-points-col,
.max-points-col,
.best-rank-col,
.tourn-played-col {
  color: #64748b;
  font-weight: 500;
}

.tsm-no-results {
  background: #f8fafc;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  color: #64748b;
  font-weight: 500;
  border: 2px dashed #e2e8f0;
}
