/* =====================================================
   SAMRAT GOLD – Premium Gold Trading Platform CSS
   Dark luxury theme with glassmorphism & gold accents
   ===================================================== */

:root {
  --gold:        #D4AF37;
  --gold-light:  #F5D769;
  --gold-dark:   #9A7C1F;
  --bg-deep:     #0A0A0C;
  --bg-card:     rgba(255,255,255,0.04);
  --bg-card2:    rgba(212,175,55,0.07);
  --border:      rgba(212,175,55,0.18);
  --border2:     rgba(255,255,255,0.08);
  --text:        #F0EAD6;
  --text-muted:  #8A8070;
  --green:       #22C55E;
  --red:         #EF4444;
  --radius:      14px;
  --shadow:      0 8px 40px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── TICKER ── */
.ticker-wrapper {
  background: linear-gradient(90deg, #0d0d0d, #1a1500, #0d0d0d);
  border-bottom: 1px solid var(--border);
  height: 38px;
  overflow: hidden;
  position: relative;
  z-index: 200;
}
.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px;
  font-size: .78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.ticker-item .t-price { color: var(--gold-light); font-weight: 600; }
.ticker-item .t-up   { color: var(--green); }
.ticker-item .t-dn   { color: var(--red); }
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: #000;
  box-shadow: 0 0 14px rgba(212,175,55,.4);
}
.logo-text span { display: block; font-weight: 700; font-size: .9rem; color: var(--gold-light); letter-spacing: .1em; }
.logo-text small { font-size: .65rem; letter-spacing: .25em; color: var(--text-muted); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .2s;
}
.nav-link:hover, .nav-link.active { color: var(--gold-light); background: rgba(212,175,55,.1); }

.header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.btn-outline {
  padding: 7px 20px; border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold {
  padding: 7px 20px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none; color: #000;
  font-size: .85rem; font-weight: 700; cursor: pointer;
  transition: all .2s; box-shadow: 0 4px 16px rgba(212,175,55,.3);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(212,175,55,.5); }

.hamburger { display: none; background: none; border: none; color: var(--gold); font-size: 1.4rem; cursor: pointer; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 40%, rgba(212,175,55,.12) 0%, transparent 65%),
              url('https://images.unsplash.com/photo-1610375461369-d613b564f4c4?w=1600&q=80') center/cover no-repeat;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,.55) 0%, rgba(10,10,12,.9) 100%);
}
.hero-content { position: relative; z-index: 1; text-align: center; }

.live-price-card {
  background: rgba(10,10,12,0.7);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 56px;
  box-shadow: 0 20px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(212,175,55,.2);
  animation: floatCard 4s ease-in-out infinite;
}
@keyframes floatCard {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(212,175,55,.12); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 14px;
  font-size: .78rem; letter-spacing: .08em; color: var(--gold-light);
  margin-bottom: 16px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s ease infinite;
  display: inline-block;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.live-price {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  letter-spacing: -.02em;
  text-shadow: 0 0 40px rgba(212,175,55,.5);
}
.live-change {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; font-weight: 600;
  margin-top: 10px;
}
.live-change.positive { color: var(--green); }
.live-change.negative { color: var(--red); }
.live-meta {
  display: flex; justify-content: space-between; gap: 32px;
  margin-top: 16px; font-size: .78rem; color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ── CONTAINER ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 40px;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ── RATES STRIP ── */
.rates-strip { padding: 72px 0; }
.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  transition: all .25s;
  position: relative; overflow: hidden;
}
.rate-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.rate-card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 32px rgba(212,175,55,.15); }
.rate-label { font-size: .72rem; letter-spacing: .12em; color: var(--text-muted); text-transform: uppercase; }
.rate-value { font-family: 'JetBrains Mono', monospace; font-size: 1.35rem; font-weight: 700; color: var(--gold-light); margin: 6px 0; }
.rate-change { font-size: .78rem; font-weight: 600; }
.rate-change.up { color: var(--green); }
.rate-change.dn { color: var(--red); }

