* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #151608 0%, #050505 42%, #000 100%);
  color: #fff;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px max(38px, env(safe-area-inset-bottom));
}

.header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.logo {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffcb05, #ff8a00);
  color: #050505;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.logo-box h1 {
  margin: 0;
  font-size: clamp(28px, 9vw, 42px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 1px;
}

.logo-box p {
  margin: 10px 0 0;
  color: #b8b8b8;
  font-size: clamp(17px, 5vw, 24px);
  line-height: 1.35;
}

.connect-btn,
.claim-btn,
.ref-box button {
  min-height: 56px;
  border-radius: 20px;
  padding: 0 24px;
  background: #fff;
  color: #050505;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.6px;
  box-shadow: none;
}

.connect-btn {
  width: 100%;
  max-width: 260px;
}

.card,
.rules {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(16, 16, 18, 0.92);
  box-shadow: 0 0 34px rgba(255, 230, 0, 0.06);
}

.card {
  padding: 32px 20px 24px;
}

.card h2 {
  margin: 0;
  font-size: clamp(38px, 12vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 1px;
}

.desc {
  margin: 24px 0 28px;
  color: #bfbfbf;
  font-size: clamp(17px, 5vw, 22px);
  line-height: 1.65;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.info-grid > div,
.form-group input,
.ref-box input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: #0b0b0c;
}

.info-grid > div {
  padding: 20px 18px;
  min-height: 96px;
}

.info-grid span {
  display: block;
  margin-bottom: 10px;
  color: #a8a8a8;
  font-size: 16px;
  line-height: 1.25;
}

.info-grid strong {
  display: block;
  color: #fff;
  font-size: clamp(18px, 5.3vw, 23px);
  line-height: 1.25;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.form-group {
  margin-top: 6px;
}

.form-group label,
.ref-box h3 {
  display: block;
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.25;
  font-weight: 900;
}

.form-group input,
.ref-box input {
  min-height: 64px;
  padding: 0 18px;
  color: #fff;
  font-size: 17px;
  outline: none;
}

.form-group input::placeholder,
.ref-box input::placeholder {
  color: #8f8f8f;
}

.claim-btn {
  width: 100%;
  margin-top: 22px;
  min-height: 64px;
  font-size: 18px;
}

.claim-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.ref-box {
  margin-top: 28px;
  padding: 22px 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
}

.ref-box input {
  text-align: center;
}

.ref-box button {
  margin-top: 14px;
  min-width: 150px;
}

.message {
  margin-top: 18px;
  color: #ffca28;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rules {
  margin-top: 22px;
  padding: 24px 20px;
}

.rules h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.2;
}

.rules ul {
  margin: 0;
  padding-left: 20px;
  color: #c7c7c7;
  font-size: 16px;
  line-height: 1.7;
}

@media (min-width: 700px) {
  .page {
    max-width: 900px;
    padding: 54px 28px 70px;
  }

  .header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .connect-btn {
    width: auto;
  }

  .card {
    padding: 52px 64px 44px;
  }

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

@media (max-width: 360px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  .logo {
    flex-basis: 60px;
    width: 60px;
    height: 60px;
    border-radius: 17px;
    font-size: 15px;
  }

  .card {
    padding-left: 16px;
    padding-right: 16px;
  }
}
