* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  max-height: 932px;
  overflow: hidden;
  background: #000;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.screen.active {
  display: block;
}

.background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.04) 0%,
      rgba(0, 0, 0, 0.10) 45%,
      rgba(0, 0, 0, 0.18) 100%
    );
}

.menu {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

button {
  width: 100%;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 17px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.18),
      rgba(40, 20, 70, 0.26)
    );
  color: rgba(255, 255, 255, 0.96);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.2px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.34),
    inset 0 -1px 1px rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

button:active {
  transform: scale(0.975);
}

.farm-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.02) 0%,
      rgba(0, 0, 0, 0.10) 45%,
      rgba(0, 0, 0, 0.42) 100%
    );
}

.terminal-card {
  font-family: "Share Tech Mono", "Consolas", "Courier New", monospace;
}

.farm-card,
.refs-card {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 125px;
  transform: translateX(-50%);
  width: 82%;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(
      180deg,
      rgba(18, 12, 30, 0.82),
      rgba(10, 8, 20, 0.74)
    );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.10),
    0 0 24px rgba(165, 92, 255, 0.10);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.04)
    );
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) {
  background: #ff5f56;
}

.terminal-dots span:nth-child(2) {
  background: #ffbd2e;
}

.terminal-dots span:nth-child(3) {
  background: #27c93f;
}

.terminal-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.terminal-body,
.refs-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 16px;
}

.terminal-icon {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(
      180deg,
      rgba(20, 24, 35, 0.95),
      rgba(8, 10, 18, 0.92)
    );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    0 0 22px rgba(255, 70, 70, 0.12);
}

.terminal-screen {
  width: 68px;
  height: 54px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 50, 50, 0.12),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      rgba(4, 6, 12, 0.98),
      rgba(10, 12, 20, 0.96)
    );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 18px rgba(255, 0, 60, 0.10),
    0 0 14px rgba(255, 0, 80, 0.08);
}

.terminal-line {
  color: #ff5b8a;
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 80, 120, 0.45);
}

.terminal-info,
.refs-info {
  flex: 1;
  min-width: 0;
}

.farm-title,
.refs-title {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.stat-row,
.ref-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-row:last-child,
.ref-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label,
.ref-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.4px;
}

.stat-value,
.ref-value {
  font-size: 18px;
  color: #ffffff;
  letter-spacing: 0.6px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);
}

.ref-code {
  display: inline-block;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(124, 255, 107, 0.35);
  color: #7cff6b;
  font-size: 20px;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(124, 255, 107, 0.35);
  background: rgba(124, 255, 107, 0.06);
}

.upgrades-panel {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46px;
  transform: translateX(-50%);
  width: 86%;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(
      180deg,
      rgba(18, 12, 30, 0.90),
      rgba(10, 8, 20, 0.82)
    );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.10),
    0 0 24px rgba(165, 92, 255, 0.10);
}

.upgrades-body {
  padding: 11px;
  overflow: hidden;
}

.upgrades-title {
  margin-bottom: 9px;
  font-size: 16px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.94);
}

.upgrade-card {
  margin-bottom: 7px;
  padding: 9px 10px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.03)
    );
}

.upgrade-card:last-child {
  margin-bottom: 0;
}

.upgrade-name {
  margin-bottom: 4px;
  font-size: 13.5px;
  color: #fff;
}

.upgrade-line {
  margin-bottom: 1px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.76);
}

.upgrade-line.green {
  color: #7cff6b;
}

.upgrade-line.yellow {
  color: #ffe66b;
}

.upgrade-line.orange {
  color: #ffaa4a;
}

.upgrade-line.red {
  color: #ff5b5b;
}

.upgrade-button {
  margin-top: 6px;
  height: 31px;
  font-size: 12px;
  border-radius: 11px;
}

.upgrade-button.locked {
  opacity: 0.62;
}

.upgrade-button.owned {
  opacity: 0.75;
}

.upgrade-button.available {
  border-color: rgba(124, 255, 107, 0.45);
}

.upgrade-card.locked {
  opacity: 0.7;
}

.upgrade-card.owned {
  border-color: rgba(124, 255, 107, 0.35);
}