/* ── MARKET DEPTH ── */
.depth-section { padding: 72px 0; background: rgba(212,175,55,.03); }
.depth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.depth-card {
  background: rgba(10,10,12,.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
}
.depth-heading {
  font-size: 1rem; font-weight: 600; margin-bottom: 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border2);
}
.depth-heading.buyers { color: var(--green); }
.depth-heading.sellers { color: var(--red); }
.depth-table { width: 100%; border-collapse: collapse; }
.depth-table th {
  font-size: .72rem; letter-spacing: .1em; color: var(--text-muted);
  text-align: left; padding: 6px 8px 10px; border-bottom: 1px solid var(--border2);
}
.depth-table td { padding: 10px 8px; font-size: .88rem; font-family: 'JetBrains Mono', monospace; }
.depth-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.04); transition: background .15s; }
.depth-table tbody tr:hover { background: rgba(212,175,55,.06); }
.depth-table td:last-child { color: var(--gold-light); font-weight: 600; }

/* ── TRADE SECTION ── */
.trade-section { padding: 72px 0; }
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.trade-card {
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.buy-card  { background: rgba(34,197,94,.07); border-color: rgba(34,197,94,.25); }
.sell-card { background: rgba(239,68,68,.07);  border-color: rgba(239,68,68,.25); }
.trade-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.buy-card h3  { color: var(--green); }
.sell-card h3 { color: var(--red); }
.trade-price {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 900;
  color: var(--gold-light); margin-bottom: 20px;
}
.trade-card label { font-size: .8rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.trade-input {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text);
  font-size: .95rem; outline: none;
  transition: border .2s; margin-bottom: 12px;
}
.trade-input:focus { border-color: var(--gold); }
.trade-total {
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem; color: var(--text-muted);
  margin-bottom: 16px; padding: 10px 14px;
  background: rgba(255,255,255,.03); border-radius: 8px;
}
.btn-buy {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #22C55E, #166534);
  border: none; border-radius: 10px;
  color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all .2s; letter-spacing: .05em;
}
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(34,197,94,.4); }
.btn-sell {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #EF4444, #7F1D1D);
  border: none; border-radius: 10px;
  color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all .2s; letter-spacing: .05em;
}
.btn-sell:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239,68,68,.4); }

/* ── CHART ── */
.chart-section { padding: 72px 0; background: rgba(212,175,55,.03); }
.chart-sub { text-align: center; color: var(--text-muted); font-size: .85rem; margin-top: -28px; margin-bottom: 32px; }
.chart-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tab {
  padding: 7px 20px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--border2);
  color: var(--text-muted); font-size: .85rem; cursor: pointer;
  transition: all .2s;
}
.tab.active, .tab:hover { background: rgba(212,175,55,.15); border-color: var(--gold); color: var(--gold-light); }
.chart-wrapper {
  background: rgba(10,10,12,.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px; max-height: 380px;
}

/* ── CONTACT ── */
.contact-section { padding: 72px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 900px; margin: 0 auto; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info p { font-size: .95rem; color: var(--text-muted); line-height: 1.6; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input,
.contact-form textarea {
  padding: 12px 16px; background: var(--bg-card);
  border: 1px solid var(--border2); border-radius: 8px;
  color: var(--text); font-size: .9rem; outline: none;
  font-family: 'Inter', sans-serif; resize: vertical;
  transition: border .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--gold); }

/* ── FOOTER ── */
.footer { padding: 40px 0; border-top: 1px solid var(--border); text-align: center; }

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.modal {
  background: #111014;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  position: relative;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity:0 } to { transform: translateY(0); opacity:1 } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; transition: color .2s;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--gold-light); margin-bottom: 6px; }
.modal-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 24px; }
.modal-input {
  display: block; width: 100%;
  padding: 12px 16px; margin-bottom: 14px;
  background: var(--bg-card); border: 1px solid var(--border2);
  border-radius: 10px; color: var(--text); font-size: .9rem;
  outline: none; transition: border .2s;
}
.modal-input:focus { border-color: var(--gold); }
.modal-footer { text-align: center; font-size: .82rem; color: var(--text-muted); margin-top: 18px; }
.modal-footer a { color: var(--gold); text-decoration: none; }
.w100 { width: 100%; margin-top: 4px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #1a1a1a; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 20px;
  font-size: .88rem; color: var(--text);
  transform: translateY(80px); opacity: 0;
  transition: all .3s; pointer-events: none;
  box-shadow: var(--shadow);
  min-width: 220px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: rgba(10,10,12,.97); padding: 16px; gap: 4px; border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .header-inner { position: relative; }
  .hamburger { display: block; }
  .depth-grid, .trade-grid, .contact-grid { grid-template-columns: 1fr; }
  .live-price-card { padding: 28px 28px; }
}
@media (max-width: 600px) {
  .rates-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 1.4rem; }
}
