:root {
  --blue: #006cff;
  --blue-dark: #0057dd;
  --cyan: #49ddff;
  --panel: rgba(255, 255, 255, 0.1);
  --panel-line: rgba(255, 255, 255, 0.18);
  --white: #ffffff;
  --soft-white: rgba(255, 255, 255, 0.82);
  --muted-blue: #7283ac;
  --green: #00c878;
  --red: #dd3856;
  --shadow: 0 24px 70px rgba(0, 35, 110, 0.26);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  font-family: Inter, Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 50% 22%, rgba(91, 213, 255, 0.24), transparent 24%),
    linear-gradient(135deg, #0093ff 0%, #006dff 44%, #0054d7 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 38px 18px;
}

.hero {
  display: grid;
  justify-items: center;
  width: min(1190px, 100%);
  text-align: center;
}

.cube-scene {
  position: relative;
  width: min(290px, 72vw);
  height: 220px;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 36px rgba(90, 241, 255, 0.32));
  touch-action: none;
  user-select: none;
}

.cube-scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  outline: none;
  touch-action: none;
}

.cube-scene canvas:active {
  cursor: grabbing;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.1vw, 3.9rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow: 0 12px 34px rgba(0, 38, 118, 0.18);
}

.hero > p {
  margin: 22px 0 0;
  max-width: 620px;
  color: var(--soft-white);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.35;
}

.search-form {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 76px;
  align-items: center;
  width: min(900px, 100%);
  min-height: 98px;
  margin-top: 54px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow), inset 0 0 30px rgba(0, 41, 125, 0.05);
  padding: 12px 16px 12px 34px;
}

.field-icon,
.search-button {
  display: grid;
  place-items: center;
}

.field-icon svg,
.search-button svg,
.trust-note svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.field-icon {
  color: #7d8ba9;
}

.field-icon svg {
  width: 34px;
  height: 34px;
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #151b2d;
  background: transparent;
  padding: 0 16px;
  font-size: clamp(1.12rem, 2vw, 1.55rem);
}

.search-form input::placeholder {
  color: var(--muted-blue);
}

.search-button {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(180deg, #167aff, #0058db);
  box-shadow: 0 12px 24px rgba(0, 80, 210, 0.34);
}

.search-button svg {
  width: 31px;
  height: 31px;
}

.example {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 500;
}

.example a {
  color: inherit;
  text-decoration: none;
}

.results-panel {
  width: min(1190px, 100%);
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 22px 56px rgba(0, 48, 150, 0.15);
  backdrop-filter: blur(14px);
}

.results-panel[hidden],
.results-loading[hidden],
.results-content[hidden] {
  display: none;
}

.results-loading {
  padding: 32px 18px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 800;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 27px 18px;
}

.results-content h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.48rem);
  line-height: 1.2;
}

.results-content h2 span {
  color: var(--cyan);
}

.accuracy-note {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.platform-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 40px;
  text-align: left;
}

.platform-item:nth-child(1),
.platform-item:nth-child(2) {
  border-top: 0;
}

.platform-item:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-item.available-link {
  color: inherit;
}

.platform-name {
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.36);
  text-underline-offset: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 38px;
  border-radius: 9px;
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.free {
  background: linear-gradient(180deg, #09d486, #00ba6c);
}

.status-pill.used {
  background: linear-gradient(180deg, #e94d67, #c92d4c);
}

.status-pill.checking {
  background: linear-gradient(180deg, #6b8ce8, #4768c9);
}

.trust-note {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 64px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  font-weight: 500;
}

.trust-note svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 820px) {
  .app-shell {
    align-items: start;
    padding-top: 34px;
  }

  .cube-scene {
    width: min(240px, 78vw);
    height: 180px;
    margin-bottom: 8px;
  }

  .search-form {
    grid-template-columns: 38px minmax(0, 1fr) 54px;
    min-height: 72px;
    margin-top: 36px;
    padding: 8px 10px 8px 20px;
  }

  .field-icon svg {
    width: 27px;
    height: 27px;
  }

  .search-button {
    width: 48px;
    height: 48px;
  }

  .search-button svg {
    width: 24px;
    height: 24px;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .results-head {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-item,
  .platform-item:nth-child(odd) {
    grid-template-columns: minmax(0, 1fr) auto;
    border-right: 0;
    padding: 13px 16px;
  }

  .platform-item:nth-child(2) {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .status-pill {
    min-width: 82px;
    min-height: 34px;
    font-size: 0.88rem;
  }

  .trust-note {
    margin-top: 36px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.25rem;
  }

  .hero > p {
    font-size: 1.08rem;
  }

  .search-form input {
    padding: 0 10px;
    font-size: 1rem;
  }

  .platform-name {
    font-size: 0.98rem;
  }
}