.upgrade-card.available {
  border-color: rgba(255, 255, 255, 0.28);
}

.withdraw-card {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  width: 86%;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(
      180deg,
      rgba(18, 12, 30, 0.88),
      rgba(10, 8, 20, 0.82)
    );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.10),
    0 0 24px rgba(165, 92, 255, 0.10);
}

.withdraw-body {
  padding: 16px;
}

.withdraw-title {
  margin-bottom: 12px;
  font-size: 18px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.94);
}

.withdraw-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.withdraw-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.70);
}

.withdraw-value {
  font-size: 16px;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.withdraw-info {
  margin-top: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.64);
}

.wallet-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(0, 0, 0, 0.30);
  color: #ffffff;
  font-family: "Share Tech Mono", "Consolas", "Courier New", monospace;
  font-size: 13px;
  outline: none;
}

.wallet-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.withdraw-button {
  margin-top: 10px;
  height: 42px;
  font-size: 15px;
  border-radius: 13px;
}

.withdraw-button:disabled {
  opacity: 0.45;
}

.back-button {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: 82%;
  height: 56px;
  font-size: 18px;
}

.back-button:active {
  transform: translateX(-50%) scale(0.975);
}

@media (min-width: 700px) {
  body {
    background: #000;
  }

  .phone-app {
    border-radius: 30px;
  }
}

@media (max-height: 760px) {
  .farm-card,
  .refs-card {
    top: 75px;
  }

  .terminal-body,
  .refs-body {
    padding: 20px 14px;
    gap: 12px;
  }

  .terminal-icon {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .terminal-screen {
    width: 60px;
    height: 48px;
  }

  .farm-title,
  .refs-title {
    font-size: 16px;
    margin-bottom: 9px;
  }

  .stat-row,
  .ref-row {
    padding: 10px 0;
  }

  .stat-label,
  .ref-label {
    font-size: 13px;
  }

  .stat-value,
  .ref-value {
    font-size: 16px;
  }

  .ref-code {
    font-size: 17px;
    padding: 6px 10px;
  }

  .upgrades-panel {
    top: 24px;
    width: 88%;
  }

  .upgrades-body {
    padding: 9px;
    overflow: hidden;
  }

  .upgrades-title {
    font-size: 14px;
    margin-bottom: 7px;
  }

  .upgrade-card {
    padding: 7px 9px;
    margin-bottom: 6px;
    border-radius: 13px;
  }

  .upgrade-name {
    font-size: 12.5px;
    margin-bottom: 3px;
  }

  .upgrade-line {
    font-size: 10px;
    margin-bottom: 1px;
  }

  .upgrade-button {
    height: 28px;
    font-size: 11px;
    margin-top: 5px;
  }

  .withdraw-card {
    bottom: 92px;
    width: 88%;
  }

  .withdraw-body {
    padding: 12px;
  }

  .withdraw-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .withdraw-row {
    padding: 7px 0;
  }

  .withdraw-label {
    font-size: 12px;
  }

  .withdraw-value {
    font-size: 14px;
  }

  .withdraw-info {
    font-size: 11px;
    margin-top: 9px;
    margin-bottom: 9px;
  }

  .wallet-input {
    height: 38px;
    font-size: 12px;
  }

  .withdraw-button {
    height: 38px;
    font-size: 14px;
  }

  .back-button {
    height: 52px;
    font-size: 17px;
  }
}
.auth-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-overlay.hidden {
  display: none;
}

.auth-card {
  width: 88%;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(
      180deg,
      rgba(18, 12, 30, 0.92),
      rgba(10, 8, 20, 0.86)
    );
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.40),
    inset 0 1px 1px rgba(255, 255, 255, 0.10),
    0 0 24px rgba(165, 92, 255, 0.10);
}

.auth-body {
  padding: 18px 16px;
  color: #fff;
  line-height: 1.45;
}

#authTitle {
  font-size: 18px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.96);
}

#authText {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.70);
}

.ref-enter-box {
  margin-top: 12px;
}

.small-action-button {
  margin-top: 8px;
  height: 38px;
  font-size: 13px;
  border-radius: 12px;
}

.select-input {
  margin-bottom: 8px;
  appearance: none;
  -webkit-appearance: none;
}
