* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #050b14;
  --panel: rgba(13, 26, 43, .86);
  --line: rgba(132, 167, 206, .18);
  --text: #f5f8fc;
  --muted: #96a8bc;
  --cyan: #28d7e8;
  --blue: #2584ff;
  --green: #24d18f;
  --danger: #ff667a;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.background {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 5%, rgba(37, 132, 255, .2), transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(40, 215, 232, .14), transparent 35%),
    linear-gradient(145deg, #050b14, #07111f 55%, #040811);
  z-index: -1;
}

.page {
  width: min(100% - 32px, 610px);
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 0
    max(24px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.brand-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(40, 215, 232, .45);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(37, 132, 255, .22),
    rgba(40, 215, 232, .08));
  box-shadow: 0 18px 55px rgba(0, 0, 0, .35);
}

.brand-icon span {
  font-weight: 900;
  font-size: 25px;
  letter-spacing: -2px;
}

.brand-icon i {
  color: var(--cyan);
  font-style: normal;
  font-weight: 900;
  position: absolute;
  right: 9px;
  bottom: 6px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 42px);
  letter-spacing: -.045em;
}

.subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.card {
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
  backdrop-filter: blur(20px);
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.step-label span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #04101a;
  border-radius: 50%;
  background: var(--cyan);
}

.step-label p {
  margin: 0;
}

h2 {
  margin: 14px 0 20px;
  font-size: clamp(21px, 5vw, 28px);
  letter-spacing: -.025em;
}

.file-zone {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 25px;
  text-align: center;
  border: 1.5px dashed rgba(40, 215, 232, .42);
  border-radius: 22px;
  background: rgba(40, 215, 232, .035);
  transition: .2s ease;
  cursor: pointer;
}

.file-zone:hover,
.file-zone.dragging {
  border-color: var(--cyan);
  background: rgba(40, 215, 232, .09);
  transform: translateY(-2px);
}

.file-zone input {
  display: none;
}

.file-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  color: var(--cyan);
  font-size: 34px;
  border-radius: 17px;
  background: rgba(40, 215, 232, .1);
}

.file-zone small,
.file-info small,
.progress-panel small {
  color: var(--muted);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, .035);
}

.file-info > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.file-info strong,
.file-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: #06130f;
  font-weight: 900;
  border-radius: 13px;
  background: var(--green);
}

.file-info button,
.ios-help button {
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 25px;
}

.cabinet-section {
  margin-top: 30px;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cabinet {
  padding: 16px 8px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  transition: .18s ease;
}

.cabinet:hover {
  border-color: rgba(40, 215, 232, .65);
}

.cabinet.selected {
  color: #041118;
  border-color: var(--cyan);
  background: var(--cyan);
  font-weight: 850;
}

.send-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  margin-top: 24px;
  color: #031016;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(100deg, var(--cyan), #58a8ff);
  font-weight: 850;
  font-size: 17px;
  box-shadow: 0 15px 35px rgba(40, 215, 232, .18);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: .35;
  box-shadow: none;
}

.progress-panel,
.message {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-track {
  height: 9px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width .2s ease;
}

.message.success {
  color: #9affd9;
  border: 1px solid rgba(36, 209, 143, .28);
  background: rgba(36, 209, 143, .08);
}

.message.error {
  color: #ffb0ba;
  border: 1px solid rgba(255, 102, 122, .28);
  background: rgba(255, 102, 122, .08);
}

.install-button {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  color: var(--cyan);
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(13, 26, 43, .75);
}

.ios-help {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  max-width: 480px;
  margin: auto;
  padding: 18px 45px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #102034;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.ios-help button {
  position: absolute;
  right: 12px;
  top: 8px;
}

.ios-help p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

footer i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

.hidden {
  display: none !important;
}

@media (max-width: 430px) {
  .page {
    width: min(100% - 22px, 610px);
  }

  .brand-icon {
    width: 62px;
    height: 62px;
    border-radius: 19px;
  }

  .cabinet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
