/* ========================================
   BDPriceLive.com — Design System & Styles
   Premium Financial Dashboard Aesthetic
   Mobile-First Responsive Design
   ======================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+Bengali:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
  /* Colors */
  --gold: #D4AF37;
  --gold-light: #F5E6A3;
  --gold-dark: #B8960C;
  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F5E6A3 50%, #D4AF37 100%);
  --dark: #111827;
  --dark-700: #1F2937;
  --dark-600: #374151;
  --dark-500: #4B5563;
  --dark-400: #6B7280;
  --dark-300: #9CA3AF;
  --bg: #F9FAFB;
  --bg-alt: #F3F4F6;
  --white: #FFFFFF;
  --success: #16A34A;
  --success-bg: #DCFCE7;
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --info: #2563EB;
  --info-bg: #DBEAFE;
  --warning: #F59E0B;

  /* Typography */
  --font-bn: 'Noto Sans Bengali', sans-serif;
  --font-en: 'Inter', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-gold: 0 4px 14px rgba(212,175,55,0.25);

  /* Glass */
  --glass-bg: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.3);
  --glass-blur: 16px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index */
  --z-sticky: 100;
  --z-modal: 200;
  --z-toast: 300;
  --z-bottom-nav: 90;

  /* Container */
  --container-max: 1200px;
  --header-height: 64px;
  --bottom-nav-height: 64px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-bn);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: var(--bottom-nav-height);
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

ul, ol {
  list-style: none;
}

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--dark-400); }
.text-center { text-align: center; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

h1 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.375rem); }
h4 { font-size: 1.125rem; }

.section-title {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: var(--radius-full);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: var(--header-height);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-md);
}

.logo {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gold-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--dark);
  font-weight: 900;
  box-shadow: var(--shadow-gold);
}

.logo span {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop Nav */
.nav-desktop {
  display: none;
  gap: var(--space-xs);
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dark-500);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--dark);
  background: var(--bg-alt);
}

.nav-desktop a.active {
  color: var(--gold-dark);
  background: rgba(212,175,55,0.1);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.live-clock {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark-400);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: none;
}

@media (min-width: 768px) {
  .live-clock {
    display: block;
  }
}

.lang-switch {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gold);
  color: var(--gold-dark);
  background: rgba(212,175,55,0.08);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.lang-switch:hover {
  background: var(--gold);
  color: var(--white);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--dark);
  transition: background var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--bg-alt);
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.hamburger-icon {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Slide Menu */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.mobile-nav-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--white);
  z-index: 101;
  transition: right var(--transition-slow);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
}

.mobile-nav-panel.open {
  right: 0;
}

.mobile-nav-panel a {
  display: block;
  padding: var(--space-md) var(--space-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark-600);
  border-bottom: 1px solid var(--bg-alt);
  transition: all var(--transition-fast);
}

.mobile-nav-panel a:hover,
.mobile-nav-panel a.active {
  color: var(--gold-dark);
  padding-left: var(--space-md);
}

.mobile-nav-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--dark-400);
  background: var(--bg-alt);
}

/* ---------- Bottom Mobile Navigation ---------- */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0,0,0,0.06);
  z-index: var(--z-bottom-nav);
  height: var(--bottom-nav-height);
  padding: 0 var(--space-sm);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--dark-400);
  transition: color var(--transition-fast);
  padding: var(--space-xs);
  min-width: 0;
}

.bottom-nav a.active {
  color: var(--gold-dark);
}

.bottom-nav a svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.bottom-nav a span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1a2332 60%, #2d1f0e 100%);
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212,175,55,0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,175,55,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.hero h1 .gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--dark-300);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  max-width: 500px;
  margin: 0 auto var(--space-lg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(22,163,74,0.15);
  color: #4ADE80;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  animation: pulse-badge 2s ease-in-out infinite;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Price Cards Grid */
.price-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: calc(-1 * var(--space-2xl));
  position: relative;
  z-index: 2;
}

@media (min-width: 414px) {
  .price-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .price-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .price-cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.price-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.price-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.price-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.price-card:hover::before {
  opacity: 1;
}

.price-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.price-card-icon.gold-icon {
  background: rgba(212,175,55,0.12);
  color: var(--gold-dark);
}

.price-card-icon.silver-icon {
  background: rgba(156,163,175,0.15);
  color: var(--dark-500);
}

.price-card-icon.diamond-icon {
  background: rgba(37,99,235,0.1);
  color: var(--info);
}

.price-card-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark-400);
  margin-bottom: var(--space-xs);
}

