/* ============================================================
   GRAM TO TOLA — Premium Design System
   Primary keyword: Gram to Tola | 1 Tola = 11.6638038 grams
   ============================================================ */

/* Fonts loaded via <link> in HTML for faster rendering */

/* ─── CSS Custom Properties ──────────────────────────────── */
:root {
  --bg-primary: #050510;
  --bg-secondary: #0a0b1e;
  --bg-mesh: radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(15, 20, 50, 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(180, 120, 20, 0.05) 0px, transparent 50%);

  --gold: #d4af37;
  --gold-primary: #d4af37;
  --gold-light: #f4d03f;
  --gold-dark: #9a7d0a;
  --gold-linear: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #9a7d0a 100%);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.15);

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(212, 175, 55, 0.1);
  --glass-border-hover: rgba(212, 175, 55, 0.25);

  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(212, 175, 55, 0.3);

  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.04);

  --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.1);

  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;

  --max-w: 1280px;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font-body: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--gold-light);
}

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

ul {
  list-style: none;
}

/* Hide number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-gold {
  background: var(--gold-linear);
  color: #050510;
  border-color: var(--gold-dark);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
  color: #050510;
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-focus);
}

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* ─── Navigation ─────────────────────────────────────────── */
.market-ticker {
  background: #02020a;
  border-bottom: 1px solid var(--glass-border);
  height: 48px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 101;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.ticker-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ticker-wrapper::-webkit-scrollbar {
  display: none;
}

.ticker-content {
  display: flex;
  gap: 40px;
  white-space: nowrap;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-label {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.ticker-value {
  color: var(--gold-light);
  font-family: var(--font-body);
  font-weight: 600;
  transition: color 0.3s ease;
}

.ticker-value.loading {
  opacity: 0.5;
  font-style: italic;
}

.ticker-value.loaded {
  opacity: 1;
  font-style: normal;
}

.ticker-value.positive {
  color: #4ade80;
}

.ticker-value.negative {
  color: #f87171;
}

.navbar {
  background: rgba(5, 5, 20, 0.8);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 48px;
  z-index: 100;
  height: 80px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease, height 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar.scrolled {
  height: 72px;
  background: rgba(5, 5, 20, 0.95);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-primary);
}

.nav-links a.nav-highlight {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-focus);
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--gold);
  font-weight: 600;
}

.nav-links a.nav-highlight::after {
  display: none;
}

.nav-links a.nav-highlight:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  border: none;
  background: transparent;
  z-index: 110;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero / Page Header ─────────────────────────────────── */
.page-hero {
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-premium {
  padding: 100px 24px 80px;
}

.hero-bg-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-focus);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.pulsing-badge {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
  50% { box-shadow: 0 0 20px 4px rgba(212, 175, 55, 0.15); }
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  background: var(--gold-linear);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

.page-hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}

/* ─── Layout & Grid ──────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container .section {
  padding-left: 0;
  padding-right: 0;
}

.relative-z {
  position: relative;
  z-index: 5;
}

.section {
  padding: 56px 24px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.section-sm {
  padding: 40px 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 32px;
}

.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* ─── Cards / Glassmorphism ──────────────────────────────── */
.card,
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover,
.glass-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--gold-glow);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transition: 0.6s;
}

.card:hover::before {
  left: 100%;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Converter Widget ───────────────────────────────────── */
.converter-widget {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 48px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), var(--gold-glow);
  max-width: 650px;
  margin: -20px auto 80px;
  position: relative;
  z-index: 10;
}

.converter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.converter-input-group {
  display: flex;
  align-items: stretch;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  transition: var(--transition);
  overflow: visible;
}

.converter-input-group:focus-within {
  border-color: var(--gold-primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.08);
}

.converter-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 20px 24px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-body);
  width: 100%;
  min-width: 0;
}

.converter-input-group input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.converter-unit-select {
  border-left: 1px solid var(--glass-border);
  background: rgba(212, 175, 55, 0.03);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 1.05rem;
  transition: var(--transition);
  position: relative;
  user-select: none;
  flex-shrink: 0;
}

.converter-unit-select:hover {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-light);
}

