*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { --primary: #2563eb; --primary-dark: #1d4ed8; --bg: #f8fafc; --card: #ffffff; --text: #1e293b; --muted: #64748b; --border: #e2e8f0; --success: #10b981; --danger: #ef4444; --radius: 12px; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav { background: var(--card); border-bottom: 1px solid var(--border); padding: 0 1rem; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { font-weight: 700; font-size: 1.25rem; color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }

/* Hero */
.hero { text-align: center; padding: 2rem 0 1rem; }
.hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.subtitle { color: var(--muted); font-size: 1.05rem; }

/* Converter */
.converter-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }
.converter-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.input-group { flex: 1; min-width: 150px; }
.input-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.5px; }
.input-group input, .input-group select { width: 100%; padding: 0.7rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: var(--bg); }
.input-group input:focus, .input-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.swap-btn { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--card); font-size: 1.2rem; cursor: pointer; flex-shrink: 0; }
.swap-btn:hover { background: var(--bg); border-color: var(--primary); }

/* Result */
.result-box { margin-top: 1rem; padding: 1rem; background: var(--bg); border-radius: 8px; text-align: center; }
.result-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.result-info { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.converter-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; }

/* Rate Hero */
.rate-hero { text-align: center; margin: 1.5rem 0; }
.rate-big { font-size: 1.6rem; font-weight: 600; }
.rate-big strong { color: var(--primary); font-size: 2rem; }
.rate-reverse { color: var(--muted); margin-top: 0.25rem; }
.rate-updated { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.6rem 1.2rem; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* Rates Grid */
.rates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.rate-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem; text-align: center; transition: border-color 0.2s; display: block; }
.rate-card:hover { border-color: var(--primary); text-decoration: none; }
.rate-card .pair { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text); }
.rate-card .rate { display: block; color: var(--primary); font-size: 0.85rem; margin-top: 0.25rem; }

/* Table */
.amounts-table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.amounts-table th { background: var(--primary); color: #fff; padding: 0.7rem 1rem; text-align: left; font-weight: 600; font-size: 0.85rem; }
.amounts-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.amounts-table tr:last-child td { border-bottom: none; }
.amounts-table tr:nth-child(even) { background: var(--bg); }

/* Chart */
.chart-container { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.chart-large { padding: 1.5rem; }
.chart-large canvas { height: 350px !important; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin: 1.5rem 0; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; text-align: center; }
.stat-label { display: block; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { display: block; font-size: 1.3rem; font-weight: 700; margin-top: 0.25rem; }
.stat-value.positive { color: var(--success); }
.stat-value.negative { color: var(--danger); }

/* FAQ */
.faq-section { margin: 1rem 0; }
.faq-section details { background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; }
.faq-section summary { padding: 1rem; font-weight: 600; cursor: pointer; font-size: 0.95rem; }
.faq-section summary:hover { color: var(--primary); }
.faq-section details p { padding: 0 1rem 1rem; color: var(--muted); line-height: 1.7; }

/* Calculator */
.calc-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.calc-tab { padding: 0.6rem 1.2rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); cursor: pointer; font-weight: 500; }
.calc-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.calc-panel { display: none; }
.calc-panel.active { display: block; }
.calc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.calc-result { margin-top: 1rem; padding: 1rem; background: var(--bg); border-radius: 8px; font-size: 1.1rem; }

/* SEO Content */
.seo-content { margin-top: 2rem; }
.seo-content h2 { font-size: 1.3rem; margin: 1.5rem 0 0.5rem; }
.seo-content p { color: var(--muted); line-height: 1.8; margin-bottom: 0.75rem; }

/* Ads */
.ad-slot { margin: 1.5rem auto; text-align: center; max-width: 728px; }

/* Footer */
.footer { background: var(--card); border-top: 1px solid var(--border); padding: 1.5rem; margin-top: 3rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer p { font-size: 0.8rem; color: var(--muted); }
.footer-links { margin-top: 0.5rem; }
.footer-links a { color: var(--muted); margin: 0 0.75rem; font-size: 0.8rem; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.4rem; }
  .converter-row { flex-direction: column; }
  .swap-btn { align-self: center; }
  .rate-big { font-size: 1.2rem; }
  .rate-big strong { font-size: 1.5rem; }
  .rates-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
