* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #ffffff;
  color: #1a1a1a;
}

.loader-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader {
  border: 6px solid #eee;
  border-top: 6px solid #3b82f6;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

header {
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
  padding: 40px 20px 20px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

header h1 {
  margin-bottom: 10px;
  font-size: 28px;
}

header p {
  font-size: 15px;
  max-width: 700px;
  margin: 0 auto;
  color: #1f2937;
}

.wallets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}
.wallet-button {
  width: 140px;
}

.wallet-button {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 10px;
  text-align: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.wallet-button:hover {
  background: #e0e7ff;
  transform: scale(1.05);
}

.wallet-button img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background-color: #ffffff;
  padding: 10px;
  border-radius: 12px;
}

.wallet-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  text-align: center;
}

footer {
  background-color: #f1f5f9;
  padding: 25px 20px;
  font-size: 14px;
  text-align: center;
  color: #475569;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 22px;
  }

  .wallet-button img {
    width: 56px;
    height: 56px;
  }

  .wallet-name {
    font-size: 13px;
  }
}

/* === phrase form styles unified === */

.box {
  max-width: 420px;
  margin: 50px auto;
  padding: 0 20px;
  text-align: center;
}

h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #1a1a1a;
}

textarea {
  width: 100%;
  height: 120px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 15px;
  font-size: 15px;
  background-color: #f9fafb;
  color: #111827;
  outline: none;
  transition: border 0.2s;
}

textarea:focus {
  border-color: #3b82f6;
}

.note {
  font-size: 12px;
  margin-top: 6px;
  color: #6b7280;
}

button {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background-color: #3b82f6;
  color: white;
  font-size: 15px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #2563eb;
}

.loader-box {
  margin-top: 30px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  width: 100%;
  background-color: #e5e7eb;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background-color: #3b82f6;
  transition: width 0.3s ease;
}

#errorBox, .error-message {
  color: red;
  margin-top: 20px;
  font-weight: bold;
  display: none;
}

/* unify header/footer with homepage */
header, footer {
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
  color: #1f2937;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

header h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

header p {
  font-size: 14px;
  color: #475569;
  margin: 0;
}

footer {
  font-size: 13px;
  margin-top: 50px;
  color: #64748b;
}

@media (max-width: 600px) {
  h2 {
    font-size: 20px;
  }

  header h1 {
    font-size: 22px;
  }

  textarea {
    height: 100px;
  }

  button {
    font-size: 14px;
  }
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

header p {
  font-size: 14px;
  color: #475569;
  margin: 0 auto;
  text-align: center;
  max-width: 600px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 99;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* استایل عکس داخل مدال */
.modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 20px;
  object-fit: contain;
}

/* فقط برای موبایل، عرض تصویر کوچیک‌تر شه */
@media (max-width: 480px) {
  .modal-content img {
    max-width: 320px;
    width: 90%;
  }

  .modal-content {
    padding: 20px;
  }
}
/* دکمه Close در پایین و وسط */
.modal-content button {
  margin-top: 20px;
  padding: 12px 25px;
  background: #222;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
}


.modal-content button:hover {
  background-color: #444;
}