/* Static unit display (for gold price page) */
.converter-unit {
  border-left: 1px solid var(--glass-border);
  background: rgba(212, 175, 55, 0.03);
  padding: 0 24px;
  display: flex;
  align-items: center;
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.converter-formula {
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.converter-formula span {
  color: var(--gold);
  font-weight: 600;
}

.unit-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: rgba(5, 5, 20, 0.98);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--radius-md);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 1000;
  display: none;
  flex-direction: column;
  padding: 10px;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition);
}

.unit-dropdown-menu.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.unit-option {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.unit-option:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-light);
  padding-left: 22px;
}

.unit-option.selected {
  color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.05);
  font-weight: 700;
}

.converter-arrow {
  text-align: center;
  margin: -8px 0 8px;
  font-size: 1.5rem;
  color: var(--gold-primary);
}

.btn-swap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -16px auto 16px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  font-size: 1.4rem;
}

.glass-btn {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.btn-swap:hover {
  transform: scale(1.1) rotate(180deg);
  border-color: var(--gold-light);
  box-shadow: var(--gold-glow);
  background: rgba(212, 175, 55, 0.05);
}

.converter-result {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  margin-top: 8px;
}

.result-value {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold-light);
  font-family: var(--font-display);
  display: block;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  word-break: break-word;
}

.result-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-weight: 700;
}

/* ─── Quick Calc Buttons ─────────────────────────────────── */
.quick-calc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  justify-content: center;
}

.quick-calc-btn {
  padding: 8px 16px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.quick-calc-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.quick-calc-btn.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Conversion Table ───────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

thead tr {
  background: rgba(212, 175, 55, 0.1);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

td {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tr:last-child td {
  border-bottom: none;
}

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

td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

td strong {
  color: var(--gold);
}

/* ─── Blog Cards & Carousel ──────────────────────────────── */
.blog-card {
  display: block;
  height: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.blog-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--gold-primary);
  box-shadow: var(--gold-glow);
  transform: translateY(-8px);
}

.blog-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 99px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.read-more, .blog-cta {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  transition: var(--transition);
}

.blog-card:hover .read-more,
.blog-card:hover .blog-cta {
  color: var(--gold-light);
  transform: translateX(4px);
}

/* ─── Stat Boxes ─────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
}

.stat-box:hover {
  border-color: rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-gold);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Highlight Box (global, not just in .prose) ─────────── */
.highlight-box {
  background: rgba(212, 175, 55, 0.07);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.highlight-box strong {
  color: var(--gold);
}

/* ─── Info / Content Prose ───────────────────────────────── */
.prose {
  max-width: 800px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 28px 0 10px;
  font-weight: 600;
}

.prose p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.prose ul,
.prose ol {
  padding-left: 20px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.prose strong {
  color: var(--text-primary);
}

.prose .highlight-box {
  margin: 24px 0;
}

.prose .highlight-box strong {
  color: var(--gold);
}

/* ─── FAQ Accordion ──────────────────────────────────────── */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover {
  border-color: rgba(212, 175, 55, 0.25);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: color var(--transition);
  user-select: none;
  gap: 12px;
}

.faq-question:hover {
  color: var(--gold);
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: transform var(--transition);
  font-size: 1.2rem;
  font-weight: 300;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.75;
  padding: 0 24px;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 24px 20px;
}

/* ─── Country Cards ──────────────────────────────────────── */
.country-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition);
}

.country-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  background: var(--bg-card-hover);
}

.country-flag {
  font-size: 2rem;
  flex-shrink: 0;
}

.country-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.country-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Timeline ───────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 700px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.timeline-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Related Articles / Link Grid ──────────────────────── */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.related-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.06);
  transform: translateX(3px);
}

.related-link svg {
  flex-shrink: 0;
}

/* ─── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 16px 0 0;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.breadcrumb .sep {
  color: var(--text-muted);
  opacity: 0.4;
}

.breadcrumb .current {
  color: var(--gold);
}

/* ─── CTA Strip ──────────────────────────────────────────── */
.cta-strip {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  margin: 48px 0;
}

.cta-strip h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.cta-strip p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

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

/* ─── Utility Classes ────────────────────────────────────── */
.text-gold {
  color: var(--gold);
}

.text-center {
  text-align: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.gap-8 {
  gap: 8px;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 48px 0;
}

/* ─── Scroll Animations ──────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Quick reference badges ─────────────────────────────── */
.ref-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 4px;
}

