*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

.hv-rooms-body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #05070f;
  color: #fff;
  font-family: "Rajdhani", "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hv-rooms-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 60, 180, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(60, 160, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 35% at 85% 70%, rgba(255, 80, 200, 0.1), transparent 50%),
    linear-gradient(180deg, #05070f 0%, #0a1020 40%, #0d1830 70%, #080c18 100%);
}

.hv-rooms-neon-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

.hv-rooms-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(5, 8, 18, 0.35) 0%,
    rgba(5, 8, 18, 0.15) 35%,
    rgba(5, 8, 18, 0.55) 100%
  );
  pointer-events: none;
}

.hv-rooms-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 14px 16px;
  backdrop-filter: blur(8px);
  background: rgba(5, 8, 18, 0.45);
}

.hv-top-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.hv-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.hv-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hv-nav-active {
  color: #fff;
  background: rgba(56, 140, 220, 0.55);
  box-shadow: 0 0 0 1px rgba(120, 200, 255, 0.25);
}

.hv-nav-badge::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f5c518;
  box-shadow: 0 0 6px rgba(245, 197, 24, 0.8);
}

.hv-nav-icon,
.hv-nav-diamond-icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  opacity: 0.9;
}

.hv-nav-diamond-icon {
  color: #67e8f9;
}

.hv-rooms-profile {
  flex-shrink: 0;
}

.hv-rooms-main {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px 28px;
}

.hv-rooms-hero {
  margin-bottom: 18px;
}

.hv-rooms-title {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  text-shadow: 0 0 24px rgba(255, 80, 180, 0.35), 0 0 24px rgba(80, 180, 255, 0.35);
}

.hv-rooms-title-pink {
  color: #ff4db8;
}

.hv-rooms-title-blue {
  color: #4db8ff;
}

.hv-rooms-subtitle {
  margin: 10px 0 4px;
  font-family: "Orbitron", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.92);
}

.hv-rooms-tagline {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.hv-rooms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hv-rooms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hv-rooms-tab {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 16, 30, 0.72);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.hv-rooms-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hv-rooms-tab-active {
  color: #fff;
  background: rgba(56, 140, 220, 0.45);
  box-shadow: 0 0 0 1px rgba(120, 200, 255, 0.28), 0 0 18px rgba(56, 140, 220, 0.25);
}

.hv-rooms-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hv-rooms-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 30, 0.72);
  color: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.hv-rooms-refresh:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hv-rooms-refresh svg {
  width: 14px;
  height: 14px;
}

.hv-rooms-refresh.is-loading svg {
  animation: hvRoomsSpin 0.8s linear infinite;
}

@keyframes hvRoomsSpin {
  to {
    transform: rotate(360deg);
  }
}

.hv-rooms-search {
  position: relative;
  display: flex;
  align-items: center;
}

