/* 流动性页面专用样式 */

.liquidity-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
}

/* 添加流动性按钮样式 */
.liquidity-card .btn-primary {
    width: 100%;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.liquidity-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.liquidity-card .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.liquidity-card .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

/* 空白状态样式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
}

.empty-state .empty-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-state .empty-text h4 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.empty-state .empty-text p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.liquidity-card {
    margin-bottom: 30px;
}

.liquidity-tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn.active {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.tab-btn:hover:not(.active) {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* 代币对选择器 */
.token-pair-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.token-selector {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.token-selector:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.token-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    overflow: hidden;
}

.token-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.token-info {
    flex: 1;
}

.token-symbol {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

.token-name {
    font-size: 12px;
    color: #6b7280;
}

.pair-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border-radius: 50%;
    color: #6b7280;
    font-size: 14px;
}

/* 流动性输入 */
.liquidity-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-input-wrapper .input-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    height: 48px;
    box-sizing: border-box;
}

.amount-input-wrapper .input-field:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.max-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-width: auto;
    height: 48px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-info {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

/* 价格信息 */
.price-info {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-label {
    font-size: 14px;
    color: #6b7280;
}

.price-value {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

/* 流动性池选择器 */
.liquidity-pool-selector {
    margin-bottom: 16px;
}

.pool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 6px;
    background: #ffffff;
}

.pool-item:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.pool-item.selected {
    border-color: #1a1a1a;
    background: #f3f4f6;
}

.pool-tokens {
    display: flex;
    gap: -8px;
}

.pool-tokens .token-icon {
    width: 24px;
    height: 24px;
    margin-left: -8px;
}

/* 流动性池搜索框 */
.pool-search {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.pool-search .input-field {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
}

/* 流动性池列表容器 */
.pool-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 16px 16px 16px;
}

.pool-list::-webkit-scrollbar {
    width: 4px;
}

.pool-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.pool-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.pool-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.pool-tokens .token-icon:first-child {
    margin-left: 0;
}

.pool-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 50%;
}

.pool-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.2;
}

.pool-share {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
}

.pool-value {
    font-weight: 500;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
    line-height: 1.2;
    flex: 1;
    max-width: 50%;
    word-break: break-all;
}

/* 百分比按钮 */
.percentage-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.percentage-buttons .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

/* 我的流动性池 */
.liquidity-pools {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pool-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.pool-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pool-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pool-header .pool-tokens {
    display: flex;
    gap: -8px;
}

.pool-header .token-icon {
    width: 32px;
    height: 32px;
    margin-left: -8px;
}

.pool-header .token-icon:first-child {
    margin-left: 0;
}

.pool-header .pool-info {
    flex: 1;
}

.pool-header .pool-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.pool-header .pool-apy {
    font-size: 14px;
    color: #10b981;
    font-weight: 500;
}

.pool-header .pool-value {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.pool-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.detail-row span:first-child {
    color: #6b7280;
}

.detail-row span:last-child {
    color: #1a1a1a;
    font-weight: 500;
}

.pool-actions {
    display: flex;
    gap: 8px;
}

.pool-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.token-search {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.token-search .input-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.token-search .input-field:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.token-list {
    max-height: 300px;
    overflow-y: auto;
}

.token-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.token-item:hover {
    background: #f9fafb;
}

.token-item:last-child {
    border-bottom: none;
}

.token-item .token-icon {
    width: 32px;
    height: 32px;
}

.token-item .token-info {
    flex: 1;
}

.token-item .token-symbol {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}

.token-item .token-name {
    font-size: 12px;
    color: #6b7280;
}

.token-balance {
    font-size: 12px;
    color: #6b7280;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .liquidity-container {
        padding: 16px;
    }
    
    .token-pair-selector {
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    .token-selector {
        flex: 1;
        min-width: 0;
    }
    
    .pair-separator {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .liquidity-inputs {
        gap: 12px;
    }
    
    .pool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pool-actions {
        flex-direction: column;
    }
    
    .modal {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .liquidity-container {
        padding: 0px;
    }
    
    .token-pair-selector {
        padding: 16px;
    }
    
    .token-selector {
        padding: 10px 12px;
    }
    
    .pool-card {
        padding: 16px;
    }
    
    .pool-actions .btn {
        padding: 10px 12px;
        font-size: 14px;
    }
}