.price-card-value {
  font-family: var(--font-en);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-card-value .currency {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-400);
}

.price-card-unit {
  font-size: 0.75rem;
  color: var(--dark-300);
  margin-bottom: var(--space-sm);
}

.price-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.price-change.up {
  background: var(--success-bg);
  color: var(--success);
}

.price-change.down {
  background: var(--danger-bg);
  color: var(--danger);
}

.price-change.neutral {
  background: var(--bg-alt);
  color: var(--dark-400);
}

.price-card-time {
  font-size: 0.7rem;
  color: var(--dark-300);
  margin-top: var(--space-sm);
}

/* ---------- Section Spacing ---------- */
.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--bg-alt);
}

/* ---------- Chart Section ---------- */
.chart-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.06);
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.chart-range-btns {
  display: flex;
  gap: var(--space-xs);
  background: var(--bg-alt);
  padding: 3px;
  border-radius: var(--radius-md);
}

.chart-range-btn {
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--dark-400);
  transition: all var(--transition-fast);
}

.chart-range-btn:hover {
  color: var(--dark);
}

.chart-range-btn.active {
  background: var(--white);
  color: var(--dark);
  box-shadow: var(--shadow-sm);
}

/* Unit Toggle Buttons (Gram/Vori/Ana/Rati) */
.unit-toggle-bar {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  background: var(--dark);
  padding: 6px;
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.unit-toggle-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  color: var(--dark-300);
  border: 1.5px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.unit-toggle-btn:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.15);
}

.unit-toggle-btn.active {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

@media (max-width: 414px) {
  .unit-toggle-btn {
    padding: 7px 12px;
    font-size: 0.75rem;
  }
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  min-height: 250px;
}

.chart-canvas-wrapper canvas {
  width: 100% !important;
  height: auto !important;
}

.chart-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--dark);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212,175,55,0.35);
}

.btn-secondary {
  background: var(--bg-alt);
  color: var(--dark-600);
  border: 1px solid rgba(0,0,0,0.08);
}

.btn-secondary:hover {
  background: var(--dark-300);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--dark-500);
  border: 1.5px solid rgba(0,0,0,0.12);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: rgba(212,175,55,0.05);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Comparison Cards ---------- */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .comparison-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.comparison-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.comparison-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.comparison-card h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.comparison-card .price {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: var(--space-xs);
}

/* ---------- Calculator ---------- */
.calc-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .calc-wrapper {
    grid-template-columns: 1fr 1fr;
  }
}

.calc-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.06);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-600);
  margin-bottom: var(--space-sm);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.purity-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.purity-option {
  text-align: center;
  padding: 10px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--dark-500);
}

.purity-option:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.purity-option.active {
  background: rgba(212,175,55,0.1);
  border-color: var(--gold);
  color: var(--gold-dark);
}

.calc-result {
  background: linear-gradient(135deg, var(--dark) 0%, #1a2332 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  color: var(--white);
  box-shadow: var(--shadow-xl);
}

.calc-result h3 {
  color: var(--gold-light);
  margin-bottom: var(--space-lg);
  font-size: 1.1rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.9rem;
  color: var(--dark-300);
}

.result-value {
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
}

.result-total {
  padding-top: var(--space-lg);
  margin-top: var(--space-sm);
  border-top: 2px solid var(--gold);
}

.result-total .result-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
}

.result-total .result-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
}

/* ---------- Table ---------- */
.table-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 14px center;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--gold);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table thead {
  background: var(--bg-alt);
}

.data-table th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--dark-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: color var(--transition-fast);
}

.data-table th:hover {
  color: var(--dark);
}

.data-table th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  font-size: 0.7rem;
}

.data-table th.sorted .sort-icon {
  opacity: 1;
  color: var(--gold-dark);
}

.data-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  font-family: var(--font-en);
  font-weight: 500;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(212,175,55,0.04);
}

.data-table .date-cell {
  font-weight: 600;
  color: var(--dark-600);
}

/* Table responsive */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-lg);
  border-top: 1px solid rgba(0,0,0,0.06);
}

.pagination button {
  min-width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-500);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover {
  background: var(--bg-alt);
  color: var(--dark);
}

.pagination button.active {
  background: var(--gold);
  color: var(--dark);
  box-shadow: var(--shadow-gold);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.blog-card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--dark) 0%, #2d1f0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 2.5rem;
  position: relative;
  overflow: hidden;
}

.blog-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(212,175,55,0.1) 100%);
}

.blog-card-body {
  padding: var(--space-lg);
}

