


*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


:root {
  
  --bg-base:         #EEF2FB;   
  --bg-card:         #FFFFFF;   
  --bg-header-m:     #00182F;   
  --bg-round-nav:    #F4F6FB;   
  --bg-col-header:   #FFFFFF;   

  
  --border-low:      #E4E8F0;
  --border-mid:      #A5ACBB;
  --border-connector:#C5CEDF;

  
  --text-primary:    #000000;
  --text-secondary:  #505B73;   
  --text-header-m:   #FFFFFF;
  --text-pending:    #A5ACBB;

  
  --score-winner-bg:  #03122B;
  --score-winner-txt: #FFFFFF;
  --score-loser-bg:   #E4E8F0;
  --score-loser-txt:  #505B73;
  --score-pending-bg: #E4E8F0;
  --score-pending-txt:#505B73;

  
  --accent-red:      #E41D35;   
  --accent-live:     #DF1C3C;   

  
  --col-width:       188px;
  --connector-width: 28px;
  --card-radius:     6px;
  --header-height-m: 78px;      
  --roundnav-height: 44px;

  --font-main: 'MosesText', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --bg-page:         #EEF2FB;
  --navy:            #00182F;
  --text-dark:       #1A1A1A;
}


html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}


.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: url('images/k_brackets.png?v=9a1b2999') top center / cover no-repeat, var(--bg-base);
}


.page-header {
  background-color: var(--bg-page);
  position: relative;
  user-select: none;
}

.header-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  height: 95px;
  border-radius: 8px 8px 0 0;
  background-color: var(--navy);
  background-image: url('../assets/images/Teams_bg.png?v=c2059735');
  background-size: cover;
  background-position: center;
  clip-path: inset(0 0 -200px 0);
  overflow: visible;
}

.header-inner::before {
  content: '';
  position: absolute;
  right: -53px;
  top: 0;
  width: 97px;
  height: 47.5px;
  background: #FFB04B;
  border-radius: 10000px 0 0 0;
  pointer-events: none;
  z-index: 2;
}

.header-inner::after {
  content: '';
  position: absolute;
  right: -53px;
  bottom: 0;
  width: 97px;
  height: 47.5px;
  background: #FF8B3E;
  border-radius: 10000px 0 0 0;
  pointer-events: none;
  z-index: 2;
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 70px 0 130px;
}


.header-mobile-sponsor-bar {
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  background: #020916;
  padding: 10px 8px;
  width: 100%;
  box-sizing: border-box;
}
.header-mobile-sponsor-bar__right,
.header-mobile-sponsor-bar__left {
  display: flex;
  align-items: center;
}
.header-mobile-wc-txt  { display: block; height: 20px; width: auto; }
.header-mobile-sponsor-img { display: block; height: 20px; width: auto; border: none; outline: none; }


.header-sponsor-col {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.header-sponsor-link { display: block; border: none; outline: none; text-decoration: none; }
.header-sponsor-img {
  display: block;
  height: 20px;
  width: auto;
  border: none;
  outline: none;
}
.header-wc-txt { display: block; width: auto; }

.header-title {
  font-size: 62px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.header-trophy {
  position: absolute;
  top: 10px;
  left: 20px;
  width: auto;
  object-fit: contain;
  z-index: 10;
}


.view-switcher {
  background: var(--bg-page);
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  border-radius: 0 0 8px 8px;
}

.view-btn {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 28px;
  padding: 2px 0;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.view-btn--active {
  font-weight: 700;
}

.view-btn:hover:not(.view-btn--active) {
  opacity: 0.6;
}

.view-btn__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.view-btn__label--mobile {
  display: none;
}

.view-btn__icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}


.app--list-view .bracket-track { display: none !important; }
.app--list-view .match-list    { display: flex; }


.round-nav {
  flex-shrink: 0;
  display: none; 
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 0;
  background: var(--bg-header-m);          
  border-bottom: 3px solid var(--phase-accent, #eddde8);
}

.round-nav__label {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  flex: 1;
  letter-spacing: -0.01em;
}

.round-nav__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 50px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  font-family: var(--font-main);
}
.round-nav__arrow:hover { background: rgba(255,255,255,0.08); }
.round-nav__arrow:disabled { color: rgba(255,255,255,0.25); cursor: default; }
.round-nav__arrow:disabled:hover { background: transparent; }


.bracket-shell {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}


.bracket-track {
  display: none; 
  flex-direction: row;
  direction: ltr;   
  align-items: stretch;
  height: 100%;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  overflow-x: auto;
  overflow-y: auto;
  padding: 0 16px 16px 16px;
  background: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--border-low) transparent;
}
.bracket-track::-webkit-scrollbar       { height: 4px; width: 4px; }
.bracket-track::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }


