body.opentt-search-open {
  overflow: hidden;
  height: 100vh;
  overscroll-behavior: none;
}

html.opentt-search-open {
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

.opentt-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.opentt-search.opentt-search--floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 65;
}

.opentt-search:not(.opentt-search--floating) .opentt-search-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.opentt-search:not(.opentt-search--floating) .opentt-search-toggle:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
}

.opentt-search:not(.opentt-search--floating) .opentt-search-toggle-icon {
  width: 24px;
  height: 24px;
}

.opentt-search-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(3, 23, 69, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.opentt-search-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(8, 30, 82, 0.95);
}

.opentt-search-toggle-icon {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) invert(1);
}

.opentt-search-close {
  display: inline-block;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 16px;
  padding: 4px 10px;
  z-index: 2;
}

.opentt-search-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(61, 124, 255, 0.22), rgba(2, 10, 28, 0.72) 55%, rgba(1, 5, 16, 0.84) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 68;
}

.opentt-search-panel {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  background:
    linear-gradient(140deg, rgba(12, 39, 102, 0.48) 0%, rgba(5, 20, 58, 0.85) 32%, rgba(3, 13, 40, 0.96) 100%);
  border: 0;
  border-radius: 0;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(45, 119, 245, 0.18) inset;
  padding: 72px 24px 24px;
  z-index: 69;
  box-sizing: border-box;
  overscroll-behavior: contain;
  overflow-y: auto;
}

.opentt-search-label {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.opentt-search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(9, 22, 56, 0.88);
  color: #fff;
  padding: 0 14px;
  font-size: 16px;
  line-height: 1.35;
}

.opentt-search-input:focus {
  outline: none;
  border-color: rgba(56, 145, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(56, 145, 255, 0.2);
}

.opentt-search-suggestion {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(232, 243, 255, 0.88);
}

.opentt-search-suggestion-label {
  color: rgba(232, 243, 255, 0.82);
}

.opentt-search-suggestion-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8ec5ff;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.opentt-search-suggestion-btn:hover {
  color: #b8dbff;
}

.opentt-search-results {
  margin-top: 14px;
  max-height: none;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.opentt-search-empty,
.opentt-search-loading {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.74);
}

.opentt-search-group {
  border: 1px solid rgba(126, 168, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 23, 58, 0.78) 0%, rgba(7, 18, 46, 0.74) 100%);
}

.opentt-search-group[data-group-key="trending"] {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(9, 23, 58, 0.9) 0%, rgba(7, 18, 46, 0.86) 100%) padding-box,
    linear-gradient(145deg, #ff3b30 0%, #ff7a18 28%, #ffd335 52%, #ff5f6d 76%, #ff2d95 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(255, 108, 54, 0.3),
    0 0 18px rgba(255, 92, 48, 0.22);
  animation: opentt-trending-pulse 1.9s ease-in-out infinite;
}

@keyframes opentt-trending-pulse {
  0% {
    box-shadow:
      0 0 0 1px rgba(255, 108, 54, 0.3),
      0 0 12px rgba(255, 92, 48, 0.18);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 196, 74, 0.55),
      0 0 26px rgba(255, 102, 66, 0.36);
  }
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 108, 54, 0.3),
      0 0 12px rgba(255, 92, 48, 0.18);
  }
}

@media (min-width: 900px) {
  .opentt-search-results.opentt-search-has-side-popular {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-flow: row dense;
    column-gap: 12px;
    row-gap: 10px;
  }

  .opentt-search-results.opentt-search-has-side-popular .opentt-search-group {
    grid-column: 1 / -1;
  }

  .opentt-search-results.opentt-search-has-side-popular .opentt-search-group[data-group-key="clubs"] {
    grid-column: 1 / 2;
  }

  .opentt-search-results.opentt-search-has-side-popular .opentt-search-group[data-group-key="players"] {
    grid-column: 2 / 3;
  }

  .opentt-search-results.opentt-search-has-side-discovery {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-flow: row dense;
    column-gap: 12px;
    row-gap: 10px;
  }

  .opentt-search-results.opentt-search-has-side-discovery .opentt-search-group {
    grid-column: 1 / -1;
  }

  .opentt-search-results.opentt-search-has-side-discovery .opentt-search-group[data-group-key="trending"] {
    grid-column: 1 / 2;
  }

  .opentt-search-results.opentt-search-has-side-discovery .opentt-search-group[data-group-key="latest_results"] {
    grid-column: 2 / 3;
  }

  .opentt-search-results.opentt-search-has-side-discovery .opentt-search-group[data-group-key="clubs"] {
    grid-column: 1 / 2;
  }

  .opentt-search-results.opentt-search-has-side-discovery .opentt-search-group[data-group-key="players"] {
    grid-column: 2 / 3;
  }
}

