/* Swap Specific Styles */

.swap-container {
    min-height: 100vh;
    padding: 120px 0 60px;
    background: var(--primary-bg);
}

.swap-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Swap Card */
.swap-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.swap-card:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.2);
}

.swap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.swap-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.swap-settings {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--secondary-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: var(--card-bg);
    color: var(--primary-accent);
    border-color: var(--primary-accent);
    transform: rotate(90deg);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Token Input */
.token-input-container {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.token-input-container::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(139, 92, 246, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.token-input-container:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.token-input-container:focus-within {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.token-input-container:focus-within::before {
    opacity: 1;
}

.token-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.balance {
    transition: color 0.3s ease;
}

.balance:hover {
    color: var(--primary-accent);
}

.token-input-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.token-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    transition: color 0.2s ease;
}

.token-amount-input:focus {
    color: var(--primary-accent);
}

.token-amount-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.token-amount-input:focus::placeholder {
    opacity: 0.7;
}

.token-select-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.token-select-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.token-select-btn:active {
    transform: translateY(0);
}

.token-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.token-select-btn:hover .token-icon {
    transform: scale(1.1);
}

.token-symbol {
    font-weight: 600;
    font-size: 1rem;
}

.chevron {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.token-select-btn:hover .chevron {
    transform: translateY(2px);
}

.token-usd-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Switch Button */
.switch-container {
    display: flex;
    justify-content: center;
    margin: -1rem 0;
    position: relative;
    z-index: 2;
}

.switch-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 2px solid var(--primary-accent);
    color: var(--primary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.switch-btn:hover {
    background: var(--primary-accent);
    color: white;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.switch-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.switch-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

/* Swap Info */
.swap-info {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.price-impact {
    color: #10b981;
}

.price-impact.high {
    color: #ef4444;
}

/* Swap Button */
.swap-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: var(--gradient-1);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.swap-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.swap-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.swap-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.swap-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.swap-btn:disabled {
    opacity: 0.6;
    background: rgba(99, 102, 241, 0.3);
}

/* Loading state */
.swap-btn.loading {
    pointer-events: none;
}

.swap-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    pointer-events: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Stats Panel */
.stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.stat-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 12px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* Recent Transactions */
.recent-transactions {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.recent-transactions h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    border-color: var(--primary-accent);
    transform: translateX(5px);
}

.tx-tokens {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.tx-from {
    color: var(--text-primary);
}

.tx-arrow {
    color: var(--primary-accent);
    font-size: 1.25rem;
}

.tx-to {
    color: var(--secondary-accent);
}

.tx-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.tx-time {
    color: var(--text-secondary);
}

.tx-address {
    color: var(--primary-accent);
    font-family: 'Courier New', monospace;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 27, 46, 0.98) 0%, rgba(22, 33, 62, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.1);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 钱包选择模态框 - 更紧凑 */
#walletModal .modal-content {
    max-width: 360px;
    padding: 28px;
}

/* 代币选择模态框 - 稍宽一些 */
#tokenModal .modal-content {
    max-width: 400px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    transform: rotate(90deg);
}

/* 模态框滚动条样式 */
.token-list::-webkit-scrollbar {
    width: 6px;
}

.token-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.token-list::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

.token-list::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

.modal-search {
    margin-bottom: 1rem;
}

.modal-search input {
    width: 100%;
    padding: 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.modal-search input:focus {
    border-color: var(--primary-accent);
}

.token-list {
    overflow-y: auto;
    max-height: 350px;
    padding: 4px 0;
}

.token-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.token-list-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}

.token-list-item img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.token-info {
    flex: 1;
}

.token-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.token-fullname {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.token-balance {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 钱包选项样式 */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
}

.wallet-option:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.wallet-option:active {
    transform: translateY(0);
}

/* 钱包图标容器 */
.wallet-icon-wrapper {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.wallet-option:hover .wallet-icon-wrapper {
    transform: scale(1.05) rotate(-5deg);
}

.wallet-icon-wrapper svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.wallet-option span {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Settings Content */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.setting-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slippage-buttons {
    display: flex;
    gap: 0.5rem;
}

.slippage-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.slippage-btn:hover {
    background: var(--card-bg);
    border-color: var(--primary-accent);
}

.slippage-btn.active {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: white;
}

.slippage-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.slippage-input:focus {
    border-color: var(--primary-accent);
}

.deadline-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deadline-input input {
    width: 100px;
    padding: 0.75rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
}

.deadline-input input:focus {
    border-color: var(--primary-accent);
}

/* Wallet Connected State */
.wallet-icon {
    font-size: 1.25rem;
}

.btn-secondary.connected {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

/* Responsive */
@media (max-width: 968px) {
    .swap-wrapper {
        grid-template-columns: 1fr;
    }

    .stats-panel {
        grid-template-columns: 1fr;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tx-info {
        align-items: flex-start;
    }
}

/* 强制限制所有代币相关图标尺寸 */
.token-select-btn img,
.token-select-btn .token-icon,
button[class*="token"] img {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
}

.token-list-item img,
.token-list img,
#tokenList img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

@media (max-width: 600px) {
    .swap-container {
        padding: 100px 0 40px;
    }

    .swap-card {
        padding: 1rem;
    }

    .token-amount-input {
        font-size: 1.25rem;
    }

    .slippage-buttons {
        flex-wrap: wrap;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }
}

/* ========== 交易历史记录样式 ========== */
.tx-history-section {
    margin-top: 3rem;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.05),
        rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.tx-history-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.tx-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tx-history-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.tx-history-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tx-history-item {
    background: rgba(26, 26, 46, 0.6);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tx-history-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.tx-status-success {
    border-left: 4px solid #10b981;
}

.tx-status-failed {
    border-left: 4px solid #ef4444;
}

.tx-status-pending {
    border-left: 4px solid #fbbf24;
    animation: txPending 2s ease-in-out infinite;
}

@keyframes txPending {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.tx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tx-tokens {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.tx-from {
    color: #06b6d4;
}

.tx-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.tx-to {
    color: #10b981;
}

.tx-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.status-icon {
    font-size: 1rem;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.tx-status-success .status-text {
    color: #10b981;
}

.tx-status-failed .status-text {
    color: #ef4444;
}

.tx-status-pending .status-text {
    color: #fbbf24;
}

.tx-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.tx-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tx-time::before {
    content: '🕐';
}

.tx-hash {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.tx-hash:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

.tx-hash svg {
    width: 14px;
    height: 14px;
}

.tx-hash-pending {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

/* ========== 授权按钮样式 ========== */
.swap-btn.approval-needed {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    animation: approvalPulse 2s ease-in-out infinite;
}

@keyframes approvalPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(251, 191, 36, 0.6);
    }
}

.swap-btn.approval-needed::before {
    content: '🔓 ';
}

/* ========== 价格影响警告 ========== */
.price-impact.high {
    color: #ef4444 !important;
    font-weight: 700;
    animation: priceWarning 1s ease-in-out infinite;
}

@keyframes priceWarning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ========== 滑点设置优化 ========== */
.slippage-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 1.5fr;
    gap: 8px;
}

.slippage-btn {
    padding: 10px;
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slippage-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.slippage-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
}

.slippage-input {
    padding: 10px;
    background: rgba(26, 26, 46, 0.6);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    outline: none;
}

.slippage-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ========== 代币图标优化 ========== */
.token-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========== 确认交换模态框 ========== */
.confirm-swap-content {
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.confirm-icon {
    font-size: 1.5rem;
    margin-right: 8px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.confirm-swap-body {
    padding: 20px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* 确认模态框滚动条样式 */
.confirm-swap-content::-webkit-scrollbar,
.confirm-swap-body::-webkit-scrollbar {
    width: 6px;
}

.confirm-swap-content::-webkit-scrollbar-track,
.confirm-swap-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.confirm-swap-content::-webkit-scrollbar-thumb,
.confirm-swap-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

.confirm-swap-content::-webkit-scrollbar-thumb:hover,
.confirm-swap-body::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Swap Direction Display */
.confirm-swap-direction {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.05),
        rgba(139, 92, 246, 0.05));
    border-radius: 16px;
    margin-bottom: 20px;
    gap: 16px;
}

.confirm-token-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.confirm-token-item.from {
    flex-direction: row;
}

.confirm-token-item.to {
    flex-direction: row-reverse;
    text-align: right;
}

.token-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.token-icon-wrapper img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.token-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.token-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.token-symbol {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.swap-arrow-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

.swap-arrow-wrapper svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Transaction Details */
.confirm-details {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.1),
        rgba(139, 92, 246, 0.1));
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.detail-row.highlight .detail-value {
    font-size: 1rem;
    color: var(--primary-accent);
}

/* Warning */
.confirm-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
}

.confirm-warning svg {
    width: 20px;
    height: 20px;
    color: #fbbf24;
    flex-shrink: 0;
    margin-top: 2px;
}

.confirm-warning span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Action Buttons */
.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.btn-cancel {
    padding: 14px 20px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: var(--card-bg);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.btn-confirm {
    padding: 14px 20px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-confirm::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-confirm:hover::before {
    width: 300px;
    height: 300px;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.confirm-btn-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-confirm:hover .confirm-btn-icon {
    transform: translateX(4px);
}

/* ========== 响应式优化 ========== */
@media (max-width: 768px) {
    .tx-history-section {
        padding: 1.5rem;
    }

    .tx-history-item {
        padding: 1rem;
    }

    .tx-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tx-tokens {
        font-size: 0.95rem;
    }

    .tx-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .slippage-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .confirm-swap-direction {
        flex-direction: column;
        gap: 12px;
    }

    .confirm-token-item {
        width: 100%;
    }

    .confirm-token-item.to {
        flex-direction: row;
        text-align: left;
    }

    .confirm-actions {
        grid-template-columns: 1fr;
    }

    .token-amount {
        font-size: 1.25rem;
    }
}

/* ========== 增强的交易记录样式 ========== */

/* 交易记录项的主容器 */
.tx-history-item .tx-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* 交易操作区域（状态 + 删除按钮） */
.tx-history-item .tx-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 删除按钮 */
.tx-delete-btn {
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.tx-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
    opacity: 1;
    transform: scale(1.1);
}

.tx-delete-btn:active {
    transform: scale(0.95);
}

/* 代币金额和符号 */
.tx-from .tx-amount,
.tx-to .tx-amount {
    font-weight: 700;
    font-size: 1.125rem;
}

.tx-from .tx-symbol,
.tx-to .tx-symbol {
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-left: 4px;
}

/* 箭头图标 */
.tx-arrow svg {
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

/* 日期时间显示 */
.tx-datetime {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.tx-datetime svg {
    opacity: 0.7;
}

/* 改进交易哈希链接 */
.tx-hash {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: #6366f1;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.tx-hash:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #8b5cf6;
    transform: translateY(-1px);
}

/* 优化状态显示 */
.tx-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

/* 交易记录项响应式优化 */
@media (max-width: 640px) {
    .tx-history-item .tx-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tx-history-item .tx-actions {
        width: 100%;
        justify-content: space-between;
    }

    .tx-from .tx-amount,
    .tx-to .tx-amount {
        font-size: 1rem;
    }

    .tx-delete-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* ========== ZEUS 代币禁用状态样式 ========== */
.token-list-item[data-swap-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.token-list-item[data-swap-disabled="true"]:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: none;
}

.token-list-item[data-swap-disabled="true"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    pointer-events: none;
}

/* ZEUS 代币徽章 */
.token-badge {
    margin-left: auto;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* ZEUS 代币禁用提示模态框 */
.zeus-disabled-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.zeus-disabled-content {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(255, 215, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.zeus-disabled-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.zeus-disabled-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.zeus-disabled-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.zeus-disabled-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zeus-disabled-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
