/* نسخه: 1.6 (سازگار با Dev/Prod، A11y، Honeypot، Reduced Motion) */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  min-height: 100vh;
  animation: fadeIn 0.6s ease-in-out;
}

.topbar {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .logo-container { display: flex; align-items: center; gap: 12px; }
.logo { width: 130px; height: 130px; object-fit: cover;
  border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.lang-switch {
  display: flex; gap: 8px; background: rgba(255,255,255,0.12);
  padding: 6px 8px; border-radius: 10px; backdrop-filter: blur(2px);
}
.lang-btn {
  border: none; background: transparent; padding: 2px; border-radius: 6px;
  cursor: pointer; outline: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.lang-btn:hover { transform: translateY(-1px); }
.lang-btn.active { background: rgba(255,255,255,0.22); box-shadow: 0 2px 8px rgba(0,0,0,0.25); }

.container {
  display: flex; justify-content: space-between; align-items: flex-start;
  max-width: 1100px; margin: 18px auto 30px; padding: 24px; gap: 30px;
  background: rgba(0, 0, 0, 0.3); border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.intro-section { flex: 1; min-width: 320px; }
.intro-section h1 { font-weight: 600; margin-bottom: 12px; }
.intro-section p { font-size: 1.06rem; line-height: 1.9; text-align: justify; opacity: 0.97; }

.form-section { flex: 1; min-width: 320px; }
.signup-form { margin-top: 6px; }
.input-group { margin-bottom: 15px; }

.input-group input,
.input-group select {
  width: 100%; padding: 14px; border: none; border-radius: 8px; font-size: 1rem;
  outline: none; direction: rtl; text-align: right; color: #333; background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}
.input-group input:focus,
.input-group select:focus {
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.35);
  transform: translateY(-1px);
}
input::placeholder { color: #9E9E9E; }
select:required:invalid { color: #9E9E9E; }
select option { color: #333; }
select option[disabled] { color: #9E9E9E; }

.error-text { display: block; margin-top: 6px; font-size: 0.88rem; color: #ff6b6b; text-align: right; }
.input-group.error input, .input-group.error select { border: 1px solid #ff6b6b; background: #fff8f8; }

button {
  width: 100%; padding: 14px; background: #ffcc00; border: none; border-radius: 8px;
  color: #333; font-weight: 700; font-size: 1.08rem; cursor: pointer; transition: 0.25s ease;
  margin-top: 4px; position: relative; overflow: hidden;
}
button:hover { background: #e6b800; transform: translateY(-2px); }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-loader {
  display: none; width: 18px; height: 18px; border: 2px solid rgba(0,0,0,0.2);
  border-top-color: rgba(0,0,0,0.55); border-radius: 50%;
  animation: spin 0.7s linear infinite; position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
}
button.loading .btn-text { opacity: 0.4; }
button.loading .btn-loader { display: inline-block; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.btn-ripple::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.45) 10%, transparent 11%);
  background-size: 6px 6px; opacity: 0; transition: opacity .2s ease;
}
.btn-ripple:active::after { opacity: .45; transition: opacity .05s ease; }

@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
.reveal { opacity: 0; transform: translateY(14px); animation: revealUp .55s ease forwards; }
.intro-section.reveal { animation-delay: .15s; }
.form-section.reveal  { animation-delay: .35s; }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

/* Toast */
.toast {
  position: fixed; top: 50%; left: 50%; min-width: 320px; max-width: 92vw;
  padding: 16px 18px 20px; border-radius: 10px; color: #fff; font-size: 0.98rem;
  display: flex; align-items: center; gap: 12px; z-index: 9999;
  box-shadow: 0 14px 36px rgba(0,0,0,0.35); background: #4caf50;
  transform: translate(-50%, -50%) scale(.96); opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.error { background: #f44336; }
.toast.hidden { display: none; }
.toast:not(.hidden) { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast-icon { font-size: 20px; }
.toast-close { margin-right: auto; font-size: 20px; font-weight: bold; cursor: pointer; opacity: .9; }
.toast-close:hover { opacity: 1; }
.toast-progress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(255,255,255,0.8); transition: width linear;
  border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;
}

/* A11y */
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid #ffcc00; outline-offset: 2px;
}

/* Honeypot مخفی */
.hp { display: none !important; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 900px) {
  .container { flex-direction: column; align-items: stretch; gap: 18px; }
  .intro-section, .form-section { min-width: 0; }
}

/* برای برچسب‌های پنهانِ قابل‌دسترسی */
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
