/* ==========================================================================
   Vietnam Bullion & Jewelry (VBJ) - Premium Modern CSS Stylesheet
   ========================================================================== */

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

/* --- Design Tokens / Variables --- */
:root {
  /* Colors */
  --bg-main: #090a0f;
  --bg-card: #12141c;
  --bg-card-hover: #181c28;
  --bg-input: #1b1e2a;
  --bg-header: rgba(9, 10, 15, 0.85);
  --bg-header-scrolled: rgba(9, 10, 15, 0.98);
  --bg-footer: #050608;
  --bg-news-section: #0b0c11;
  --footer-border: rgba(255, 255, 255, 0.05);
  --social-icon-bg: rgba(255, 255, 255, 0.03);
  --social-icon-border: rgba(255, 255, 255, 0.05);
  --bg-ticker: #050608;
  --ticker-border: rgba(255, 255, 255, 0.05);
  --hero-title-gradient: linear-gradient(180deg, #ffffff 0%, #a5b4fc 100%);
  
  --gold-primary: #d4af37;
  --gold-light: #f3e5ab;
  --gold-dark: #aa8513;
  --gold-gradient: linear-gradient(135deg, #f3e5ab 0%, #d4af37 50%, #aa8513 100%);
  --gold-glow: rgba(212, 175, 55, 0.25);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --price-up: #10b981;
  --price-up-bg: rgba(16, 185, 129, 0.1);
  --price-down: #ef4444;
  --price-down-bg: rgba(239, 68, 68, 0.1);
  
  --border-color: rgba(212, 175, 55, 0.15);
  --border-color-hover: rgba(212, 175, 55, 0.35);
  
  /* Layout */
  --max-width: 1280px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.05);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Light Theme Variables --- */
[data-theme="light"] {
  --bg-main: #f5f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3f9;
  --bg-input: #f8fafc;
  --bg-header: rgba(255, 255, 255, 0.85);
  --bg-header-scrolled: rgba(255, 255, 255, 0.98);
  --bg-footer: #e1e4ed;
  --bg-news-section: #eaecf3;
  --footer-border: rgba(0, 0, 0, 0.08);
  --social-icon-bg: rgba(0, 0, 0, 0.03);
  --social-icon-border: rgba(0, 0, 0, 0.08);
  --bg-ticker: #eaecf3;
  --ticker-border: rgba(0, 0, 0, 0.08);
  --hero-title-gradient: linear-gradient(180deg, #12141c 0%, #1e293b 100%);
  
  --text-primary: #12141c;
  --text-secondary: #4b5563;
  --text-muted: #8b94a0;
  
  --border-color: rgba(212, 175, 55, 0.25);
  --border-color-hover: rgba(212, 175, 55, 0.5);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 0 30px rgba(212, 175, 55, 0.08);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

ul {
  list-style: none;
}

input, select, button {
  font-family: inherit;
  font-size: 1rem;
  background: none;
  border: none;
  outline: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Top Ticker Bar --- */
.ticker-bar {
  background-color: var(--bg-ticker);
  border-bottom: 1px solid var(--ticker-border);
  height: 40px;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  overflow: hidden;
  color: var(--text-secondary);
}

.ticker-container {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  overflow: hidden;
  gap: 16px;
}

.ticker-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.ticker-marquee {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: marquee 25s linear infinite;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

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

.ticker-label {
  color: var(--text-primary);
  font-weight: 600;
}

.ticker-value {
  color: var(--text-secondary);
}

.ticker-change {
  display: flex;
  align-items: center;
  font-weight: 600;
}

.ticker-change.up { color: var(--price-up); }
.ticker-change.down { color: var(--price-down); }

/* --- Header & Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

header.scrolled {
  background: var(--bg-header-scrolled);
  box-shadow: var(--shadow-md);
  border-bottom-color: rgba(212, 175, 55, 0.25);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--gold-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-main);
  font-weight: 800;
  font-size: 1.25rem;
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 0 15px var(--gold-glow);
}

.logo-text h1 {
  font-size: 1.4rem;
  line-height: 1.1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

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

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-contact {
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-normal);
}

.btn-contact:hover {
  background: var(--gold-gradient);
  color: var(--bg-main);
  box-shadow: 0 0 15px var(--gold-glow);
  border-color: transparent;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* --- Hero Banner --- */
.hero-banner {
  padding: 60px 0 30px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-content h2 {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 20px;
  background: var(--hero-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content h2 span {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 600px;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hero-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-normal);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--gold-primary);
}

.feature-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.feature-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.hero-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-widget::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--gold-gradient);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.3;
}

.widget-title {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.world-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.world-price-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition-fast);
}

.world-price-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-color-hover);
}

.world-price-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.world-price-val {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin: 6px 0;
}

.world-price-converted {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Main Layout Section --- */
.main-layout {
  padding: 40px 0 80px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
}

/* Cards & Section headers */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  transition: border-color var(--transition-fast);
}

.section-card:hover {
  border-color: var(--border-color-hover);
}

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

.section-title {
  font-size: 1.3rem;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.section-title i {
  flex-shrink: 0;
  margin-top: 3px;
}

.section-title span {
  color: var(--gold-primary);
}

.update-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Styled Tables --- */
.table-container {
  width: 100%;
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.price-table th {
  padding: 14px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.05em;
  background-color: rgba(255, 255, 255, 0.01);
}

.price-table td {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.price-table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

.brand-cell {
  font-weight: 600;
  color: var(--text-primary);
}

.brand-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.price-cell {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

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

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

.trend-badge.neutral {
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- Widgets & Calculators --- */
.calculator-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.input-wrapper {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

.input-wrapper input {
  width: 100%;
  padding-right: 30px;
}

.input-wrapper select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.input-wrapper select option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.input-wrapper .unit {
  position: absolute;
  right: 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.calc-result-box {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(18, 20, 28, 0.5) 100%);
  border: 1px dashed var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 10px;
  text-align: center;
}

.calc-result-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.calc-result-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--gold-primary);
  margin: 6px 0;
}

.calc-result-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Charts Wrapper */
.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

.chart-filters {
  display: flex;
  gap: 8px;
}

.btn-filter {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.btn-filter:hover, .btn-filter.active {
  background: var(--gold-gradient);
  color: var(--bg-main);
  border-color: transparent;
  font-weight: 600;
}

/* TradingView Widget Custom Styling Wrapper */
.tv-widget-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

/* --- News Grid Section --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-md);
}

.news-img {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.news-card:hover .news-img img {
  transform: scale(1.05);
}

.news-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold-gradient);
  color: var(--bg-main);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.news-title {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition-fast);
}

.news-card:hover .news-title {
  color: var(--gold-primary);
}

.news-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-readmore {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-readmore::after {
  content: '→';
  transition: var(--transition-fast);
}

.news-card:hover .news-readmore::after {
  transform: translateX(4px);
}

/* --- Footer --- */
footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  color: var(--text-secondary);
  transition: var(--transition-normal);
}

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

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.6;
}

.footer-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gold-gradient);
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold-primary);
  padding-left: 4px;
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.contact-icon {
  color: var(--gold-primary);
  font-size: 1.1rem;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  transition: var(--transition-normal);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 36px;
  height: 36px;
  background: var(--social-icon-bg);
  border: 1px solid var(--social-icon-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.social-icon:hover {
  background: var(--gold-gradient);
  color: var(--bg-main);
  transform: translateY(-2px);
  border-color: transparent;
}

/* --- Search Filter and Toggles on Subpages --- */
.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.search-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  width: 100%;
}

.search-bar input {
  width: 100%;
  color: var(--text-primary);
}

.search-bar i {
  color: var(--text-muted);
}

/* Custom dropdown selector styling */
.custom-select-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.custom-select-wrapper select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

/* --- Animations --- */
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Media Queries --- */
@media (min-width: 769px) {
  nav {
    display: block !important;
  }
}

@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* --- Shorter Header for Mobile --- */
  .header-wrapper {
    height: 64px;
  }
  
  .logo-text span {
    display: none; /* Hide subtitle to fit space */
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .logo-text h1 {
    font-size: 1.25rem;
  }

  /* --- Mobile Navigation Dropdown Menu --- */
  nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: var(--bg-header-scrolled);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    z-index: 99;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  nav a {
    display: block;
    padding: 10px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }
  
  [data-theme="light"] nav a {
    border-bottom-color: rgba(0, 0, 0, 0.03);
  }
  
  nav a::after {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }

  /* --- Mobile CTA Hotline Icon Button Only --- */
  .header-actions {
    gap: 12px;
  }
  
  .header-actions .btn-contact {
    font-size: 0 !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: var(--border-color);
  }
  
  .header-actions .btn-contact i {
    font-size: 0.95rem !important;
    margin: 0 !important;
  }

  .btn-theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  /* --- Hero Typography and Paddings --- */
  .hero-banner {
    padding: 40px 0 20px;
  }
  
  .hero-content h2 {
    font-size: 2.1rem;
    text-align: center;
  }
  
  .hero-content p {
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 24px;
  }

  .hero-features {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-feature-card {
    padding: 12px 16px;
  }

  .hero-widget {
    padding: 16px;
  }

  /* --- Compact Tables for Mobile --- */
  .price-table th {
    padding: 10px 12px;
    font-size: 0.75rem;
  }
  
  .price-table td {
    padding: 12px;
    font-size: 0.82rem;
  }
  
  .brand-cell {
    font-size: 0.85rem;
  }
  
  .brand-desc {
    font-size: 0.65rem;
  }

  /* --- Section Spacing --- */
  section {
    padding: 40px 0;
  }
  
  .section-card {
    padding: 20px;
    border-radius: 16px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .section-title {
    font-size: 1.15rem;
  }

  .chart-filters {
    width: 100%;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  
  .tv-widget-wrapper {
    height: 320px !important;
  }
  
  .chart-container {
    height: 250px !important;
  }

  .table-header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-bar {
    max-width: 100% !important;
  }

  /* --- Calculators & Forms --- */
  .calc-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calculator-box {
    gap: 12px;
  }

  /* --- Grid System --- */
  .dashboard-grid {
    display: block !important;
  }
  
  .dashboard-grid > * {
    margin-bottom: 24px;
  }
  
  .dashboard-grid > *:last-child {
    margin-bottom: 0;
  }

  /* --- Footer --- */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 0;
  }

  @keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

/* Theme Toggle Button Style */
.btn-theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: var(--transition-normal);
  cursor: pointer;
}

[data-theme="light"] .btn-theme-toggle {
  background: rgba(0, 0, 0, 0.03);
}

.btn-theme-toggle:hover {
  background: var(--gold-gradient);
  color: var(--bg-main);
  border-color: transparent;
  box-shadow: 0 0 12px var(--gold-glow);
}

/* --- PWA Custom Install Prompt --- */
.pwa-prompt-banner {
  position: fixed;
  bottom: -250px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  background: var(--bg-header-scrolled);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  z-index: 10000;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-prompt-banner.show {
  bottom: 20px;
}

.pwa-prompt-content {
  position: relative;
}

.pwa-prompt-close {
  position: absolute;
  top: -8px;
  right: -8px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.pwa-prompt-close:hover {
  color: var(--text-primary);
}

.pwa-prompt-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-right: 18px; /* avoid close button overlap */
}

.pwa-prompt-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.pwa-prompt-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.pwa-prompt-text p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.pwa-prompt-instructions {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.5;
  border: 1px dashed var(--border-color);
  margin-bottom: 12px;
}

[data-theme="light"] .pwa-prompt-instructions {
  background: rgba(0, 0, 0, 0.02);
}

.pwa-prompt-instructions i {
  color: var(--gold-primary);
  margin: 0 3px;
}

.pwa-prompt-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-pwa-action {
  background: var(--gold-gradient);
  color: #12141c;
  border: none;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.btn-pwa-action:active {
  transform: scale(0.96);
}

