.forex-container { max-width: 1400px; margin: 0 auto; padding: 24px; }
.status-bar { display: flex; align-items: center; gap: 20px; background: white; border-radius: 12px; padding: 14px 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); flex-wrap: wrap; border: 1px solid #e5e7eb; }
.status-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #374151; }
.status-item i { color: #4361ee; }
.btn-refresh { margin-left: auto; width: 36px; height: 36px; border-radius: 8px; background: #f0f4ff; border: 1px solid #c7d2fe; color: #4361ee; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-refresh:hover { background: #4361ee; color: white; }
@keyframes spin { to { transform: rotate(360deg); } }
.forex-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.forex-tabs .tab-btn { padding: 10px 20px; background: #f3f4f6; border: none; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: #374151; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
.forex-tabs .tab-btn.active { background: linear-gradient(135deg, #4361ee, #3730a3); color: white; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.converter-card { background: white; border-radius: 16px; padding: 28px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; max-width: 700px; }
.converter-form { margin-bottom: 28px; }
.amount-group { margin-bottom: 16px; }
.amount-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #6b7280; margin-bottom: 6px; }
.amount-group input { width: 100%; padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 1.1rem; outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.amount-group input:focus { border-color: #4361ee; }
.currency-selectors { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; margin-bottom: 16px; }
.currency-group label { display: block; font-size: 0.85rem; font-weight: 600; color: #6b7280; margin-bottom: 6px; }
.currency-select { width: 100%; padding: 10px 14px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.currency-select:focus { border-color: #4361ee; }
.swap-button { width: 40px; height: 40px; border-radius: 50%; background: #f0f4ff; border: 2px solid #c7d2fe; color: #4361ee; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all 0.2s; margin-bottom: 2px; }
.swap-button:hover { background: #4361ee; color: white; }
.btn-convert { width: 100%; padding: 14px; background: linear-gradient(135deg, #4361ee, #3730a3); color: white; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; }
.btn-convert:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(67,97,238,0.3); }
.conversion-result { margin-top: 20px; padding: 20px; background: linear-gradient(135deg, #f0f4ff, #e8f5e9); border-radius: 12px; border: 1px solid #c7d2fe; }
.result-amount { font-size: 1.5rem; font-weight: 700; color: #1e293b; }
.result-rate { color: #4361ee; font-size: 0.9rem; margin-top: 4px; }
.result-time { color: #6b7280; font-size: 0.8rem; margin-top: 4px; }
.popular-conversions h3 { font-size: 1rem; color: #374151; margin-bottom: 12px; }
.popular-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.rates-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.rates-header h2 { margin: 0; }
.rates-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box i { position: absolute; left: 10px; color: #94a3b8; }
.search-box input { padding: 8px 12px 8px 32px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 0.9rem; outline: none; }
.filter-group { display: flex; gap: 8px; }
.filter-group select { padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 0.9rem; outline: none; }
.rates-table-container { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; }
.rates-table { width: 100%; border-collapse: collapse; }
.rates-table thead th { padding: 14px 12px; background: #f8fafc; font-size: 0.8rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; border-bottom: 2px solid #e5e7eb; }
.compare-header { margin-bottom: 20px; }
.compare-header p { color: #6b7280; margin: 4px 0 0; }
.compare-selectors { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; margin-bottom: 20px; }
.btn-compare { margin-top: 16px; padding: 10px 24px; background: #4361ee; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 0.95rem; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.btn-compare:hover { background: #3730a3; }
.comparison-table-container { background: white; border-radius: 16px; overflow: auto; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; }
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th, .comparison-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; }
.charts-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.chart-controls { display: flex; gap: 10px; }
.chart-controls select { padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; outline: none; }
.chart-container { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; }
.movers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.movers-card { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; }
.movers-card h4 { margin: 0 0 12px; font-size: 0.95rem; }
.movers-card.gainers h4 { color: #10b981; }
.movers-card.losers h4 { color: #ef4444; }
.portfolio-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.portfolio-balance { display: flex; gap: 20px; font-size: 0.9rem; color: #374151; }
.portfolio-preferences { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 24px; }
.pref-card { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); border: 1px solid #e5e7eb; }
.pref-card h3 { margin: 0 0 12px; font-size: 1rem; }
.pref-selector { display: flex; gap: 10px; align-items: center; }
.pref-selector select { flex: 1; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; outline: none; }
.btn-save { padding: 8px 16px; background: #10b981; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.pref-note { font-size: 0.8rem; color: #6b7280; margin: 8px 0 0; }
.quick-convert { display: flex; gap: 10px; }
.quick-convert input { flex: 1; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 8px; outline: none; }
.quick-convert button { padding: 8px 16px; background: #4361ee; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 0.85rem; }
.favorites-section h3 { margin-bottom: 12px; }
.favorites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; align-items: center; justify-content: center; }
.modal-content { background: white; border-radius: 16px; width: 90%; max-width: 480px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #6b7280; line-height: 1; }
.modal-body { padding: 20px 24px; max-height: 60vh; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 10px; }
.btn-secondary { padding: 8px 16px; background: #f3f4f6; color: #374151; border: none; border-radius: 8px; cursor: pointer; }
.btn-primary { padding: 8px 16px; background: #4361ee; color: white; border: none; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 6px; }

/* Dark mode */
html.dark-mode .status-bar, html.dark-mode .converter-card, html.dark-mode .rates-table-container,
html.dark-mode .compare-selectors, html.dark-mode .comparison-table-container,
html.dark-mode .chart-container, html.dark-mode .movers-card, html.dark-mode .pref-card,
html.dark-mode .modal-content { background: #1e293b; border-color: #334155; }
html.dark-mode .status-item, html.dark-mode .amount-group label, html.dark-mode .currency-group label { color: #cbd5e1; }
html.dark-mode .amount-group input, html.dark-mode .currency-select, html.dark-mode .filter-group select,
html.dark-mode .search-box input, html.dark-mode .chart-controls select, html.dark-mode .pref-selector select { background: #0f172a; border-color: #334155; color: #e2e8f0; }
html.dark-mode .rates-table thead th { background: #0f172a; color: #94a3b8; border-color: #334155; }
html.dark-mode .forex-tabs .tab-btn { background: #1e293b; color: #cbd5e1; }

@media (max-width: 768px) {
    .forex-container { padding: 16px; }
    .currency-selectors { grid-template-columns: 1fr; }
    .swap-button { margin: 0 auto; }
    .movers-grid { grid-template-columns: 1fr; }
    .rates-header { flex-direction: column; }
}