.phase-col {
  flex-shrink: 0;
  width: var(--col-width);
  display: flex;
  flex-direction: column;
  position: relative;
}

.phase-col__header {
  flex-shrink: 0;
  text-align: center;
  padding: 5px 10px;
  background: #03122B;
  position: sticky;
  top: 0;
  z-index: 10;
}

.phase-col__label {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.phase-col__label--split {
  display: inline-flex;
  direction: rtl;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.phase-col__label-num {
  direction: ltr;
  unicode-bidi: isolate;
}


.phase-col--r32 .phase-col__header { border-bottom: 3px solid #8a1a67; }
.phase-col--r16 .phase-col__header { border-bottom: 3px solid #00b140; }
.phase-col--qf  .phase-col__header { border-bottom: 3px solid #045694; }
.phase-col--sf  .phase-col__header { border-bottom: 3px solid #f09316; }
.phase-col--f   .phase-col__header { border-bottom: 3px solid #fff7d8; }


@media (min-width: 768px) {
  .phase-col--r32 .phase-col__header { margin-bottom: 12px; }
  .header-sponsor-col { display: flex; }
}


.phase-col__matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
}


.phase-col--r32 .phase-col__matches {
  background: #D8DFF0;
}


.match-slot {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
}


.connector-col {
  flex-shrink: 0;
  width: var(--connector-width);
  display: flex;
  flex-direction: column;
  align-self: stretch;
  pointer-events: none;
}
.connector-col__head { flex-shrink: 0; }
.connector-col__body {
  flex: 1;
  position: relative;
  min-height: 0;
}
.connector-col__body svg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
}


.third-section-label {
  background: linear-gradient(-9.22deg, #045694 3.93%, #00182F 97.007%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 5px 10px;
  border-bottom: 1px solid #E4E8F0;
  flex-shrink: 0;
}
.third-section-label + .match-slot {
  margin-top: 30px;
}


.match-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 4px 3.5px rgba(0,0,0,0.11), 0 2px 2px rgba(0,0,0,0.07);
  overflow: hidden;
  background: #eef2fb;
  direction: rtl;
  width: 100%;
}

.match-card--linked { cursor: pointer; }
.match-card--linked:hover { filter: brightness(0.96); }


.match-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 5px;
  background: #03122b;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.match-card__live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00B140;
  border: 1.5px solid #27DF6A;
  flex-shrink: 0;
  animation: pulse-dot 1.2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}


.match-card__teams {
  display: flex;
  flex-direction: column;
  gap: 5px;                     
  padding: 3px 5px 5px;
  border-bottom: 1px solid #e4e8f0;
  flex-shrink: 0;
}


.match-card__team {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  flex-shrink: 0;
}


.match-card__team__info {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  min-width: 0;
}

.match-card__team__name {
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  color: #03122b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.match-card__team__flag-wrap {
  flex-shrink: 0;
  width: 27px;
  height: 20px;
  border: 1px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/k_team.png?v=db052115') center / cover no-repeat;
  overflow: hidden;
}

.match-card--pending .match-card__team__flag-wrap {
  border-color: #505b73;
}
.match-card__team__flag {
  width: 25px;
  height: 18px;
  object-fit: cover;
  display: block;
}


.match-card__team__score {
  flex-shrink: 0;
  width: 20px;
  margin-inline-start: auto;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: #03122b;
  line-height: 20px;
}


.match-card__team--winner .match-card__team__name { font-weight: 700; }
.match-card__team--loser  .match-card__team__name { color: #a5acbb; }
.match-card__team--loser  .match-card__team__score { color: #a5acbb; }


.match-card--pending .match-card__teams { gap: 0; }
.match-card--pending .match-card__team { min-height: 24px; }
.match-card--pending .match-card__team__info { gap: 3px; }
.match-card--pending .match-card__team__name { font-size: 14px; }


.match-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px;
  background: #eef2fb;
  flex-shrink: 0;
}
.match-card__footer__channel {
  font-size: 11px;
  font-weight: 400;
  line-height: 12px;
  color: #03122b;
  white-space: nowrap;
  margin-inline-start: auto; 
}
.match-card__footer__status {
  font-size: 11px;
  font-weight: 400;
  line-height: 12px;
  color: #f43056;
  border-inline-end: 1px solid #e4e8f0;
  padding-inline-end: 5px;
  white-space: nowrap;
}


.match-card__footer__live {
  display: flex;
  align-items: center;
  gap: 2px;
  border-inline-end: 1px solid #e4e8f0;
  padding-inline-end: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 14px;
  color: #03122b;
  white-space: nowrap;
}


.match-card--final .match-card__header {
  background: linear-gradient(-7.82deg, rgb(4, 86, 148) 3.93%, rgb(0, 24, 47) 97.007%);
  color: #ffffff;
  border-left: 1px solid #fcf2e1;
  border-right: 1px solid #fcf2e1;
  border-top: 1px solid #fcf2e1;
}
.match-card--final .match-card__teams {
  background: linear-gradient(-21.91deg, rgba(255,247,216,0.75) 3.93%, rgba(255,228,118,0.75) 50.47%, rgba(255,204,0,0.75) 97.007%);
}
.match-card--final .match-card__footer {
  background: linear-gradient(-8.52deg, rgba(255,247,216,0.75) 3.93%, rgba(255,228,118,0.75) 50.47%, rgba(255,204,0,0.75) 97.007%);
}


.match-card--third .match-card__header {
  background: linear-gradient(-7.82deg, rgb(4, 86, 148) 3.93%, rgb(0, 24, 47) 97.007%);
  color: #ffffff;
  border-left: 1px solid #fff7d8;
  border-right: 1px solid #fff7d8;
  border-top: 1px solid #fff7d8;
}


.third-place-gap {
  height: 24px;
  flex-shrink: 0;
}


.match-card__header__label {
  order: -1;
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  line-height: 15px;
  white-space: nowrap;
  text-align: center;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 1px;
}


.match-card--final .match-card__header,
.match-card--third .match-card__header {
  flex-wrap: wrap;
}


.final-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.final-card-wrapper__logo {
  width: 110px;
  height: auto;
  max-height: 130px;
  object-fit: contain;
  flex-shrink: 0;
}
.match-list__section-label--third {
  background: linear-gradient(-9.22deg, #045694 3.93%, #00182F 97.007%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 5px 10px;
  border-bottom: 1px solid #E4E8F0;
  letter-spacing: 0;
  text-transform: none;
}


.match-list {
  display: none; 
  flex: 1;
  min-height: 0;
  overflow: hidden;      
  position: relative;
  background: transparent;
  flex-direction: column;
  touch-action: pan-y;   
}


.match-list__slide {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  will-change: transform;
}


.match-list__inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 14px 12px 60px 12px;  
  gap: 0;
  min-height: 100%;
}


.bracket-lines {
  flex-shrink: 0;
  width: 79px;
  display: flex;
  flex-direction: column;
  position: relative;
}


.bracket-connector {
  flex-shrink: 0;
  position: relative;
  
}


.bracket-connector__bracket {
  position: absolute;
  right: 0;
  width: 49px;
  border: 1px solid rgba(0,0,0,0.3);
  border-right: none;
  border-radius: 20px 0 0 20px;
  
}


.bracket-connector__line {
  position: absolute;
  left: 1px;
  width: 30px;
  height: 1px;
  background: rgba(0,0,0,0.3);
  
}


.match-list__cards {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.match-list__section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 4px 6px;
}


.bracket-loading,
.bracket-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 60px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  text-align: center;
  gap: 8px;
}
.bracket-error { color: var(--accent-red); }
.bracket-error small { font-size: 11px; opacity: 0.7; font-style: normal; }


@media (max-width: 767px) {
  html, body { overflow: hidden; }

  .round-nav  { display: flex; }

  
  .phase-col--r32 .phase-col__matches { background: transparent; }

  
  .page-header {
    padding: 0;
  }

  .header-inner {
    height: 78px;
    border-radius: 0;
    overflow: hidden;
    clip-path: none;
  }

  .header-inner::before,
  .header-inner::after {
    display: none;
  }

  .header-inner::before {
    display: block;
    right: -42px;
    top: 0;
    width: 79px;
    height: 39px;
  }

  .header-inner::after {
    display: block;
    right: -42px;
    top: 39px;
    width: 79px;
    height: 39px;
  }

  .header-content {
    padding: 0 55px;
  }

  .header-mobile-sponsor-bar { display: flex; }

  .header-sponsor-col { display: none; }

  .header-title {
    font-size: 2.25rem;
  }

  .header-trophy {
    height: 65px;
    top: auto;
    bottom: 3px;
    left: 12px;
  }

  .view-switcher {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 15px 10px 10px;
    border-radius: 0;
    margin: 0;
  }

  .view-btn[data-view="calendar"] {
    display: none;
  }

  .view-btn--interactive {
    display: none;
  }

  .view-btn {
    flex: 1;
    flex-direction: row;
    justify-content: center;
    padding: 15px 10px;
    background: #fff;
    border: 1px solid #3A416F;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dark);
    box-shadow: 0 3px 5px rgba(0,0,0,0.09), 0 2px 3px rgba(0,0,0,0.07);
    opacity: 1;
  }

  .view-btn__label--desktop {
    display: none;
  }

  .view-btn__label--mobile {
    display: inline;
  }

  .view-btn__icon {
    display: none;
  }

  .view-btn--active {
    background: linear-gradient(165deg, #3A416F 0%, #141727 100%);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 7px rgba(0,0,0,0.11), 0 2px 4px rgba(0,0,0,0.07);
  }

  .view-btn:hover:not(.view-btn--active) {
    opacity: 1;
    background: #f0f2f8;
  }

  
  .bracket-track {
    display: flex;
    overflow-x: scroll;
    overflow-y: auto;
    scroll-snap-type: x mandatory;
    touch-action: pan-x pan-y;   
    cursor: grab;
    
    padding: 0 calc((100% - 262px) / 2) 20px;
    align-items: flex-start;
  }
  .match-list { display: none; }

  
  
  .phase-col {
    scroll-snap-align: center;
    width: 262px;
    max-width: 262px;
    flex-shrink: 0;
  }
  
  .phase-col--f {
    scroll-snap-align: center;
    width: 278px;
    max-width: 278px;
    flex-shrink: 0;
    padding: 0 6px;
  }

  
  
  .phase-col__header { display: none; }

  
  .connector-col {
    width: calc((100vw - 262px) / 2 + 4px);
    align-self: auto;
    overflow: hidden;
  }

  
  .match-card {
    box-shadow: 0 4px 7px rgba(0,0,0,0.11), 0 2px 4px rgba(0,0,0,0.07);
  }
  
  .match-card__header {
    padding: 6px 8px;
    font-size: 15px;
    line-height: 18px;
  }
  
  .match-card__teams {
    padding: 8px;
    gap: 12px;
  }
  
  .match-card--pending .match-card__teams { gap: 12px; }

  
  .match-card__team__info { gap: 8px; }
  .match-card--pending .match-card__team__info { gap: 8px; }

  
  .match-card__team__name  { font-size: 16px; line-height: 21px; }
  .match-card--pending .match-card__team__name { font-size: 16px; }

  
  .match-card__team__flag-wrap { width: 36px; height: 27px; border: 1.33px solid #505b73; }
  .match-card__team__flag      { width: 34px; height: 25px; }

  
  .match-card__footer { padding: 8px; }
  .match-card__footer__channel,
  .match-card__footer__status,
  .match-card__footer__live { font-size: 14px; line-height: 18px; }

  
  .match-card__footer__status {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  
  .bracket-track .match-card__team__score,
  .match-list .match-card__team__score { display: none; }

  .bracket-track .match-card:not(.match-card--pending) .match-card__team__score,
  .match-list .match-card:not(.match-card--pending) .match-card__team__score { display: block; }

  .match-card__live-dot { background: #00B140; border-color: #27DF6A; }
}


@media (min-width: 768px) {
  html, body {
    overflow: hidden;
    max-width: 1240px;
    margin: 0 auto;
  }

  .app {
    background: url('images/k_Background.png?v=4e1f2859') top center / cover no-repeat, var(--bg-base);
  }

  .round-nav  { display: none; }
  .bracket-track { display: flex; padding-top: 40px; }
  .match-list    { display: none; }

  .phase-col   { flex: 1; min-width: 0; width: auto; }
  .phase-col--f { flex: 1; min-width: 0; width: auto; }

  
  .phase-col__header { position: static; z-index: auto; }
}



.match-card__footer__status--imminent {
  display: flex;
  gap: 4px;
  align-items: baseline;
  font-weight: 500;
  color: #e41d35;
  border-inline-end: 1px solid #e4e8f0;
  padding-inline-end: 5px;
  white-space: nowrap;
}

.match-card__footer__status--imminent .status-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 12px;
}

.match-card__footer__status--imminent .status-countdown {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 12px;
}


@media (max-width: 767px) {
  .match-card__footer__status--imminent .status-label {
    font-size: 12px;
    line-height: 14px;
  }
  .match-card__footer__status--imminent .status-countdown {
    font-size: 14px;
    line-height: 14px;
  }
}
