* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f8fafc; color: #1e293b; transition: all 0.3s; }
body.dark-mode { background: #0f172a; color: #e2e8f0; }

/* Header */
.header { background: linear-gradient(135deg, #FEA735 0%, #FE7235 100%); color: white; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 15px 24px; max-width: 1400px; margin: 0 auto; }
.header h1 { font-size: 1.4rem; font-weight: 700; }
.menu-btn, .favorite-btn, .home-link { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: white; padding: 8px 12px; border-radius: 10px; transition: all 0.3s; text-decoration: none; }
.menu-btn:hover, .favorite-btn:hover, .home-link:hover { background: rgba(255,255,255,0.2); }
.header-actions { display: flex; gap: 10px; }

/* Breadcrumb */
.breadcrumb { padding: 12px 24px; background: #f1f5f9; font-size: 0.85rem; border-bottom: 1px solid #e2e8f0; }
body.dark-mode .breadcrumb { background: #1e293b; border-bottom-color: #334155; }
.breadcrumb a { color: #FEA735; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Ad Container */
.ad-container { text-align: center; padding: 16px; background: #f1f5f9; min-height: 100px; display: flex; align-items: center; justify-content: center; }
body.dark-mode .ad-container { background: #1e293b; }

/* Hero Section */
.hero-section { text-align: center; padding: 48px 24px; background: linear-gradient(135deg, #FEA73510 0%, #FE723510 100%); }
.hero-section h2 { font-size: 2rem; margin-bottom: 16px; color: #FEA735; }
.hero-section p { font-size: 1.1rem; max-width: 600px; margin: 0 auto 32px; opacity: 0.8; }
.hero-stats { display: flex; justify-content: center; gap: 48px; }
.stat { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: #FEA735; }
.stat-label { font-size: 0.9rem; opacity: 0.7; }

/* Tabs */
.tabs { display: flex; background: #fff; border-bottom: 2px solid #e2e8f0; position: sticky; top: 70px; z-index: 90; overflow-x: auto; scrollbar-width: thin; padding: 0 24px; }
body.dark-mode .tabs { background: #0f172a; border-bottom-color: #334155; }
.tab-btn { flex: 0 0 auto; padding: 14px 24px; background: none; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 600; color: #64748b; transition: all 0.3s; white-space: nowrap; }
body.dark-mode .tab-btn { color: #94a3b8; }
.tab-btn:hover { color: #FEA735; }
.tab-btn.active { color: #FEA735; border-bottom: 3px solid #FEA735; }

/* Category Sections */
.category-section { padding: 24px; max-width: 1400px; margin: 0 auto; }
.category-header { margin-bottom: 24px; }
.category-header h2 { font-size: 1.5rem; color: #FEA735; margin-bottom: 8px; }
.category-header p { color: #64748b; }
body.dark-mode .category-header p { color: #94a3b8; }

/* Calculators Grid */
.calculators-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.calculator-card { background: #fff; border-radius: 16px; padding: 24px; text-decoration: none; color: inherit; display: flex; align-items: center; gap: 16px; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; }
body.dark-mode .calculator-card { background: #1e293b; border-color: #334155; }
.calculator-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); border-color: #FEA735; }
.card-icon { font-size: 2.5rem; }
.card-content { flex: 1; }
.card-content h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: #FEA735; }
.card-content p { font-size: 0.85rem; color: #64748b; line-height: 1.4; }
body.dark-mode .card-content p { color: #94a3b8; }
.use-now { display: inline-block; margin-top: 10px; font-size: 0.8rem; color: #FEA735; font-weight: 500; opacity: 0; transition: opacity 0.3s; }
.calculator-card:hover .use-now { opacity: 1; }

/* Two Column Layout */
.two-column-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
@media (max-width: 900px) { .two-column-layout { grid-template-columns: 1fr; } }

/* Calculator Column */
.calculator-card-large { background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #e2e8f0; }
body.dark-mode .calculator-card-large { background: #1e293b; border-color: #334155; }
.calculator-header { text-align: center; margin-bottom: 32px; }
.calculator-icon-large { font-size: 3rem; display: block; margin-bottom: 12px; }
.calculator-header h2 { font-size: 1.5rem; color: #FEA735; margin-bottom: 8px; }
.formula-display { font-family: monospace; font-size: 0.85rem; background: #f1f5f9; padding: 8px 16px; border-radius: 20px; display: inline-block; }
body.dark-mode .formula-display { background: #334155; }

/* Form Styles */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.form-group input { width: 100%; padding: 14px 16px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 1rem; transition: all 0.3s; background: #fff; }
body.dark-mode .form-group input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
.form-group input:focus { outline: none; border-color: #FEA735; box-shadow: 0 0 0 3px rgba(254, 167, 53, 0.1); }
.calc-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, #FEA735, #FE7235); color: white; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.calc-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(254, 114, 53, 0.3); }

/* Results */
.results { margin-top: 32px; padding: 24px; background: #f1f5f9; border-radius: 16px; }
body.dark-mode .results { background: #0f172a; }
.results h3 { margin-bottom: 16px; font-size: 1.1rem; }
.result-card { text-align: center; padding: 20px; background: linear-gradient(135deg, #FEA735, #FE7235); border-radius: 16px; margin-bottom: 20px; color: white; }
.result-label { font-size: 0.85rem; opacity: 0.9; margin-bottom: 8px; }
.result-value.large { font-size: 2rem; font-weight: 700; }
.result-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
body.dark-mode .result-row { border-bottom-color: #334155; }
.result-value.success { color: #22c55e; }
.result-value.error { color: #ef4444; }
.eligibility-card.eligible { background: linear-gradient(135deg, #22c55e, #16a34a); }
.eligibility-card.not-eligible { background: linear-gradient(135deg, #ef4444, #dc2626); }
.error-message { text-align: center; padding: 20px; color: #ef4444; }

/* Info Column */
.info-card { background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); border: 1px solid #e2e8f0; }
body.dark-mode .info-card { background: #1e293b; border-color: #334155; }
.info-card h3 { font-size: 1.3rem; margin-bottom: 16px; color: #FEA735; }
.info-card p { line-height: 1.6; margin-bottom: 20px; }
.formula-box { background: #f1f5f9; padding: 16px; border-radius: 12px; margin: 20px 0; text-align: center; }
body.dark-mode .formula-box { background: #0f172a; }
.formula-box code { font-family: monospace; font-size: 0.9rem; }
.benefits-list ul { list-style: none; padding: 0; }
.benefits-list li { padding: 8px 0; display: flex; align-items: center; gap: 10px; }
.check { color: #22c55e; font-weight: bold; }
.tip-box { background: linear-gradient(135deg, #FEA73520, #FE723520); padding: 20px; border-radius: 16px; margin-top: 20px; border-left: 4px solid #FEA735; }
.tip-box h4 { margin-bottom: 8px; color: #FEA735; }

/* Related Calculators Section */
.related-calculators-section { max-width: 1400px; margin: 0 auto; padding: 32px 24px; }
.related-calculators-section h3 { font-size: 1.3rem; margin-bottom: 24px; color: #FEA735; }
.related-calculators-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.related-card { display: flex; align-items: center; gap: 16px; background: #fff; padding: 16px 20px; border-radius: 12px; text-decoration: none; color: inherit; transition: all 0.3s; border: 1px solid #e2e8f0; }
body.dark-mode .related-card { background: #1e293b; border-color: #334155; }
.related-card:hover { transform: translateX(5px); border-color: #FEA735; }
.related-icon { font-size: 1.8rem; }
.related-info { flex: 1; }
.related-info h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: #FEA735; }
.related-info p { font-size: 0.75rem; color: #64748b; }
.arrow { font-size: 1.2rem; opacity: 0.5; transition: opacity 0.3s; }
.related-card:hover .arrow { opacity: 1; transform: translateX(3px); }

/* FAQ Section */
.faq-section { max-width: 1400px; margin: 0 auto; padding: 32px 24px; background: #f1f5f9; border-radius: 20px; margin-bottom: 32px; }
body.dark-mode .faq-section { background: #1e293b; }
.faq-section h3 { font-size: 1.3rem; margin-bottom: 24px; color: #FEA735; }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.faq-item h4 { font-size: 1rem; margin-bottom: 8px; color: #FEA735; }
.faq-item p { font-size: 0.85rem; line-height: 1.5; opacity: 0.8; }

/* Sidebar */
.sidebar { position: fixed; top: 0; left: -300px; width: 300px; height: 100%; background: #fff; box-shadow: 2px 0 20px rgba(0,0,0,0.1); transition: left 0.3s; z-index: 200; overflow-y: auto; }
body.dark-mode .sidebar { background: #1e293b; }
.sidebar.open { left: 0; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: linear-gradient(135deg, #FEA735, #FE7235); color: white; }
.close-sidebar { background: none; border: none; font-size: 1.8rem; cursor: pointer; color: white; }
.sidebar-menu { padding: 16px 0; }
.menu-item { display: flex; align-items: center; padding: 14px 20px; cursor: pointer; gap: 15px; transition: background 0.3s; border-radius: 0 20px 20px 0; margin-right: 16px; }
.menu-item:hover { background: rgba(254, 167, 53, 0.1); }
.menu-divider { height: 1px; background: #e2e8f0; margin: 12px 0; }
body.dark-mode .menu-divider { background: #334155; }

/* Footer */
.footer { background: #fff; padding: 32px 24px; margin-top: 48px; border-top: 1px solid #e2e8f0; text-align: center; }
body.dark-mode .footer { background: #1e293b; border-top-color: #334155; }
.footer-links { margin-top: 16px; }
.footer-links a { color: #FEA735; text-decoration: none; margin: 0 12px; font-size: 0.85rem; }
.footer-links a:hover { text-decoration: underline; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 300; justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-content { background: #fff; border-radius: 20px; width: 90%; max-width: 500px; max-height: 80vh; overflow-y: auto; }
body.dark-mode .modal-content { background: #1e293b; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e2e8f0; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 20px; }
.currency-list { max-height: 300px; overflow-y: auto; }
.currency-item { padding: 12px; cursor: pointer; border-bottom: 1px solid #e2e8f0; transition: background 0.3s; }
.currency-item:hover { background: rgba(254, 167, 53, 0.1); }
#currencySearch { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 10px; margin-bottom: 16px; background: #fff; }
body.dark-mode #currencySearch { background: #0f172a; border-color: #334155; color: #e2e8f0; }

/* Switch */
.switch { position: relative; display: inline-block; width: 50px; height: 24px; margin-left: auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: 0.3s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: 0.3s; border-radius: 50%; }
input:checked + .slider { background-color: #FEA735; }
input:checked + .slider:before { transform: translateX(26px); }

/* Responsive */
@media (max-width: 768px) {
    .calculators-container { grid-template-columns: 1fr; }
    .hero-section h2 { font-size: 1.5rem; }
    .hero-stats { gap: 24px; }
    .tabs { top: 60px; padding: 0 16px; }
    .category-section { padding: 16px; }
    .two-column-layout { padding: 16px; }
    .calculator-card-large { padding: 20px; }
    .info-card { padding: 20px; }
    .faq-grid { grid-template-columns: 1fr; }
    .related-calculators-grid { grid-template-columns: 1fr; }
}