/* ============================================
   CHAVEAMENTO — Racket Solutions Open
   ============================================ */

/* ---------- Hero ---------- */
.kb-hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 52px;
  text-align: center;
  background: var(--dark, #1a1714);
  color: #fff;
}

.kb-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(211,10,88,.15) 0%, transparent 60%);
  pointer-events: none;
}

.kb-hero__inner { position: relative; z-index: 1; }

.kb-hero__num {
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,.08);
  display: block;
}

.kb-hero__title {
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-top: -8px;
}

.kb-hero__bar {
  width: 48px;
  height: 4px;
  background: var(--lime, #D30A58);
  margin: 16px auto 0;
  border-radius: 2px;
}

.kb-hero__sub {
  font-family: var(--condensed, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.5);
  margin-top: 14px;
}

/* ---------- Tabs ---------- */
.kb-tabs {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.kb-tabs__list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.kb-tabs__list::-webkit-scrollbar { display: none; }

.kb-tab {
  flex: none;
  padding: 18px 28px;
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #999;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
  position: relative;
}

.kb-tab:hover { color: #1a1714; }

.kb-tab--active {
  color: var(--lime, #D30A58);
  border-bottom-color: var(--lime, #D30A58);
}

.kb-tab__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  background: var(--lime, #D30A58);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: .04em;
}

/* ---------- Content ---------- */
.kb-content {
  padding: 40px 0 72px;
  min-height: 360px;
}

/* Loading */
.kb-loading { text-align: center; padding: 80px 0; color: #999; }

.kb-loading__spin {
  width: 36px;
  height: 36px;
  border: 3px solid #eee;
  border-top-color: var(--lime, #D30A58);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: kb-spin .7s linear infinite;
}
@keyframes kb-spin { to { transform: rotate(360deg); } }

/* Empty */
.kb-empty {
  text-align: center;
  padding: 80px 0;
  color: #999;
  font-size: 14px;
}

/* ---------- Bracket ---------- */
.kb-bracket__scroll {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--lime, #D30A58) #eee;
}
.kb-bracket__scroll::-webkit-scrollbar { height: 6px; }
.kb-bracket__scroll::-webkit-scrollbar-track { background: #eee; border-radius: 3px; }
.kb-bracket__scroll::-webkit-scrollbar-thumb { background: var(--lime, #D30A58); border-radius: 3px; }

.kb-bracket__grid {
  display: flex;
  gap: 0;
  min-width: max-content;
  padding: 24px 0;
  align-items: stretch;
}

/* ---------- Round ---------- */
.kb-round {
  display: flex;
  flex-direction: column;
  min-width: 230px;
}

.kb-round__head {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid #eee;
}

.kb-round__name {
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #999;
}

.kb-round__count {
  font-family: var(--condensed, 'Inter', sans-serif);
  font-size: 10px;
  color: #ccc;
  margin-top: 2px;
}

.kb-round__matches {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
  gap: 14px;
  padding: 0 8px;
}

/* ---------- Match Card ---------- */
.kb-match {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 0;
  min-width: 210px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}

.kb-match:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}

/* Status bar */
.kb-match__bar {
  height: 3px;
  background: #e8e8e8;
}
.kb-match--completed .kb-match__bar { background: var(--lime, #D30A58); }
.kb-match--scheduled .kb-match__bar { background: #3b82f6; }
.kb-match--in-progress .kb-match__bar { background: #10b981; animation: kb-pulse 2s infinite; }
.kb-match--walkover .kb-match__bar { background: #f59e0b; }
@keyframes kb-pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* Status label */
.kb-match__status {
  font-family: var(--condensed, 'Inter', sans-serif);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 12px 0;
}
.kb-match__status--pending { color: #bbb; }
.kb-match__status--scheduled { color: #3b82f6; }
.kb-match__status--in_progress { color: #10b981; }
.kb-match__status--completed { color: var(--lime, #D30A58); }
.kb-match__status--walkover { color: #f59e0b; }

/* Players */
.kb-match__body { padding: 6px 12px 10px; }

.kb-match__player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  color: #444;
  border-bottom: 1px solid #f5f5f5;
  gap: 8px;
}
.kb-match__player:last-of-type { border-bottom: none; }

.kb-match__player--winner {
  color: #1a1714;
  font-weight: 700;
}

.kb-match__player--bye {
  color: #ccc;
  font-style: italic;
}

.kb-match__player-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.kb-match__player-seed {
  font-size: 9px;
  color: #bbb;
  font-weight: 700;
  background: #f5f5f5;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Scores */
.kb-match__scores {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.kb-match__score {
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: 11px;
  font-weight: 700;
  color: #666;
  min-width: 18px;
  text-align: center;
}
.kb-match__player--winner .kb-match__score { color: var(--lime, #D30A58); }

/* Info (date/court) */
.kb-match__info {
  padding: 6px 12px 8px;
  border-top: 1px solid #f5f5f5;
  font-size: 10px;
  color: #aaa;
  display: flex;
  gap: 8px;
}

/* Bye */
.kb-match--bye { opacity: .45; }

/* ---------- Connector ---------- */
.kb-connector {
  width: 24px;
  flex-shrink: 0;
}

/* ---------- Champion ---------- */
.kb-champion {
  text-align: center;
  padding: 48px 0;
}

.kb-champion__card {
  display: inline-block;
  background: linear-gradient(135deg, #1a1714 0%, #2d1f28 100%);
  color: #fff;
  padding: 40px 56px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.kb-champion__card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(211,10,88,.1), transparent 30%);
  animation: kb-rotate 6s linear infinite;
}
@keyframes kb-rotate { to { transform: rotate(360deg); } }

.kb-champion__crown {
  color: var(--lime, #D30A58);
  margin-bottom: 12px;
  position: relative;
}

.kb-champion__label {
  display: block;
  font-family: var(--condensed, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(255,255,255,.5);
  position: relative;
}

.kb-champion__class {
  display: block;
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 4px;
  color: var(--lime, #D30A58);
  position: relative;
}

.kb-champion__name {
  display: block;
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 8px;
  position: relative;
}

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

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26,23,20,.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.mobile-menu__link {
  font-family: var(--head, 'Roboto Slab', serif);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  transition: color .2s;
}
.mobile-menu__link:hover,
.mobile-menu__link--active {
  color: var(--lime, #D30A58);
}

/* Burger open state */
.header__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { opacity: 0; }
.header__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .kb-hero { padding: 60px 0 36px; }
  .kb-tab { padding: 14px 18px; font-size: 12px; }
  .kb-round { min-width: 200px; }
  .kb-match { min-width: 185px; }
  .kb-champion__card { padding: 32px 40px; }
}

@media (max-width: 580px) {
  .kb-hero { padding: 48px 0 28px; }
  .kb-hero__num { font-size: 48px; }
  .kb-hero__title { font-size: 24px; }
  .kb-content { padding: 28px 0 48px; }
  .kb-tab { padding: 12px 14px; font-size: 11px; }
  .kb-round { min-width: 175px; }
  .kb-match { min-width: 160px; }
  .kb-match__player { font-size: 12px; padding: 4px 0; }
  .kb-champion__card { padding: 24px 28px; }
}