.hv-rooms-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.hv-rooms-search input {
  width: min(280px, 42vw);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 30, 0.82);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px 10px 38px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.hv-rooms-search input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.hv-rooms-search input:focus {
  border-color: rgba(120, 200, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(56, 140, 220, 0.18);
}

.hv-rooms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.hv-rooms-list-wrap {
  position: relative;
  min-height: 320px;
}

.hv-rooms-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hv-room-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 180, 255, 0.14);
  background: linear-gradient(90deg, rgba(8, 14, 28, 0.82), rgba(12, 18, 34, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.hv-room-card:hover {
  border-color: rgba(120, 200, 255, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hv-room-card.is-disabled {
  opacity: 0.55;
}

.hv-room-card.is-full:not(.is-disabled) {
  border-color: rgba(255, 120, 120, 0.18);
}

.hv-room-thumb {
  width: 96px;
  height: 58px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, #0d2848, #1a1038);
  position: relative;
}

.hv-room-thumb::after {
  content: "";
  position: absolute;
  inset: 18% 10%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.hv-room-thumb.mode-futsal {
  background: linear-gradient(135deg, #0f3d2d, #123a5c);
}

.hv-room-thumb.mode-biglassic,
.hv-room-thumb.mode-futlassic {
  background: linear-gradient(135deg, #3a1d10, #1a2848);
}

.hv-room-thumb.mode-futsal-r2 {
  background: linear-gradient(135deg, #3a1038, #103848);
}

.hv-room-thumb.has-banner::after {
  display: none;
}

.hv-room-thumb.has-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hv-room-thumb.has-banner.is-offline img {
  filter: grayscale(0.65) brightness(0.7);
}
  min-width: 0;
}

.hv-room-name {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-room-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hv-room-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

.hv-room-tag.mode {
  background: rgba(77, 184, 255, 0.16);
  color: #8fd4ff;
}

.hv-room-tag.bonus {
  background: rgba(255, 77, 184, 0.14);
  color: #ff8fd4;
}

.hv-room-privacy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hv-room-privacy svg {
  width: 18px;
  height: 18px;
}

.hv-room-privacy.is-public {
  color: #5ce0a0;
}

.hv-room-privacy.is-private {
  color: #ff6eb8;
}

.hv-room-privacy.is-offline {
  color: #ff6b6b;
}

.hv-room-privacy.is-offline svg {
  color: #ff6b6b;
}

.hv-room-card.is-offline {
  border-color: rgba(255, 90, 90, 0.22);
  opacity: 0.82;
}

.hv-room-thumb.is-offline {
  filter: grayscale(0.65) brightness(0.7);
}

.hv-room-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.hv-room-signal {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.hv-room-signal span {
  width: 4px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.hv-room-signal span.on {
  background: #5ce0a0;
}

.hv-room-signal span.on.offline {
  background: #ff6b6b;
  box-shadow: 0 0 6px rgba(255, 90, 90, 0.55);
}

.hv-room-signal span:nth-child(1) { height: 4px; }
.hv-room-signal span:nth-child(2) { height: 7px; }
.hv-room-signal span:nth-child(3) { height: 10px; }
.hv-room-signal span:nth-child(4) { height: 13px; }

.hv-room-players {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.hv-room-region {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}

.hv-room-region .ping-good { color: #5ce0a0; }
.hv-room-region .ping-mid { color: #f5c518; }
.hv-room-region .ping-bad { color: #ff6b6b; }
.hv-room-region .ping-offline {
  color: #ff6b6b;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hv-room-join {
  min-width: 108px;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #3d9ae8, #2a6eb8);
  box-shadow: 0 0 0 1px rgba(120, 200, 255, 0.25), 0 8px 20px rgba(42, 110, 184, 0.28);
}

.hv-room-join:hover:not(:disabled) {
  filter: brightness(1.08);
}

.hv-room-join:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hv-room-join.is-private {
  background: linear-gradient(180deg, #e84db8, #b82a88);
  box-shadow: 0 0 0 1px rgba(255, 120, 200, 0.25), 0 8px 20px rgba(184, 42, 136, 0.28);
}

.hv-rooms-filters {
  border-radius: 12px;
  border: 1px solid rgba(120, 180, 255, 0.14);
  background: rgba(8, 14, 28, 0.82);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.hv-rooms-filters-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.hv-rooms-filters-head svg {
  width: 18px;
  height: 18px;
  color: #8fd4ff;
}

.hv-rooms-filters-head h2 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hv-rooms-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.hv-rooms-filter-field select,
.hv-rooms-filter-field input[type="range"] {
  width: 100%;
}

.hv-rooms-filter-field select {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 10, 20, 0.9);
  color: #fff;
  border-radius: 8px;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.hv-rooms-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hv-rooms-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.hv-rooms-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.hv-rooms-check input {
  accent-color: #4db8ff;
}

.hv-rooms-create {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #e84db8, #b82a88);
  opacity: 1;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.hv-rooms-create:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.hv-rooms-create svg {
  width: 14px;
  height: 14px;
}

.hv-rooms-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 12px;
}

.hv-rooms-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
}

.hv-rooms-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hv-rooms-legend-item svg {
  width: 14px;
  height: 14px;
}

.hv-legend-public { color: #5ce0a0; }
.hv-legend-private { color: #ff6eb8; }
.hv-legend-tournament { color: #f5c518; }

.hv-rooms-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hv-rooms-page-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 16, 30, 0.72);
  color: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.hv-rooms-page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.hv-rooms-page-btn.is-active {
  color: #fff;
  background: rgba(56, 140, 220, 0.55);
  box-shadow: 0 0 0 1px rgba(120, 200, 255, 0.25);
}

.hv-rooms-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hv-rooms-empty,
.hv-rooms-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  pointer-events: none;
}

.hv-rooms-empty[hidden],
.hv-rooms-loading[hidden] {
  display: none !important;
}

.hv-rooms-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #4db8ff;
  animation: hvRoomsSpin 0.8s linear infinite;
}

.hv-room-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  background: rgba(8, 14, 28, 0.95);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.hv-room-tooltip strong {
  display: block;
  margin-bottom: 6px;
  font-family: "Orbitron", sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8fd4ff;
}

@media (max-width: 1100px) {
  .hv-rooms-layout {
    grid-template-columns: 1fr;
  }

  .hv-rooms-filters {
    order: -1;
  }
}

@media (max-width: 820px) {
  .hv-room-card {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "thumb info"
      "privacy stats"
      "join join";
  }

  .hv-room-thumb { grid-area: thumb; width: 72px; height: 48px; }
  .hv-room-info { grid-area: info; }
  .hv-room-privacy { grid-area: privacy; flex-direction: row; justify-content: flex-start; }
  .hv-room-stats { grid-area: stats; }
  .hv-room-join { grid-area: join; width: 100%; }
}

.hv-create-room-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.hv-create-room-modal[hidden] {
  display: none !important;
}

.hv-create-room-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(4px);
}

.hv-create-room-dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(120, 180, 255, 0.22);
  background: linear-gradient(180deg, rgba(18, 28, 48, 0.98), rgba(10, 16, 30, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.hv-create-room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hv-create-room-head h2 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #8fd4ff;
}

.hv-create-room-close {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
}

.hv-create-room-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hv-create-room-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.hv-create-room-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.hv-create-room-field input {
  border: 1px solid rgba(120, 180, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  padding: 10px 12px;
  font: inherit;
}

.hv-create-room-token-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(232, 77, 184, 0.35);
}

.hv-create-room-token-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.hv-create-room-token-head a {
  color: #8fd4ff;
  font-size: 11px;
  text-decoration: none;
}

.hv-create-room-token {
  width: 100%;
  box-sizing: border-box;
}

.hv-create-room-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.hv-create-room-status {
  font-size: 12px;
  color: #8fd4ff;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(79, 184, 255, 0.08);
}

.hv-create-room-status.is-error {
  color: #ff8f9d;
  background: rgba(255, 80, 110, 0.1);
}

.hv-create-room-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.hv-room-password-dialog {
  width: min(380px, 100%);
}

.hv-room-password-modal .hv-create-room-status {
  margin-top: 4px;
}

.hv-create-room-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: "Orbitron", sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.hv-create-room-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.hv-create-room-btn--primary {
  background: linear-gradient(180deg, #e84db8, #b82a88);
  color: #fff;
}

.hv-create-room-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
