/* ==========================================
   Global Design System
   ========================================== */
:root {
  --bg-primary:    #0d0f1a;
  --bg-secondary:  #131629;
  --bg-card:       #1a1d32;
  --bg-card-hover: #1f2340;
  --bg-glass:      rgba(26, 29, 50, 0.85);

  --accent-gold:   #f5c842;
  --accent-blue:   #3b82f6;
  --accent-green:  #22c55e;
  --accent-red:    #ef4444;
  --accent-purple: #a855f7;
  --accent-teal:   #14b8a6;

  --text-primary:  #f0f2ff;
  --text-secondary:#9ba3c4;
  --text-muted:    #5e6785;

  --border:        rgba(255,255,255,0.07);
  --border-accent: rgba(59, 130, 246, 0.35);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.12);

  --font-main: 'Cairo', 'Tajawal', sans-serif;

  --ticker-h: 40px;
  --header-h: 72px;
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ==========================================
   Scrollbar
   ========================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-card-hover); border-radius: 3px; }

/* ==========================================
   Layout
   ========================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
   Ticker Bar
   ========================================== */
.ticker-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--ticker-h);
  background: linear-gradient(90deg, #0f1220, #131629);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}
.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-green);
  white-space: nowrap;
  border-left: 1px solid var(--border);
  height: 100%;
  background: rgba(34,197,94,0.08);
  flex-shrink: 0;
}
.ticker-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.ticker-track { flex: 1; overflow: hidden; height: 100%; }
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  font-size: 13px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}
.ticker-item .ti-code {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 11px;
}
.ticker-item .ti-price {
  font-weight: 600;
  color: var(--text-primary);
}
.ticker-item .ti-change.up { color: var(--accent-green); }
.ticker-item .ti-change.down { color: var(--accent-red); }

/* ==========================================
   Header
   ========================================== */
.site-header {
  position: fixed;
  top: var(--ticker-h);
  left: 0; right: 0;
  height: var(--header-h);
  background: rgba(13, 15, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.header-container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5c842, #e09c20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #0d0f1a;
  box-shadow: 0 4px 16px rgba(245,200,66,0.35);
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.logo-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.2s;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(59,130,246,0.12);
}
.nav-link.active {
  color: var(--accent-blue);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.update-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  white-space: nowrap;
}
.update-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 1.5s infinite;
}
.refresh-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(59,130,246,0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.refresh-btn svg { width: 16px; height: 16px; }
.refresh-btn:hover {
  background: rgba(59,130,246,0.22);
  transform: rotate(180deg);
}
.refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
}
.menu-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: 0.3s;
}

/* ==========================================
   Page padding for fixed header
   ========================================== */
body { padding-top: calc(var(--ticker-h) + var(--header-h)); }

/* ==========================================
   Sections
   ========================================== */
.hero-section {
  padding: 40px 0 32px;
  background: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 70%);
}
.section-block {
  padding: 48px 0;
}
.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-icon { font-size: 24px; }
.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}
.see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-blue);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
  transition: all 0.2s;
}
.see-all:hover { background: rgba(59,130,246,0.1); }

/* ==========================================
   Live Badge
   ========================================== */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.badge-live::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 1.5s infinite;
}
.badge-live--sm { font-size: 11px; }
.badge-live-off {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  color: var(--accent-red) !important;
}
.badge-live-off::before {
  background: var(--accent-red) !important;
  animation: none !important;
}

/* ==========================================
   Exchange Rates Grid
   ========================================== */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.rate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent-blue));
  opacity: 0;
  transition: opacity 0.3s;
}
.rate-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.rate-card:hover::before { opacity: 1; }
.rate-card.flash-update { animation: flashUpdate 0.6s ease; }
@keyframes flashUpdate {
  0% { border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.08); }
  100% { border-color: var(--border); background: var(--bg-card); }
}

.rate-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.currency-flag {
  font-size: 26px;
  line-height: 1;
}
.currency-code {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  padding: 3px 8px;
  border-radius: 5px;
}
.currency-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.rate-prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.rate-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rate-label {
  font-size: 11px;
  color: var(--text-muted);
}
.rate-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.rate-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.rate-change.up {
  color: var(--accent-green);
  background: rgba(34,197,94,0.1);
}
.rate-change.down {
  color: var(--accent-red);
  background: rgba(239,68,68,0.1);
}
.rate-change.neutral {
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
}

