.calc-section { margin-bottom: 20px; }

.calc-card { background: var(--card-bg); border-radius: 28px; border: 1px solid var(--border-light); box-shadow: var(--shadow-lg); overflow: hidden; position: relative; }
.calc-card::before { content: ''; position: absolute; top: -80px; right: -80px; width: 360px; height: 360px; background: radial-gradient(circle, rgba(255,107,0,.07) 0%, transparent 65%); pointer-events: none; }
.calc-card::after { content: ''; position: absolute; bottom: -60px; left: -60px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(139,92,246,.05) 0%, transparent 65%); pointer-events: none; }

.calc-header { display: flex; align-items: center; justify-content: space-between; padding: clamp(14px, 3vw, 22px) clamp(16px, 4vw, 32px); border-bottom: 1px solid var(--border-light); background: var(--surface-bg); flex-wrap: wrap; gap: 12px; }
.calc-header-label { font-family: 'Sora', sans-serif; font-size: clamp(11px, 2vw, 13px); font-weight: 700; color: var(--text-secondary); letter-spacing: .04em; }
.calc-live-badge { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #10b981; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; animation: live-pulse 2s ease-in-out infinite; flex-shrink: 0; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.calc-updated { font-size: 11px; font-weight: 600; color: var(--text-muted); background: #fff; padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border-light); }

.calc-body { padding: clamp(16px, 4vw, 32px); position: relative; z-index: 1; }

.coin-tabs { display: flex; gap: 8px; margin-bottom: clamp(16px, 3vw, 28px); flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
.coin-tabs::-webkit-scrollbar { display: none; }

.coin-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 14px;
    border: 2px solid var(--border-light);
    background: var(--surface-bg);
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 44px;
}

.coin-tab::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,107,0,.08), transparent); opacity: 0; transition: opacity .25s; }
.coin-tab:hover { border-color: rgba(255,107,0,.4); color: var(--text-main); }
.coin-tab:hover::before { opacity: 1; }
.coin-tab.active { border-color: var(--accent-primary); background: #fff; color: var(--text-main); box-shadow: 0 4px 20px rgba(255,107,0,.12); }
.coin-tab.active::before { opacity: 1; }
.coin-tab-icon { display: flex; align-items: center; justify-content: center; margin-right: 6px; }
.tab-img { width: 20px; height: 20px; display: block; }
.coin-tab-price { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-left: 4px; }
.coin-tab.active .coin-tab-price { color: var(--accent-primary); }
.coin-tab-change { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.coin-tab-change.pos { background: rgba(16,185,129,.1); color: #10b981; }
.coin-tab-change.neg { background: rgba(239,68,68,.1); color: #ef4444; }

/* Fiat selector — horizontal scroll on small screens */
.fiat-selector-row { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(16px, 3vw, 24px); flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.fiat-selector-row::-webkit-scrollbar { display: none; }
.fiat-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; flex-shrink: 0; }
.fiat-tabs { display: flex; gap: 6px; flex-shrink: 0; }
.fiat-tab { padding: 7px 14px; border-radius: 10px; border: 1.5px solid var(--border-light); background: var(--surface-bg); font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: all .2s; white-space: nowrap; min-height: 36px; }
.fiat-tab:hover { border-color: rgba(255,107,0,.4); color: var(--text-main); }
.fiat-tab.active { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); border-color: var(--accent-primary); color: #fff; box-shadow: 0 4px 12px rgba(255,107,0,.25); }

/* Calculator exchange row */
.calc-exchange { display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(12px, 3vw, 16px); align-items: center; margin-bottom: clamp(16px, 3vw, 28px); }

.calc-field { background: var(--surface-bg); border: 2px solid var(--border-light); border-radius: 20px; padding: clamp(14px, 2.5vw, 20px) clamp(16px, 2.5vw, 22px); transition: all .25s; position: relative; }
.calc-field:focus-within { border-color: var(--accent-primary); background: #fff; box-shadow: 0 0 0 4px rgba(255,107,0,.08); }
.calc-field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.calc-field-currency { display: flex; align-items: center; gap: 8px; }
.calc-currency-icon { font-size: 18px; line-height: 1; }

.calc-input-wrap { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.calc-currency-symbol { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; color: var(--text-muted); }
.calc-input { font-family: 'Sora', sans-serif; font-size: clamp(22px, 4vw, 36px); font-weight: 800; color: var(--text-main); border: none; background: transparent; width: 100%; letter-spacing: -.03em; transition: color .2s; }
.calc-input:focus { outline: none; color: var(--accent-primary); }
.calc-input::placeholder { color: var(--border-medium); }
.calc-input[readonly] { cursor: default; color: var(--text-secondary); }
.calc-field-sub { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); min-height: 18px; }

.calc-swap-btn-wrap { display: flex; justify-content: center; align-items: center; }
.calc-swap-btn { width: clamp(44px, 7vw, 52px); height: clamp(44px, 7vw, 52px); border-radius: 16px; background: #fff; border: 2px solid var(--border-light); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); transition: all .3s cubic-bezier(.4,0,.2,1); color: var(--accent-primary); flex-shrink: 0; }
.calc-swap-btn:hover { border-color: var(--accent-primary); background: var(--accent-primary); color: #fff; transform: rotate(180deg) scale(1.1); box-shadow: 0 6px 20px rgba(255,107,0,.3); }
.calc-swap-btn svg { width: 20px; height: 20px; }

.quick-amounts { display: flex; gap: 8px; margin-bottom: clamp(16px, 3vw, 28px); flex-wrap: wrap; align-items: center; }
.quick-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; align-self: center; white-space: nowrap; }
.quick-btn { padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--border-light); background: var(--surface-bg); font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: all .2s; min-height: 36px; }
.quick-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); background: rgba(255,107,0,.05); transform: translateY(-2px); }

/* Chart */
.calc-chart-wrap { margin: clamp(16px, 3vw, 24px) 0; background: var(--surface-bg); border-radius: 18px; border: 1px solid var(--border-light); padding: clamp(14px, 2.5vw, 20px) clamp(14px, 2.5vw, 20px) 12px; }
.calc-chart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.calc-chart-title { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.chart-period-tabs { display: flex; gap: 4px; }
.chart-period { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border-light); background: #fff; font-size: 11px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all .2s; min-height: 30px; }
.chart-period:hover, .chart-period.active { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; }
.mini-chart { width: 100%; height: 80px; position: relative; overflow: hidden; }
.mini-chart canvas { width: 100% !important; height: 80px !important; }
.chart-loading { display: flex; align-items: center; justify-content: center; height: 80px; color: var(--text-muted); font-size: 12px; font-weight: 600; gap: 8px; }
.chart-spinner { width: 16px; height: 16px; border: 2px solid var(--border-light); border-top-color: var(--accent-primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stats */
.calc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; padding: clamp(14px, 2.5vw, 20px); background: var(--surface-bg); border-radius: 18px; border: 1px solid var(--border-light); }
.calc-stat { text-align: center; padding: 10px; }
.calc-stat-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.calc-stat-value { font-family: 'Sora', sans-serif; font-size: clamp(14px, 2.5vw, 16px); font-weight: 800; color: var(--text-main); letter-spacing: -.02em; line-height: 1.2; }
.calc-stat-value.pos { color: #10b981; }
.calc-stat-value.neg { color: #ef4444; }
.calc-stat-sub { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }

.calc-error { background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.2); color: #ef4444; border-radius: 12px; padding: 10px 16px; font-size: 13px; font-weight: 600; margin-top: 12px; display: none; }

.calc-footer { display: flex; align-items: center; justify-content: space-between; padding: clamp(12px, 2vw, 16px) clamp(16px, 4vw, 32px); border-top: 1px solid var(--border-light); background: var(--surface-bg); flex-wrap: wrap; gap: 8px; }
.calc-footer-source { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.calc-footer-source svg { width: 12px; height: 12px; color: var(--accent-primary); }
.calc-disclaimer { font-size: 10px; color: var(--text-muted); font-weight: 500; }

@keyframes flash-update { 0% { color: #ff6b00; } 100% { color: inherit; } }
.flash { animation: flash-update .5s ease-out forwards; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
.loading { animation: pulse 1.5s cubic-bezier(.4,0,.6,1) infinite; }

@media (max-width: 1300px) {
    .calc-section { 
        display: none !important;
    }
}