.blog-card-date {
  font-size: 0.75rem;
  color: var(--dark-400);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.blog-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  color: var(--dark-400);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-top: var(--space-md);
  transition: gap var(--transition-fast);
}

.blog-card-link:hover {
  gap: 8px;
}

/* Blog Article View */
.article-view {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.06);
  max-width: 800px;
  margin: 0 auto;
}

.article-view h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
  color: var(--dark);
}

.article-view h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: 1.1rem;
}

.article-view p {
  margin-bottom: var(--space-md);
  color: var(--dark-600);
  line-height: 1.8;
}

.article-view ul, .article-view ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.article-view li {
  margin-bottom: var(--space-sm);
  color: var(--dark-600);
  line-height: 1.7;
  list-style: disc;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
}

.faq-question .faq-icon {
  font-size: 1.2rem;
  color: var(--gold);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 var(--space-lg) var(--space-lg);
}

.faq-answer p {
  font-size: 0.9rem;
  color: var(--dark-500);
  line-height: 1.7;
}

/* ---------- Alert Form ---------- */
.alert-section {
  background: linear-gradient(135deg, var(--dark) 0%, #1a2332 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.alert-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212,175,55,0.15), transparent 70%);
  border-radius: 50%;
}

.alert-section h3 {
  color: var(--white);
  margin-bottom: var(--space-sm);
  position: relative;
}

.alert-section p {
  color: var(--dark-300);
  margin-bottom: var(--space-lg);
  font-size: 0.9rem;
  position: relative;
}

.alert-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 450px;
  margin: 0 auto;
  position: relative;
}

.alert-form input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
}

.alert-form input::placeholder {
  color: var(--dark-400);
}

.alert-form input:focus {
  border-color: var(--gold);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: var(--dark-300);
  padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-about .logo {
  margin-bottom: var(--space-md);
  color: var(--white);
}

.footer-about .logo span {
  -webkit-text-fill-color: var(--gold);
}

.footer-about p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--dark-400);
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.footer ul li {
  margin-bottom: var(--space-sm);
}

.footer ul a {
  font-size: 0.85rem;
  color: var(--dark-400);
  transition: color var(--transition-fast);
}

.footer ul a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-400);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--dark);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--dark-500);
}

.footer-bottom a {
  color: var(--dark-400);
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* ---------- Page Header (sub-pages) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, #1a2332 60%, #2d1f0e 100%);
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212,175,55,0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: var(--space-sm);
  position: relative;
}

.page-header p {
  color: var(--dark-300);
  font-size: 0.95rem;
  position: relative;
}

/* ---------- Detail Page Layout ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .detail-grid {
    grid-template-columns: 280px 1fr;
  }
}

.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.detail-price-box {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.detail-price-box .label {
  font-size: 0.8rem;
  color: var(--dark-400);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.detail-price-box .price {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: var(--space-xs);
}

.detail-price-box .unit {
  font-size: 0.75rem;
  color: var(--dark-300);
}

.detail-main {
  min-width: 0;
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--space-md));
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--transition-base);
  white-space: nowrap;
}

@media (min-width: 769px) {
  .toast {
    bottom: var(--space-xl);
  }
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Loading Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, #e5e7eb 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: var(--space-sm);
}

.skeleton-price {
  height: 32px;
  width: 120px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* ---------- Print Styles ---------- */
@media print {
  .header, .bottom-nav, .footer, .chart-actions, .btn,
  .mobile-nav-overlay, .mobile-nav-panel, .toast, .alert-section {
    display: none !important;
  }

  body {
    padding: 0;
    background: white;
    color: black;
  }

  .price-card, .card, .chart-container, .table-wrapper {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  .hero {
    background: #333 !important;
    padding: var(--space-lg) 0;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--dark-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-400);
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(212,175,55,0.2);
  color: var(--dark);
}

/* ---------- Detail Page Price List ---------- */
.price-list-table {
  width: 100%;
}

.price-list-table tr {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.price-list-table td {
  padding: var(--space-md);
  font-size: 0.9rem;
}

.price-list-table td:first-child {
  font-weight: 600;
  color: var(--dark-600);
}

.price-list-table td:last-child {
  text-align: right;
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--dark);
}

/* ---------- Trend Badge ---------- */
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.trend-badge.up {
  background: var(--success-bg);
  color: var(--success);
}

.trend-badge.down {
  background: var(--danger-bg);
  color: var(--danger);
}

.trend-badge.neutral {
  background: var(--bg-alt);
  color: var(--dark-400);
}

/* ---------- Copy/Share Actions Row ---------- */
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