/* Progress bar */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 3px;
  transition: width 1s linear;
  width: var(--progress, 100%);
}
.progress-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 130px;
  text-align: left;
}

/* ==========================================
   Gold Section
   ========================================== */
.gold-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
.ounce-card {
  background: linear-gradient(135deg, #1a1610, #1e1c12);
  border: 1px solid rgba(245,200,66,0.2);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 0 40px rgba(245,200,66,0.06);
}
.ounce-icon { font-size: 48px; line-height: 1; }
.ounce-label {
  font-size: 13px;
  color: rgba(245,200,66,0.7);
  font-weight: 600;
}
.ounce-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent-gold);
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.ounce-change {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.karats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.karat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}
.karat-card:hover {
  border-color: rgba(245,200,66,0.3);
  background: var(--bg-card-hover);
}
.karat-badge {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5c842, #c9992a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: #0d0f1a;
  flex-shrink: 0;
}
.karat-info { flex: 1; }
.karat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.karat-prices {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.karat-syp {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.karat-usd {
  font-size: 12px;
  color: var(--text-secondary);
  direction: ltr;
  text-align: right;
}

/* ==========================================
   Silver Section
   ========================================== */
.silver-card {
  background: linear-gradient(135deg, #141820, #161b24);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.silver-icon { font-size: 56px; }
.silver-info h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.silver-info p { font-size: 13px; color: var(--text-muted); }
.silver-price-block {
  text-align: center;
}
.silver-usd {
  font-size: 32px;
  font-weight: 800;
  color: #94a3b8;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.silver-change {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================
   Crypto Section
   ========================================== */
.crypto-source-note {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.crypto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.crypto-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, var(--card-glow, rgba(59,130,246,0.04)), transparent 60%);
}
.crypto-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.crypto-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.crypto-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  flex-shrink: 0;
  overflow: hidden;
}
.crypto-logo img { width: 100%; height: 100%; object-fit: contain; }
.crypto-name-block { flex: 1; }
.crypto-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.crypto-symbol {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 1px;
}
.crypto-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.crypto-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.crypto-change {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}
.crypto-cap {
  font-size: 11px;
  color: var(--text-muted);
}
.crypto-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.crypto-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

/* ==========================================
   Energy Section
   ========================================== */
.energy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.energy-card {
  position: relative;
  background: rgba(20, 24, 32, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}
.energy-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(30, 36, 48, 0.8);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}
.energy-emoji {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1;
}
.energy-emoji::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  border-radius: 50%;
  z-index: -1;
  filter: blur(15px);
  opacity: 0.4;
  transition: all 0.4s ease;
}
.energy-card:hover .energy-emoji::before {
  opacity: 0.8;
  filter: blur(20px);
  transform: translate(-50%, -50%) scale(1.1);
}
.emoji-benzin::before { background: radial-gradient(circle, #f59e0b, transparent 70%); }
.emoji-diesel::before { background: radial-gradient(circle, #64748b, transparent 70%); }
.emoji-gas::before { background: radial-gradient(circle, #06b6d4, transparent 70%); }
.emoji-elec::before { background: radial-gradient(circle, #eab308, transparent 70%); }

.energy-info { flex: 1; position: relative; z-index: 2; }
.energy-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.energy-price-syp {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-primary);
  direction: ltr;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.energy-price-usd {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  direction: ltr;
  font-weight: 600;
}

/* ==========================================
   Converter Section
   ========================================== */
.converter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 780px;
  margin: 0 auto;
  box-shadow: var(--shadow-glow);
}
.converter-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.converter-field {
  flex: 1;
  min-width: 140px;
}
.converter-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.converter-input, .converter-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.converter-input:focus, .converter-select:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.converter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ba3c4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
  padding-left: 36px;
}
.swap-btn {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(59,130,246,0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent-blue);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-bottom: 0;
}
.swap-btn:hover {
  background: rgba(59,130,246,0.22);
  transform: rotate(180deg);
}
.converter-result {
  margin-top: 24px;
  text-align: center;
  padding: 24px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.result-amount {
  font-size: 36px;
  font-weight: 900;
  color: var(--accent-gold);
  direction: ltr;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.result-rate {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================
   News Section
   ========================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.25s;
  cursor: pointer;
}
.news-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.news-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}
.news-date {
  font-size: 11px;
  color: var(--text-muted);
}
.news-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-read-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  transition: gap 0.2s;
}
.news-card:hover .news-read-more { gap: 8px; }

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  background: #090b15;
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {}
.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.7;
}
.footer-links h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}
.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links ul li a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links ul li a:hover { color: var(--accent-blue); }
.footer-update h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}
.update-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--on {
  background: var(--accent-green);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
  animation: pulse 2s infinite;
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-data-note { color: rgba(245,200,66,0.5) !important; }

/* ==========================================
   Loading Skeleton
   ========================================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  height: 16px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================
   Toast Notification
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast--success { border-color: rgba(34,197,94,0.3); }
.toast--info { border-color: var(--border-accent); }
.toast-icon { font-size: 16px; }
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(20px); opacity: 0; }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
  .gold-layout { grid-template-columns: 1fr; }
  .ounce-card { flex-direction: row; justify-content: flex-start; text-align: right; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .silver-card { grid-template-columns: auto 1fr; }
  .silver-price-block { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--ticker-h) + var(--header-h));
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    z-index: 998;
  }
  .menu-toggle { display: flex; }
  .update-badge span { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .converter-row { flex-direction: column; }
  .swap-btn { align-self: center; }
  .rates-grid { grid-template-columns: 1fr 1fr; }
  .karats-grid { grid-template-columns: 1fr; }
  .gold-layout { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .rates-grid { grid-template-columns: 1fr; }
  .crypto-grid { grid-template-columns: 1fr; }
}
/* ==========================================
   Consumer Goods Section
   ========================================== */
.text-update-note {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.goods-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.goods-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.goods-category-title {
  padding: 12px 20px;
  background: rgba(59,130,246,.08);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-blue);
  letter-spacing: .5px;
}
.goods-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
}
.goods-item {
  padding: 16px 18px;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.goods-item:hover { background: var(--bg-card-hover); }
.goods-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.goods-emoji { font-size: 22px; }
.goods-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}
.goods-price-syp {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.goods-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.goods-price-usd {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
  margin-top: 2px;
}

/* ==========================================
   News Modal
   ========================================== */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.news-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp .25s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.news-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.news-modal-close:hover { background: rgba(239,68,68,.15); color: #ef4444; }
.news-modal-tag {
  display: inline-block;
  background: rgba(59,130,246,.15);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.news-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.news-modal-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.news-modal-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}
@media(max-width:600px) {
  .news-modal-box { padding: 24px; }
  .news-modal-title { font-size: 18px; }
}

.other-rates-details { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 16px; transition: all 0.3s ease; }
.other-rates-details[open] { background: rgba(255,255,255,0.04); }
.other-rates-summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 16px; font-weight: bold; color: var(--text-primary); list-style: none; user-select: none; }
.other-rates-summary::-webkit-details-marker { display: none; }
.other-rates-details[open] .other-rates-summary svg { transform: rotate(180deg); }

/* --- Compact Converter Overrides --- */
.converter-card { padding: 20px; max-width: 600px; }
.converter-input, .converter-select { padding: 10px 14px; font-size: 14px; height: 44px; }
.swap-btn { width: 40px; height: 40px; font-size: 18px; margin-bottom: 2px; }
.converter-result { padding: 16px; margin-top: 16px; }
.result-amount { font-size: 28px; }
@media (max-width: 768px) {
  .converter-row { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
  .converter-row .converter-field:first-child { grid-column: 1 / -1; }
  .converter-input, .converter-select { padding: 8px 10px; font-size: 13px; height: 40px; }
  .converter-select { background-position: left 8px center; padding-left: 28px; background-size: 14px; }
  .swap-btn { width: 36px; height: 36px; font-size: 16px; margin-bottom: 0; }
  .result-amount { font-size: 22px !important; }
}

/* ==========================================
   Chart Controls & Container
   ========================================== */
.chart-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.chart-select { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; outline: none; font-family: 'Cairo'; }
.chart-period-btns { display: flex; gap: 4px; background: rgba(255,255,255,0.02); padding: 4px; border-radius: 8px; border: 1px solid var(--border); }
.chart-period { background: transparent; border: none; color: var(--text-muted); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-family: 'Cairo'; font-size: 12px; font-weight: bold; transition: all 0.2s; }
.chart-period:hover { color: var(--text-primary); }
.chart-period.active { background: var(--accent-blue); color: #fff; }
.chart-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; height: 400px; position: relative; }

/* ==========================================
   Newsletter Section
   ========================================== */
.newsletter-banner { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1)); border: 1px solid var(--border-accent); border-radius: var(--radius-xl); padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.newsletter-content { display: flex; gap: 20px; align-items: flex-start; }
.newsletter-icon { font-size: 48px; line-height: 1; }
.newsletter-title { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-bottom: 8px; }
.newsletter-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-input { flex: 1; min-width: 200px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); padding: 14px 20px; border-radius: var(--radius-md); color: #fff; font-family: 'Cairo'; font-size: 14px; }
.newsletter-input:focus { border-color: var(--accent-blue); outline: none; }
.newsletter-btn { background: var(--accent-blue); color: #fff; border: none; padding: 14px 24px; border-radius: var(--radius-md); font-family: 'Cairo'; font-weight: bold; font-size: 15px; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.newsletter-btn:hover { background: #2563eb; }
.oauth-section { margin-top: 20px; }
.oauth-divider { display: flex; align-items: center; text-align: center; color: var(--text-muted); font-size: 12px; margin-bottom: 16px; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border); }
.oauth-divider span { padding: 0 10px; }
.oauth-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.oauth-btn { flex: 1; min-width: 150px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-md); font-family: 'Cairo'; font-size: 13px; font-weight: bold; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); }
.oauth-btn:hover { background: var(--bg-card-hover); }

/* ==========================================
   News Modal Extras (Carousel, Rating, Sharing)
   ========================================== */
.news-carousel { position: relative; overflow: hidden; border-radius: 8px; margin-bottom: 16px; }
.news-carousel-track { display: flex; transition: transform 0.4s ease; }
.news-carousel-track img { min-width: 100%; object-fit: cover; border-radius: 8px; }
.news-carousel-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.news-carousel-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: 0.3s; }
.news-carousel-dots .dot.active { background: #fff; transform: scale(1.2); }

.news-rating-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); text-align: center; }
.rating-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; font-weight: bold; }
.star-rating { display: inline-flex; flex-direction: row-reverse; font-size: 28px; color: #475569; gap: 4px; cursor: pointer; }
.star-rating .star:hover, .star-rating .star:hover ~ .star, .star-rating .star.selected { color: #f59e0b; }
.rating-email-row { display: flex; gap: 8px; max-width: 400px; margin: 16px auto 0; }
.rating-email-input { flex: 1; background: var(--bg-primary); border: 1px solid var(--border); padding: 10px 16px; border-radius: var(--radius-sm); color: #fff; font-family: 'Cairo'; font-size: 13px; }
.rating-email-row button { background: var(--accent-green); color: #fff; border: none; padding: 10px 16px; border-radius: var(--radius-sm); font-family: 'Cairo'; font-weight: bold; cursor: pointer; transition: 0.2s; }
.rating-email-row button:hover { background: #16a34a; }
.rating-stats { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.news-share-section { margin-top: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,0.02); padding: 12px; border-radius: 8px; }
.share-label { font-size: 13px; font-weight: bold; color: var(--text-primary); margin-left: 8px; }
.share-btn { padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: bold; cursor: pointer; border: none; display: flex; align-items: center; gap: 6px; transition: 0.2s; color: #fff; font-family: 'Cairo'; }
.share-fb { background: #1877f2; }
.share-wa { background: #25d366; }
.share-copy { background: #475569; }
.share-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }

@media (max-width: 900px) {
  .newsletter-banner { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
}

/* ==========================================
   Community Sentiment Widget
   ========================================== */
.sentiment-widget {
  transition: all 0.3s ease;
}

.sentiment-btn {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.sentiment-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sentiment-btn-bullish {
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
}

.sentiment-btn-bullish:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.12) !important;
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
  transform: translateY(-1px);
}

.sentiment-btn-bullish:active:not(:disabled) {
  transform: translateY(0);
}

.sentiment-btn-bearish {
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.sentiment-btn-bearish:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.sentiment-btn-bearish:active:not(:disabled) {
  transform: translateY(0);
}

.sentiment-progress-bar {
  height: 10px;
  width: 100%;
  background: #ef4444;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.sentiment-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #22c55e);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(34,197,94,0.5);
}

