/* ════════════════════════════════════════════════════════════════
   FH Casino — Homepage Stylesheet
   ───────────────────────────────────────────────────────────────
   استایل کامل صفحه‌ی اصلی. فقط چیزهایی که Tailwind نداره اینجاست؛
   بقیه از کلاس‌های Tailwind (تنظیم‌شده در index.ejs) می‌آد.

   شامل:
     - Base reset                     - Design utilities
     - Auth modal styles              - Toast notifications
     - Logged-in nav styles           - Helper animations
   ════════════════════════════════════════════════════════════════ */


/* ═══════ BASE ═══════ */
html { scroll-behavior: smooth; }

body {
  display: block !important;
  flex-direction: unset !important;
  grid-template-columns: unset !important;
  grid-template-rows: unset !important;
  align-items: unset !important;
  justify-content: unset !important;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  background: #070707;
  color: #f5f5f5;
  margin: 0;
  padding: 0 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* اطمینان از اینکه header fixed درست کار می‌کند */
body > header {
  display: block !important;
  position: fixed !important;
}


/* ═══════ DESIGN UTILITIES ═══════ */

/* Subtle felt-like background grain (used on hero & final CTA) */
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 50% -10%, rgba(212,160,23,0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(212,160,23,0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Gold gradient text (logo, headlines accent words, stat numbers) */
.text-gold-gradient {
  background: linear-gradient(120deg, #f3d986 0%, #d4a017 40%, #faecbf 60%, #d4a017 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Hairline gold divider */
.gold-line {
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(212,160,23,0.6), transparent);
}

/* Primary CTA — gold */
.btn-gold {
  position: relative;
  background: linear-gradient(135deg, #ebc657 0%, #d4a017 50%, #b88512 100%);
  color: #0c0c0d;
  font-weight: 700;
  letter-spacing: 0;
  transition: all .25s ease;
  overflow: hidden;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  transform: translateX(100%);
  transition: transform .8s ease;
}
.btn-gold:hover {
  box-shadow: 0 12px 30px -8px rgba(212,160,23,0.55);
  transform: translateY(-1px);
}
.btn-gold:hover::after { transform: translateX(-100%); }

/* Ghost CTA — gold border */
.btn-ghost {
  background: transparent;
  color: #f3d986;
  border: 1px solid rgba(212,160,23,0.45);
  transition: all .25s ease;
}
.btn-ghost:hover {
  background: rgba(212,160,23,0.08);
  border-color: rgba(212,160,23,0.85);
  color: #faecbf;
}

/* Cards (features, stats) */
.lux-card {
  background: linear-gradient(180deg, rgba(28,28,31,0.7) 0%, rgba(12,12,13,0.7) 100%);
  border: 1px solid rgba(212,160,23,0.12);
  backdrop-filter: blur(8px);
  transition: all .3s ease;
}
.lux-card:hover {
  border-color: rgba(212,160,23,0.35);
  transform: translateY(-3px);
}

/* Live indicator dot (pulses red) */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.6);
  animation: pulseDot 1.6s ease-out infinite;
}
@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  100% { box-shadow: 0 0 0 12px rgba(239,68,68,0); }
}

/* Hero suit icons */
.suit { font-size: 14px; opacity: .9; }

/* nav-auth فقط دسکتاپ نشون داده می‌شه */
#nav-auth {
  display: none !important;
}
@media (min-width: 768px) {
  #nav-auth {
    display: flex !important;
  }
}

/* Selection color */
::selection { background: rgba(212,160,23,0.35); color: #fff; }

/* Card-back pattern (decorative floating cards in hero) */
.card-back {
  background-color: #0c0c0d;
  background-image:
    repeating-linear-gradient(45deg,  rgba(212,160,23,0.08) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(212,160,23,0.08) 0 2px, transparent 2px 12px);
  border: 1px solid rgba(212,160,23,0.25);
}

/* Webcam tile background (faux video on live table visual) */
.webcam-tile {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(212,160,23,0.18), transparent 50%),
    linear-gradient(135deg, #1c1c1f, #070707);
}


/* ═══════ AUTH MODAL ═══════ */

/* Override accent variable to match new gold palette (in case main.css uses it) */
:root { --accent: #d4a017; }

#auth-modal {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  background: rgba(0,0,0,0.75) !important;
  backdrop-filter: blur(6px) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}
#auth-modal.visible {
  display: flex !important;
  animation: fadeIn 0.25s ease;
}

/* modal-backdrop کلاس دیگر لازم نیست position بگیرد — خودِ #auth-modal این کار را می‌کند */
.modal-backdrop {
  /* این کلاس روی همان #auth-modal است — استایل‌ها بالا اعمال می‌شود */
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #141416;
  border: 1px solid rgba(212,160,23,0.2);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,160,23,0.1);
  animation: modalIn 0.3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  color: #9a9aaa;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.auth-tab.active {
  color: #d4a017;
  border-bottom-color: #d4a017;
}

.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 0.83rem;
  color: #9a9aaa;
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,160,23,0.15);
  border-radius: 8px;
  color: #f5f5f5;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: rgba(212,160,23,0.6);
  background: rgba(255,255,255,0.06);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* Buttons inside modal */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-sm { padding: 7px 14px; font-size: 0.83rem; }
.btn.btn-primary {
  background: linear-gradient(135deg, #ebc657, #d4a017);
  color: #0c0c0d;
}
.btn.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212,160,23,0.4);
}
.btn.btn-ghost {
  background: transparent;
  color: #f3d986;
  border: 1px solid rgba(212,160,23,0.3);
}
.btn.btn-ghost:hover {
  background: rgba(212,160,23,0.08);
  border-color: rgba(212,160,23,0.6);
}

.error-box {
  background: rgba(224,85,85,0.1);
  border: 1px solid rgba(224,85,85,0.25);
  border-radius: 8px;
  padding: 9px 14px;
  color: #e05555;
  font-size: 0.83rem;
  margin-bottom: 14px;
  display: none;
}

/* Google auth button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  margin-bottom: 14px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-google:hover {
  background: #f8f8f8;
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

/* TrustWallet TRON auth button */
.btn-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(51,208,144,0.18), rgba(35,155,255,0.18));
  color: #eefbf6;
  border: 1px solid rgba(67,221,158,0.35);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn-trust:hover {
  transform: translateY(-1px);
  border-color: rgba(67,221,158,0.6);
  box-shadow: 0 8px 22px rgba(35,155,255,0.16);
}
.trust-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  font-size: 0.95rem;
}

.auth-wallet-hint {
  font-size: 0.76rem;
  line-height: 1.7;
  color: #666;
  margin: -2px 0 14px;
}

.divider-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #666;
  font-size: 0.78rem;
}
.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.divider-or span { white-space: nowrap; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #0c0c0d;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ═══════ TOAST NOTIFICATIONS ═══════ */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  animation: toastIn 0.35s cubic-bezier(0.22,1,0.36,1),
             toastOut 0.4s ease 2.6s forwards;
  pointer-events: auto;
}
.toast-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.toast-error   { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.toast-info    { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(-30px); } }


/* ═══════ LOGGED-IN NAV ═══════ */
.chips-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(212,160,23,0.1);
  border: 1px solid rgba(212,160,23,0.3);
  color: #ebc657;
  font-size: 0.85rem;
  font-weight: 600;
}
.chips-display::before {
  content: '💰';
  font-size: 0.9rem;
}
