/* OKX 价格挂件样式 */
.okx-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 220px;
    background: rgba(25, 28, 36, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    z-index: 9999;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.okx-widget.minimized {
    width: 60px;
    height: 60px !important;
    overflow: hidden;
}

.okx-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.okx-widget-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.okx-widget-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 4px;
}

.okx-widget-controls {
    display: flex;
    gap: 8px;
}

.okx-widget-control {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 12px;
}

.okx-widget-control:hover {
    opacity: 1;
}

.okx-widget-content {
    padding: 10px 0;
    max-height: 300px;
    overflow-y: auto;
}

.okx-widget-content::-webkit-scrollbar {
    width: 4px;
}

.okx-widget-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.okx-widget-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.crypto-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.crypto-item:last-child {
    border-bottom: none;
}

.crypto-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.crypto-info {
    display: flex;
    align-items: center;
}

.crypto-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border-radius: 50%;
}

.crypto-name {
    font-size: 14px;
    font-weight: 500;
}

.crypto-price {
    font-size: 14px;
    font-weight: 600;
}

.crypto-change {
    font-size: 12px;
    margin-left: 6px;
    padding: 2px 4px;
    border-radius: 4px;
}

.crypto-change.up {
    background: rgba(46, 174, 96, 0.2);
    color: #2eae60;
}

.crypto-change.down {
    background: rgba(242, 54, 69, 0.2);
    color: #f23645;
}

.okx-widget-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
}

.okx-widget-time {
    font-size: 11px;
}

.okx-widget-refresh {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.okx-widget-refresh:hover {
    opacity: 1;
}

.okx-widget-refresh.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .okx-widget {
        bottom: 10px;
        right: 10px;
        width: 200px;
    }
}

/* 添加账户余额区域样式 */
.okx-widget-balance {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color:rgba(25, 28, 36, 0.85);
}

.okx-balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.okx-balance-label {
    font-size: 12px;
    color: #cecdcd;
}

.okx-balance-value {
    font-size: 12px;
    font-weight: 600;
    color: #cecdcd;
}

.okx-balance-loading,
.okx-balance-warning,
.okx-balance-error {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 5px 0;
}

.okx-balance-warning,
.okx-balance-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.okx-balance-warning i {
    color: #f0ad4e;
}

.okx-balance-error i {
    color: #d9534f;
} 