.ref-pill strong {
  color: var(--gold);
}

/* ─── Language Selector ──────────────────────────────────── */
.lang-selector {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-code {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: inherit;
}

.lang-chevron {
  transition: transform var(--transition);
  opacity: 0.7;
}

.lang-btn[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), var(--shadow-gold);
  z-index: 999;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-search-wrap {
  padding: 10px 10px 6px;
  border-bottom: 1px solid var(--border);
}

.lang-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}

.lang-search::placeholder {
  color: var(--text-muted);
}

.lang-search:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.08);
}

.lang-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.2) transparent;
  list-style: none;
}

.lang-list::-webkit-scrollbar {
  width: 4px;
}

.lang-list::-webkit-scrollbar-track {
  background: transparent;
}

.lang-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 4px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background var(--transition);
  border-radius: 0;
}

.lang-option:hover {
  background: rgba(212, 175, 55, 0.07);
}

.lang-option.active {
  background: rgba(212, 175, 55, 0.12);
}

.lang-option.active .lang-name {
  color: var(--gold);
  font-weight: 600;
}

.lang-name {
  font-size: 0.83rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.lang-no-results {
  padding: 16px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* RTL support */
[dir="rtl"] .nav-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .related-link:hover {
  transform: translateX(-3px);
}

[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 32px;
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 6px;
}

[dir="rtl"] .timeline-dot {
  left: auto;
  right: -29px;
}

[dir="rtl"] .prose .highlight-box,
[dir="rtl"] .highlight-box {
  border-left: none;
  border-right: 3px solid var(--gold);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* ─── LSI Semantic Footer Block ──────────────────────────── */
.lsi-footer-block {
  padding: 48px 0;
  margin-top: 80px;
  border-top: 1px dashed var(--glass-border);
  background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, 0.03));
}

.lsi-title {
  font-size: 0.85rem;
  color: var(--gold-primary);
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
}

.lsi-grid {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 2.2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
}

.lsi-grid a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.lsi-grid a:hover {
  color: var(--gold-light);
}

/* ─── Swiper Carousel Overrides ──────────────────────────── */
.swiper-pagination-bullet {
  background: var(--text-muted);
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  background: var(--gold);
  opacity: 1;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 5, 20, 0.98);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 24px;
    gap: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(212, 175, 55, 0.08);
  }

  .nav-links a.nav-highlight {
    margin-top: 8px;
    text-align: center;
  }

  .hamburger {
    display: flex;
  }

  .navbar {
    height: auto;
    min-height: 64px;
    position: sticky;
  }

  .nav-inner {
    flex-wrap: nowrap;
    height: auto;
    padding: 16px 24px;
    min-height: 64px;
    gap: 8px;
  }

  .nav-actions {
    gap: 4px;
  }

  .nav-actions .lang-btn {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .nav-actions .lang-code {
    display: none;
  }

  .nav-actions .lang-chevron {
    display: none;
  }

  .nav-actions .nav-search-btn {
    width: 32px;
    height: 32px;
  }

  .search-overlay {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    padding: 16px;
  }

  .converter-widget {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    margin: -10px auto 40px;
  }

  .converter-input-group input {
    padding: 16px 18px;
    font-size: 1.4rem;
  }

  .converter-unit-select {
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .converter-unit {
    padding: 0 16px;
    font-size: 0.85rem;
  }

  .btn-swap {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .result-value {
    font-size: 2.2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .page-hero {
    padding: 48px 16px 40px;
  }

  .hero-premium {
    padding: 60px 16px 50px;
  }

  .page-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticker-content {
    gap: 24px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lsi-footer-block {
    margin-top: 40px;
    padding: 32px 0;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 1.2rem;
  }

  .result-value {
    font-size: 1.8rem;
  }

  .converter-input-group input {
    padding: 14px 16px;
    font-size: 1.2rem;
  }

  .converter-result {
    padding: 28px 16px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-box {
    padding: 16px 12px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .quick-calc-btn {
    padding: 6px 12px;
    font-size: 0.72rem;
  }

  .blog-card {
    padding: 20px;
  }

  .blog-card h3 {
    font-size: 1.15rem;
  }

  .cta-strip {
    padding: 28px 20px;
  }
}

/* Responsive language selector */
@media (max-width: 680px) {
  .lang-dropdown {
    right: 0;
    left: auto;
    width: 220px;
  }

  .lang-btn {
    padding: 6px 10px;
  }
}

/* ─── Print Styles ───────────────────────────────────────── */
@media print {
  .navbar,
  .market-ticker,
  footer,
  .lsi-footer-block,
  .hamburger,
  .cta-strip,
  .hero-badge {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .page-hero h1 {
    -webkit-text-fill-color: #333;
    color: #333;
  }

  .chatbot-btn,
  .chatbot-panel,
  .back-to-top,
  .nav-search {
    display: none !important;
  }
}

/* ─── Back to Top Button ───────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--gold);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
}

/* ─── Navbar Actions (Search + Translate group) ───────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ─── Navbar Search ────────────────────────────────────── */
.nav-search {
  position: relative;
  flex-shrink: 0;
}

.nav-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.nav-search-btn:hover {
  color: var(--gold);
  border-color: var(--border);
  background: rgba(212, 175, 55, 0.06);
}

.search-overlay {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  z-index: 999;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  padding: 12px;
}

.search-overlay.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}

.search-input::placeholder {
  color: var(--text-muted);
}

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

.search-submit {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.search-submit:hover {
  background: rgba(212, 175, 55, 0.2);
}

/* ─── Footer Social Links ──────────────────────────────── */
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.footer-social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ─── DMCA Badge ───────────────────────────────────────── */
.dmca-badge {
  margin-top: 4px;
}

.dmca-badge a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all var(--transition);
}

.dmca-badge a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Chatbot ───────────────────────────────────────────── */
.chatbot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-linear);
  border: none;
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chatbot-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(212, 175, 55, 0.5);
}

.chatbot-btn svg {
  width: 26px;
  height: 26px;
  fill: #050510;
}

.chatbot-btn .chatbot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f87171;
  border: 2px solid #050510;
  display: none;
}

.chatbot-btn .chatbot-badge.show {
  display: block;
  animation: chatbot-pulse 1.5s ease-in-out 3;
}

@keyframes chatbot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* Panel */
.chatbot-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  height: 520px;
  border-radius: var(--radius-lg);
  background: rgba(10, 11, 30, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.chatbot-panel.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Header */
.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 5, 16, 0.6);
  flex-shrink: 0;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-linear);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-header-avatar svg {
  width: 16px;
  height: 16px;
  fill: #050510;
}

.chatbot-header-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chatbot-header-sub {
  font-size: 0.7rem;
  color: var(--gold);
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.chatbot-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* Messages */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 4px;
}

.chatbot-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
  animation: chatbot-msg-in 0.25s ease;
}

@keyframes chatbot-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chatbot-msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
  align-self: flex-end;
  background: var(--gold-dark);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot-msg a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chatbot-msg a:hover {
  color: var(--gold);
}

.chatbot-msg strong {
  color: var(--gold-light);
  font-weight: 600;
}

/* Price card inside message */
.chatbot-price-card {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatbot-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.chatbot-price-label {
  color: var(--text-secondary);
}

.chatbot-price-value {
  color: var(--gold-light);
  font-weight: 600;
  font-family: var(--font-mono, 'Inter', monospace);
}

/* Conversion result */
.chatbot-conv-result {
  background: rgba(212, 175, 55, 0.1);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  margin-top: 6px;
}

.chatbot-conv-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  font-family: var(--font-display);
}

.chatbot-conv-formula {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Quick-reply chips */
.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chatbot-chip {
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.chatbot-chip:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
}

/* Typing indicator */
.chatbot-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  align-self: flex-start;
}

.chatbot-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: chatbot-typing-dot 1.2s infinite;
}

.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatbot-typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* Input area */
.chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(5, 5, 16, 0.4);
  flex-shrink: 0;
}

.chatbot-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.chatbot-input::placeholder {
  color: var(--text-muted);
}

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

.chatbot-send {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gold-linear);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-send:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
}

.chatbot-send svg {
  width: 18px;
  height: 18px;
  fill: #050510;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .chatbot-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .chatbot-btn {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}

@media (min-width: 481px) and (max-width: 680px) {
  .chatbot-panel {
    width: 340px;
    height: 460px;
    right: 16px;
    bottom: 80px;
  }
}
