:root {
    --standard-rate: #60a5fa;
    --ai-rate: #10b981;
    --loss-color: #ef4444;
    --gain-color: #10b981;
    --network-particle: #8b5cf6;
}

#swap-comparison {
    padding: 100px 0;
    border-top: 1px solid rgba(30, 41, 59, 0.3);
}

#swap-comparison h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

#swap-comparison>p {
    text-align: center;
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 64px;
}

.swap-panels-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.vs-divider span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--muted);
    background: var(--panel);
    padding: 12px 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.profit-difference {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gain-color);
    white-space: nowrap;
}

.swap-panel {
    background: linear-gradient(180deg, #0f172a, #020617);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    transition: border-color 0.5s, box-shadow 0.5s;
    position: relative;
    overflow: hidden;
}

.swap-panel.standard.active {
    border-color: var(--loss-color);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

.swap-panel.ai-optimized.active {
    border-color: var(--network-particle);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.panel-header {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.panel-tab {
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: default;
}

.panel-tab.active {
    background: var(--panel);
    color: white;
    font-weight: 600;
}

.exchange-box {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.exchange-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.exchange-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exchange-amount {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    font-variant-numeric: tabular-nums;
}

.currency-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
}

.currency-badge .chain {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.currency-badge .chain.bsc {
    background: #f0b90b;
    color: black;
}

.currency-badge .chain.eth {
    background: #627eea;
    color: white;
}

.rate-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.fees-tag {
    color: var(--muted);
}

.exchange-rate {
    font-weight: 600;
}

.ai-rate {
    color: var(--gain-color);
}

.swap-arrow {
    display: flex;
    justify-content: flex-end;
    padding: 8px 0;
}

.swap-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--gain-color);
}

.result-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s;
}

.result-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.result-indicator.loss {
    background: rgba(239, 68, 68, 0.1);
    color: var(--loss-color);
}

.result-indicator.gain {
    background: rgba(16, 185, 129, 0.1);
    color: var(--gain-color);
}

.bonus-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 8px;
}

.bonus-note.ai-bonus {
    color: var(--gain-color);
    font-weight: 600;
}

.wallet-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.wallet-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.wallet-input {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    color: var(--muted);
    font-size: 0.9rem;
    width: 100%;
}

.wallet-input.ai-filled {
    border-color: var(--gain-color);
    color: white;
}

.replay-controls {
    text-align: center;
    margin-top: 40px;
}

.replay-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.replay-btn:hover {
    border-color: var(--accent);
    color: white;
}

.swap-explanation {
    max-width: 700px;
    margin: 48px auto 0;
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
}

.swap-cta {
    text-align: center;
    margin-top: 40px;
}

@media (max-width: 900px) {
    .swap-panels-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .vs-divider {
        flex-direction: row;
        padding: 16px 0;
    }

    .vs-divider::before,
    .vs-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

    .swap-panel {
        padding: 24px;
    }

    .exchange-amount {
        font-size: 1.6rem;
    }
}

.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
}

.mobile-sticky-cta .btn-primary {
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .mobile-sticky-cta {
        display: block;
    }

    body {
        padding-bottom: 100px;
    }
}