:root {
  --bg: #f5f5f7;
  --card: #f5f5f7;

  --text: #111827;
  --muted: #6b7280;

  --input-bg: #ffffff;
  --input-border: #e5e7eb;

  --primary: #111827;
  --primary-hover: #000000;

  --apple: #000000;
  --google: #34a853;

  --radius: 20px;

  --shadow:
    0 1px 2px rgba(0,0,0,0.02),
    0 8px 30px rgba(0,0,0,0.04);
}

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

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;

  background: var(--bg);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "Segoe UI",
    sans-serif;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  width: 100%;
  max-width: 430px;

  background: var(--card);

  border-radius: 28px;

  padding: 28px;

  box-shadow:
    0 0px 5px rgba(0,0,0,0.04),
    0 10px 45px rgba(0,0,0,0.08);
}
/* HEADER */

.header {
  margin-bottom: 22px;
}

h1 {
  margin: 0;

  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;

  color: var(--text);
}

.header p {
  margin-top: 10px;

  color: var(--muted);

  font-size: 15px;
  line-height: 1.5;
}

/* INPUTS */

input {
  width: 100%;

  background: var(--input-bg);

  border: 1px solid var(--input-border);
  border-radius: 16px;

  padding: 16px;

  font-size: 16px;
  color: var(--text);

  outline: none;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;

  margin-bottom: 12px;
}

input::placeholder {
  color: #9ca3af;
}

input:focus {
  border-color: #d1d5db;

  box-shadow:
    0 0 0 4px rgba(0,0,0,0.03);

  transform: translateY(-1px);
}

/* BUTTONS */

button {
  width: 100%;

  border: none;
  border-radius: 16px;

  padding: 16px;

  font-size: 15px;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

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

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-apple {
  background: var(--apple);
  color: white;
}

.btn-google {
  background: var(--google);
  color: white;
}

.clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);

  width: 26px;
  height: 26px;

  border-radius: 999px;

  border: none;

  background: rgba(0,0,0,0.06);
  color: rgba(0,0,0,0.5);

  font-size: 14px;
  font-weight: 600;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.clear-btn:hover {
  background: rgba(0,0,0,0.1);
}

/* COUNTRY SELECT */

/* COUNTRY SELECT */

.select-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.country-search {
  margin-bottom: 0;
}

/* DROPDOWN */

.country-dropdown {
  position: absolute;

  top: calc(100% + 8px);
  left: 0;
  right: 0;

  background: rgba(255,255,255,0.96);

  backdrop-filter: blur(18px);

  border-radius: 20px;

  border: 2px solid rgba(0,0,0,0.06);

  box-shadow:
    0 18px 60px rgba(0,0,0,0.14),
    0 6px 20px rgba(0,0,0,0.08);

  max-height: 260px;

  overflow-y: auto;
  overflow-x: hidden;

  z-index: 999;

  padding: 8px;

  overscroll-behavior: contain;

  -webkit-overflow-scrolling: touch;
}

/* ITEM */

.country-item {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 14px;

  border-radius: 14px;

  cursor: pointer;

  transition:
    background 0.12s ease,
    transform 0.12s ease;
}

.country-item:hover {
  background: rgba(0,0,0,0.04);
}

.country-item:active {
  transform: scale(0.99);
}

.country-flag {
  font-size: 20px;
  line-height: 1;
}

.country-name {
  font-size: 15px;
  color: var(--text);
}

/* EMPTY */

.country-empty {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* SCROLLBAR */

.country-dropdown::-webkit-scrollbar {
  width: 8px;
}

.country-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.country-dropdown::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 999px;
}

/* HIDDEN */

.hidden {
  display: none;
}
/* STATUS */

.status {
  min-height: 22px;

  margin-top: 14px;

  font-size: 14px;
  color: var(--muted);

  display: flex;
  align-items: center;
}

/* ACTIONS */

.actions {
  display: flex;
  flex-direction: column;
  gap: 2px;

  margin-top: 18px;

  animation: fadeIn 0.25s ease;
}

.hidden {
  display: none;
}

/* MOBILE */

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  .card {
    padding: 24px;
    border-radius: 24px;
  }

  h1 {
    font-size: 28px;
  }
}

/* ANIMATION */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.wallet-image-btn {
  width: 80%;
  margin: 0 auto;
  display: block;
  border-radius: 16px;
  cursor: pointer;

  transition: transform 0.15s ease, opacity 0.15s ease;
}

.wallet-image-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}