/* =============================================
   BITCOIN MINING PROFITABILITY CALCULATOR
   Ultimate Professional Version
============================================= */

/* Global Reset for this page */
.calc-page *,
.calc-page *::before,
.calc-page *::after {
    box-sizing: border-box;
}

.calc-page {
    overflow-x: hidden;
}

.calc-page .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =============================================
   SHARE SIDEBAR
============================================= */
.share-sidebar {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.share-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 4px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.share-btn svg { width: 18px; height: 18px; }
.share-btn:hover { transform: scale(1.1); color: white; }
.share-btn[data-share="telegram"]:hover { background: #0088cc; }
.share-btn[data-share="whatsapp"]:hover { background: #25D366; }
.share-btn[data-share="twitter"]:hover { background: #000; }
.share-btn[data-share="email"]:hover { background: var(--text-primary); }
.share-btn[data-share="copy"]:hover { background: var(--brand-orange); }

/* =============================================
   LIVE DATA BAR
============================================= */
.live-bar {
    position: sticky;
    top: 80px;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 90;
    padding: 10px 0;
}

.live-bar-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.live-bar-inner::-webkit-scrollbar { display: none; }

.live-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.live-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
}

.live-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.live-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.live-change.positive { background: rgba(16,185,129,0.2); color: #10B981; }
.live-change.negative { background: rgba(239,68,68,0.2); color: #EF4444; }

.live-unit {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

.live-refresh {
    margin-left: auto;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all var(--transition);
}

.live-refresh:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.live-refresh.spinning svg {
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   HERO
============================================= */
.calc-hero {
    padding: 140px 0 40px;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.calc-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}

.hero-desc {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* =============================================
   TOC
============================================= */
.calc-toc {
    position: sticky;
    top: 130px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    z-index: 80;
}

.toc-list {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    overflow-x: auto;
}

.toc-list::-webkit-scrollbar { display: none; }

.toc-list a {
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    border-radius: var(--radius-full);
    transition: all var(--transition);
}

.toc-list a:hover,
.toc-list a.active {
    background: var(--brand-orange);
    color: white;
}

/* =============================================
   FEATURED MACHINE BANNER (S19 XP+ Hydro - Best ROI)
============================================= */
.featured-machine {
    position: relative;
    margin-bottom: 28px;
    margin-top: 24px;
    padding: 40px 28px 28px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
    border: 2px solid var(--brand-orange);
    border-radius: var(--radius-xl);
    overflow: visible;
    box-shadow: 0 8px 32px rgba(247, 147, 26, 0.18);
}

.featured-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #E8850F 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 16px rgba(247, 147, 26, 0.45);
    white-space: nowrap;
    border: 3px solid white;
    z-index: 10;
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.featured-brand {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.featured-info h4 {
    font-size: 1.375rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.featured-info > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.featured-specs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    min-width: 80px;
    flex-shrink: 0;
}

/* Tablet: 4 in grid when content stacks */
@media (max-width: 900px) {
    .featured-specs {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .spec-item {
        width: 100%;
        min-width: unset;
        padding: 10px 8px;
    }
}

/* Mobile: 2x2 grid */
@media (max-width: 550px) {
    .featured-specs {
        grid-template-columns: repeat(2, 1fr);
        max-width: 200px;
    }
}

.spec-value {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.spec-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

.featured-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.featured-profit {
    text-align: center;
    padding: 20px 32px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.featured-profit .profit-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.featured-profit .profit-amount {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-green);
    line-height: 1;
}

.featured-profit .profit-note {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.featured-btn {
    white-space: nowrap;
    padding: 16px 28px;
    font-size: 1rem;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.3);
}

.featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 147, 26, 0.4);
}

@media (max-width: 900px) {
    .featured-machine {
        margin-top: 24px;
        padding: 40px 16px 24px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .featured-badge {
        font-size: 0.7rem;
        padding: 8px 16px;
    }
    
    .featured-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .featured-info {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .featured-info h4 {
        font-size: 1.2rem;
    }
    
    .featured-info p {
        font-size: 0.85rem;
        max-width: 280px;
    }
    
    .featured-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .featured-profit {
        width: auto;
        min-width: 200px;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .featured-btn {
        width: 100%;
        max-width: 320px;
        font-size: 0.9rem;
        padding: 14px 20px;
        margin: 0 auto;
    }
}

/* =============================================
   MAIN CALCULATOR
============================================= */
.calc-main {
    padding: 48px 0;
}

/* Mode Tabs */
.calc-modes {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 32px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: fit-content;
}

.mode-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.mode-btn:hover { color: var(--text-primary); }
.mode-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Grid */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: start;
}

/* Inputs */
.calc-inputs {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
}

.input-section {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-light);
}

.input-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.input-section h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Hidden sections - collapse completely when hidden */
.device-section,
.advanced-section { 
    display: none !important;
    visibility: hidden;
    height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden;
}

.calc-inputs.mode-device .device-section,
.calc-inputs.mode-advanced .advanced-section { 
    display: block !important;
    visibility: visible;
    height: auto;
    margin-bottom: 28px !important;
    padding-bottom: 28px !important;
    border-bottom: 1px solid var(--border-light) !important;
    overflow: visible;
}

/* Device Filters */
.device-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.filter-btn.active { background: var(--brand-orange); border-color: var(--brand-orange); color: white; }

/* Select */
.select-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.form-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    appearance: none;
    transition: all var(--transition);
}

.form-select:hover { border-color: var(--border-medium); }
.form-select:focus { outline: none; border-color: var(--brand-orange); }

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    color: var(--text-muted);
}

.auto-fill-note {
    font-size: 0.75rem;
    color: var(--brand-green);
}

/* Input Rows */
.input-row {
    margin-bottom: 20px;
}

.input-row:last-child { margin-bottom: 0; }

.input-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tooltip-btn {
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    cursor: help;
    position: relative;
}

.tooltip-btn:hover { background: var(--brand-orange); color: white; }

.tooltip-btn::after {
    content: attr(data-tip);
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    padding: 10px 12px;
    background: var(--bg-dark);
    color: white;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
}

.tooltip-btn:hover::after { opacity: 1; visibility: visible; }

.input-with-unit {
    display: flex;
    gap: 8px;
}

.form-input {
    flex: 1;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.form-input:hover { border-color: var(--border-medium); }
.form-input:focus { outline: none; border-color: var(--brand-orange); }

.unit-select {
    width: 80px;
    padding: 12px 8px;
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
}

.unit-label {
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    white-space: nowrap;
}

/* Elec Presets */
.elec-presets {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.elec-presets button {
    padding: 6px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.elec-presets button:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.elec-presets button.active { background: var(--brand-orange); border-color: var(--brand-orange); color: white; }

/* Checkbox */
.checkbox-row {
    margin-top: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-item input { display: none; }

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-sm);
    position: relative;
}

.checkbox-item input:checked + .checkmark {
    background: var(--brand-green);
    border-color: var(--brand-green);
}

.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.checkbox-item input:checked + .checkmark::after { opacity: 1; }

/* Buttons */
#calculate-btn {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #E8850F 100%);
    font-size: 1rem;
    padding: 16px 24px;
}

#calculate-btn:hover {
    background: linear-gradient(135deg, #E8850F 0%, var(--brand-orange) 100%);
    box-shadow: 0 8px 20px rgba(247, 147, 26, 0.35);
}

#reset-btn {
    margin-top: 12px;
}

/* Disclosure */
.calc-disclosure {
    margin-top: 32px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.calc-disclosure strong { color: var(--text-secondary); }

/* =============================================
   RESULTS
============================================= */
.calc-results {
    position: sticky;
    top: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
}

/* Main Result */
.main-result .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.main-result h3 {
    font-size: 1rem;
    margin: 0;
}

.profit-margin {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.profit-margin.positive { background: #D1FAE5; color: #065F46; }
.profit-margin.negative { background: #FEE2E2; color: #991B1B; }

.profit-main {
    text-align: center;
    padding: 24px;
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.profit-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.profit-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-green);
    line-height: 1;
}

.profit-value.negative { color: #EF4444; }

.profit-btc {
    display: block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin-top: 8px;
}

.profit-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.breakdown-item span { color: var(--text-secondary); }
.breakdown-item strong.positive { color: var(--brand-green); }
.breakdown-item strong.negative { color: #EF4444; }

/* Periods */
.periods-card h4 {
    font-size: 0.85rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.periods-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.period-item {
    text-align: center;
    padding: 12px 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.period-item.highlight {
    background: var(--brand-orange-light);
    border: 1px solid var(--brand-orange);
}

.period-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.period-profit {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.period-btc {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ROI */
.roi-card h4 {
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.roi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.roi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.roi-icon { font-size: 1.5rem; margin-bottom: 8px; }

.roi-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.roi-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Pie Chart */
.chart-card h4 {
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.pie-chart-container {
    height: 180px;
    margin-bottom: 16px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.75rem;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* CTA */
.result-cta {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--brand-orange-light) 0%, #FDE68A 100%);
    border-radius: var(--radius-xl);
}

.result-cta p {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Upgrade Suggestion */
.upgrade-suggestion {
    margin-top: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #93C5FD;
    border-radius: var(--radius-lg);
    text-align: center;
}

.upgrade-suggestion p {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.upgrade-suggestion .btn {
    background: #3B82F6;
    color: white;
}

.upgrade-suggestion .btn:hover {
    background: #2563EB;
}

/* =============================================
   TOP MINERS
============================================= */
.calc-top-miners {
    padding: 64px 0;
    background: var(--bg-secondary);
}

.calc-top-miners h2 {
    text-align: center;
    margin-bottom: 12px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.top-miners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.top-miner-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-top: 4px solid var(--brand-orange);
    border-radius: var(--radius-xl);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}

.top-miner-card:hover {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.top-miner-card.flagship:hover {
    transform: scale(1.02) translateY(-4px);
}

.top-miner-card.rank-1 { 
    border-top-color: #F59E0B; 
    background: linear-gradient(180deg, #FFFBEB 0%, var(--bg-card) 100%);
}
.top-miner-card.rank-2 { 
    border-top-color: #94A3B8; 
    background: linear-gradient(180deg, #F8FAFC 0%, var(--bg-card) 100%);
}
.top-miner-card.rank-3 { 
    border-top-color: #CD7F32; 
    background: linear-gradient(180deg, #FEF3E2 0%, var(--bg-card) 100%);
}

/* Flagship S21 XP Hydro special styling */
.top-miner-card.flagship {
    border: 3px solid var(--brand-orange);
    background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
    box-shadow: 0 8px 30px rgba(247, 147, 26, 0.25);
    transform: scale(1.02);
}

.top-miner-card.flagship .miner-rank {
    color: var(--brand-orange);
    font-size: 0.8rem;
}

.top-miner-card.flagship .miner-name {
    font-size: 1rem;
}

.miner-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 8px 0 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.miner-meta span {
    white-space: nowrap;
}

.miner-meta span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.top-miner-card .btn {
    width: 100%;
    margin-top: auto;
}

.miner-rank {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.miner-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.miner-specs {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.miner-daily-profit {
    font-size: 1.25rem;
    font-weight: 700;
}

.miner-daily-profit.positive { color: var(--brand-green); }
.miner-daily-profit.negative { color: #EF4444; }

/* =============================================
   ALL ASICS
============================================= */
.calc-all-asics {
    padding: 64px 0;
}

.calc-all-asics h2 {
    text-align: center;
    margin-bottom: 12px;
}

.calc-all-asics .section-desc {
    text-align: center;
    margin-bottom: 32px;
}

.asic-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--brand-orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 2px;
}

.filter-group select,
.filter-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23F7931A' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: var(--brand-orange);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--brand-orange);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.15);
}

.filter-group .input-with-unit {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.filter-group .input-with-unit:hover {
    border-color: var(--brand-orange);
}

.filter-group .input-with-unit:focus-within {
    border-color: var(--brand-orange);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.15);
}

.filter-group .input-with-unit input {
    flex: 1;
    width: 80px;
    padding: 12px 8px 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
    border: none;
    text-align: left;
    -moz-appearance: textfield;
}

.filter-group .input-with-unit input::-webkit-outer-spin-button,
.filter-group .input-with-unit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-group .input-with-unit input:focus {
    outline: none;
}

.filter-group .input-with-unit span {
    padding: 12px 16px 12px 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    background: rgba(247, 147, 26, 0.08);
}

/* Tablet */
@media (max-width: 768px) {
    .asic-filters {
        padding: 16px;
        gap: 12px;
    }
    
    .filter-group {
        min-width: 140px;
        flex: 1;
    }
}

/* Mobile filters */
@media (max-width: 540px) {
    .asic-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }
    
    .filter-group {
        width: 100%;
        min-width: unset;
    }
    
    .filter-group select,
    .filter-group .input-with-unit {
        width: 100%;
    }
}

.asic-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
}

.asic-table {
    width: 100%;
    border-collapse: collapse;
}

.asic-table th {
    padding: 14px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: left;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.asic-table td {
    padding: 14px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.asic-table tr:hover { background: var(--bg-secondary); }

.asic-table .miner-name-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.hosted-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    background: var(--brand-green);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

.best-roi-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #E8850F 100%);
    border-radius: var(--radius-sm);
    margin-left: 8px;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(247, 147, 26, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(247, 147, 26, 0.4); }
    50% { box-shadow: 0 2px 16px rgba(247, 147, 26, 0.6); }
}

/* Best ROI row - VERY visible highlight */
.asic-table tr.best-roi-row {
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.15) 0%, rgba(247, 147, 26, 0.08) 50%, rgba(247, 147, 26, 0.15) 100%);
    border-left: 4px solid var(--brand-orange);
}

.asic-table tr.best-roi-row td {
    font-weight: 600;
    border-bottom: 2px solid rgba(247, 147, 26, 0.3);
}

.asic-table tr.best-roi-row td:first-child {
    padding-left: 12px;
}

.asic-table tr.best-roi-row:hover {
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.22) 0%, rgba(247, 147, 26, 0.12) 50%, rgba(247, 147, 26, 0.22) 100%);
}

.asic-table tr.best-roi-row .btn-go {
    background: linear-gradient(135deg, #E8850F 0%, var(--brand-orange) 100%);
    font-size: 0.85rem;
    padding: 10px 24px;
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.4);
}

.table-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--brand-orange-light);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

.fee-note {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--brand-green);
}

.asic-table .positive { color: var(--brand-green); font-weight: 600; }
.asic-table .negative { color: #EF4444; font-weight: 600; }

.asic-table .btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* Go button for hosted machines */
.btn-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--brand-orange) 0%, #E8850F 100%);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition);
}

.btn-go:hover {
    background: linear-gradient(135deg, #E8850F 0%, var(--brand-orange) 100%);
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.35);
    transform: translateY(-1px);
}

/* Hosted row highlight */
.asic-table tr.hosted-row {
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.03) 0%, transparent 100%);
}

.asic-table tr.hosted-row:hover {
    background: linear-gradient(90deg, rgba(247, 147, 26, 0.08) 0%, rgba(247, 147, 26, 0.03) 100%);
}

/* =============================================
   TOOLS - COMPLETE REDESIGN
============================================= */
.calc-tools {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
}

.calc-tools .container {
    max-width: 960px;
}

.tools-header {
    text-align: center;
    margin-bottom: 48px;
}

.tools-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--brand-orange-light);
    color: var(--brand-orange);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.tools-header h2 {
    margin-bottom: 8px;
}

.tools-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-orange) 0%, #FBBF24 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.tool-card:hover {
    border-color: var(--brand-orange);
    box-shadow: 0 12px 40px rgba(247, 147, 26, 0.12);
    transform: translateY(-4px);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-orange-light) 0%, #FEF3E2 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.tool-icon svg {
    color: var(--brand-orange);
}

.tool-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.tool-card .tool-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

.tool-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-input-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    -moz-appearance: textfield;
    box-sizing: border-box;
}

.tool-input-group input::-webkit-outer-spin-button,
.tool-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tool-input-group input:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: white;
    box-shadow: 0 0 0 4px rgba(247, 147, 26, 0.1);
}

/* Input with button */
.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1;
    min-width: 0;
}

.btn-orange {
    background: var(--brand-orange);
    color: white;
    padding: 10px 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-orange:hover {
    background: var(--brand-orange-hover);
}

/* Results grid for Solo Mining */
.tool-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
}

.result-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-value.highlight {
    color: var(--brand-green);
}

/* Electrical inputs row */
.tool-inputs-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.tool-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--brand-orange-light);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.tool-info-box svg {
    color: var(--brand-orange);
    flex-shrink: 0;
}

.tool-info-box strong {
    color: var(--brand-orange);
    font-weight: 700;
}

/* Hashrate grid */
.hashrate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Tools responsive */
@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .tool-inputs-row {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .tool-card {
        padding: 20px;
    }
    
    .hashrate-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-results-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   POOLS
============================================= */
.calc-pools {
    padding: 64px 0;
}

.calc-pools h2 {
    text-align: center;
    margin-bottom: 12px;
}

.calc-pools .section-desc {
    text-align: center;
    margin-bottom: 40px;
}

.pools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.pool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.pool-card:hover {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pool-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pool-share {
    font-size: 0.8rem;
    color: var(--brand-orange);
    font-weight: 600;
    margin-bottom: 4px;
}

.pool-fee {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================
   GUIDE
============================================= */
.calc-guide {
    padding: 64px 0;
    background: var(--bg-secondary);
}

.calc-guide h2 {
    text-align: center;
    margin-bottom: 40px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--brand-orange);
    border-radius: var(--radius-xl);
    padding: 28px;
}

.guide-section:hover {
    box-shadow: var(--shadow-md);
}

.guide-section h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.guide-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.guide-section p:last-child { margin-bottom: 0; }

.guide-section ul {
    margin: 12px 0;
    padding-left: 20px;
}

.guide-section li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    list-style: disc;
}

.guide-section li::marker {
    color: var(--brand-orange);
}

.guide-section code {
    padding: 2px 8px;
    background: var(--brand-orange-light);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--brand-orange);
}

/* =============================================
   FAQ
============================================= */
.calc-faq {
    padding: 64px 0;
}

.calc-faq h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.faq-item summary {
    padding: 18px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    float: right;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-muted);
}

.faq-item[open] summary::after { content: '−'; }

.faq-item p {
    padding: 0 24px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* =============================================
   CTA
============================================= */
.calc-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1E293B 50%, var(--bg-dark) 100%);
    border-top: 4px solid var(--brand-orange);
    text-align: center;
}

.calc-cta h2 {
    color: white;
    margin-bottom: 12px;
}

.calc-cta > .container > p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 32px;
    font-size: 1.125rem;
}

.cta-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cta-btns .btn-primary {
    background: linear-gradient(135deg, var(--brand-orange) 0%, #E8850F 100%);
    padding: 16px 32px;
    font-size: 1rem;
}

.cta-btns .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(247, 147, 26, 0.4);
}

.cta-btns .btn-outline {
    border-color: rgba(255,255,255,0.3);
    color: white;
    padding: 16px 32px;
}

.cta-btns .btn-outline:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1200px) {
    .calc-grid { grid-template-columns: 1fr 380px; }
    .top-miners-grid { grid-template-columns: repeat(3, 1fr); }
    .pools-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .share-sidebar { display: none; }
    .calc-grid { grid-template-columns: 1fr; }
    .calc-results { position: static; }
    .top-miners-grid { grid-template-columns: repeat(2, 1fr); }
    .guide-grid { grid-template-columns: 1fr; }
    
    /* Centrage sur tablette/mobile */
    .calc-inputs,
    .featured-machine,
    .result-card {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .live-bar { top: 72px; }
    .calc-toc { top: 120px; }
    
    .calc-hero { padding: 120px 0 32px; }
    
    .toc-list { justify-content: flex-start; }
    
    .calc-modes { width: 100%; }
    .mode-btn { flex: 1; padding: 10px 8px; font-size: 0.8rem; }
    
    .periods-grid { grid-template-columns: repeat(3, 1fr); }
    .roi-grid { grid-template-columns: 1fr; }
    
    .top-miners-grid { grid-template-columns: 1fr; }
    .pools-grid { grid-template-columns: repeat(2, 1fr); }
    
    .cta-btns { flex-direction: column; }
    
    .tooltip-btn::after {
        left: auto;
        right: 0;
        top: 28px;
        transform: none;
    }
    
    /* Mobile centrage fix */
    .calc-page .container {
        padding: 0 16px;
    }
    
    .calc-inputs {
        padding: 20px 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .featured-machine {
        margin-left: 0;
        margin-right: 0;
        padding: 36px 16px 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .featured-content {
        width: 100%;
    }
    
    .featured-info {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .featured-right {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .featured-profit {
        padding: 16px;
        width: auto;
        max-width: 260px;
    }
    
    .featured-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .result-card {
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .profit-value { font-size: 2rem; }
    .periods-grid { grid-template-columns: repeat(2, 1fr); }
    .pools-grid { grid-template-columns: 1fr; }
    
    /* Extra small screens */
    .calc-page .container {
        padding: 0 12px;
    }
    
    .calc-inputs {
        padding: 16px 12px;
    }
    
    .featured-machine {
        padding: 32px 12px 16px;
    }
    
    .featured-badge {
        font-size: 0.65rem;
        padding: 6px 12px;
    }
    
    .featured-info h4 {
        font-size: 1.1rem;
    }
    
    .featured-info p {
        font-size: 0.8rem;
    }
    
    .spec-item {
        padding: 8px 10px;
        min-width: 60px;
    }
    
    .spec-value {
        font-size: 1rem;
    }
    
    .featured-btn {
        font-size: 0.85rem;
        padding: 12px 16px;
    }
}

/* =============================================
   ORANGE ACCENTS (Global enhancements)
============================================= */
.calc-hero h1 {
    color: var(--text-primary);
}

.calc-hero h1 span {
    color: var(--brand-orange);
}

.result-card {
    border-top: 3px solid var(--brand-orange);
}

.asic-table thead {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--brand-orange-light) 100%);
}

.faq-item summary:hover {
    color: var(--brand-orange);
}