.opentt-search-group-title {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(239, 246, 255, 0.88);
  background: linear-gradient(90deg, rgba(53, 114, 226, 0.22), rgba(255, 255, 255, 0.06));
}

.opentt-search-group-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-right: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.opentt-search-group-head .opentt-search-group-title {
  border-bottom: 0;
}

.opentt-search-group-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.opentt-search-group-icon--fire {
  background: linear-gradient(145deg, #ff3b30 0%, #ff7a18 30%, #ffd335 52%, #ff5f6d 76%, #ff2d95 100%);
  -webkit-mask-image: var(--opentt-trending-icon);
  mask-image: var(--opentt-trending-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  filter: drop-shadow(0 1px 5px rgba(255, 96, 30, 0.5));
}

.opentt-search-clear-history {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  line-height: 1.2;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
  margin-left: auto;
}

.opentt-search-clear-history:hover {
  background: rgba(255, 255, 255, 0.16);
}

.opentt-search-group-items {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.opentt-search-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 11px;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  line-height: 1.45;
}

.opentt-search-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.opentt-search-item[data-opentt-item-type="match"] .opentt-search-item-main {
  width: 100%;
}

.opentt-search-match-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.opentt-search-match-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.opentt-search-match-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 0;
}

.opentt-search-match-team.is-away {
  justify-content: flex-end;
}

.opentt-search-match-team-name {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(243, 248, 255, 0.94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opentt-search-match-score {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  min-width: 52px;
  text-align: center;
}

.opentt-search-item-thumb.is-mini {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
}

.opentt-search-match-meta {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(194, 206, 224, 0.9);
  text-align: center;
}

.opentt-search-hit {
  font-weight: 800;
  color: #ffffff;
}

.opentt-search-rank-badge {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  align-self: center;
}

.opentt-search-rank-badge--icon {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.opentt-search-rank-badge--icon::before {
  content: "";
  width: 24px;
  height: 24px;
  display: block;
  -webkit-mask-image: var(--opentt-rank-icon);
  mask-image: var(--opentt-rank-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45));
}

.opentt-search-rank-badge--1 {
  color: #f8c630;
}

.opentt-search-rank-badge--1::before {
  background: linear-gradient(150deg, #ffe48a 0%, #f6c341 40%, #d7910f 100%);
}

.opentt-search-rank-badge--2 {
  color: #c5ced9;
}

.opentt-search-rank-badge--2::before {
  background: linear-gradient(150deg, #f0f4fa 0%, #c8d0dc 45%, #909aa8 100%);
}

.opentt-search-rank-badge--3 {
  color: #cb7f4a;
}

.opentt-search-rank-badge--3::before {
  background: linear-gradient(150deg, #edb283 0%, #c97a44 48%, #8a4d26 100%);
}

.opentt-search-rank-badge--num {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: rgba(190, 199, 214, 0.94);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.opentt-search-item-thumb {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.opentt-search-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.opentt-search-item-text {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.opentt-search-item:first-child {
  border-top: 0;
}

.opentt-search-item:hover {
  background: linear-gradient(90deg, rgba(61, 134, 255, 0.22), rgba(255, 255, 255, 0.03));
}

.opentt-search-item-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  word-break: break-word;
  display: block;
}

.opentt-search-item-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.45;
  word-break: break-word;
  display: block;
  padding-bottom: 1px;
}

@media (max-width: 640px) {
  .opentt-search.opentt-search--floating {
    right: 12px;
    bottom: 12px;
  }

  .opentt-search-backdrop {
    display: none;
  }

  .opentt-search-panel {
    padding: 62px 14px 16px;
    z-index: 9999;
    background: linear-gradient(165deg, rgba(8, 26, 70, 0.96) 0%, rgba(4, 14, 40, 0.985) 44%, rgba(1, 8, 24, 0.995) 100%);
  }

  .opentt-search-close {
    right: 8px;
    top: 8px;
    font-size: 30px;
  }

  .opentt-search-label {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .opentt-search-results {
    padding-bottom: 18px;
  }

  .opentt-search-item-thumb {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .opentt-search-rank-badge {
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .opentt-search-rank-badge--icon::before {
    width: 22px;
    height: 22px;
  }
}
