/* 自定义样式 - 链上巨鲸 */

/* 毛玻璃效果增强 */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 按钮激活状态 */
.chain-btn.active,
.sort-btn.active {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #000;
}

.chain-btn:not(.active):hover,
.sort-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 交易卡片 */
.tx-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tx-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}

.tx-card.expanded {
    cursor: default;
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

/* 交易金额 */
.tx-amount {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 链标签 */
.chain-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.chain-badge.btc {
    background: rgba(247, 147, 26, 0.15);
    color: #F7931A;
}

.chain-badge.eth {
    background: rgba(108, 81, 177, 0.15);
    color: #8B5CF6;
}

.chain-badge.sol {
    background: rgba(14, 189, 114, 0.15);
    color: #0EF58B;
}

/* 交易地址 */
.tx-address {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: #94A3B8;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

/* 交易详情展开区域 */
.tx-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out;
    opacity: 0;
}

.tx-details.show {
    max-height: 600px;
    opacity: 1;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

/* 详情项 */
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.detail-label {
    color: #94A3B8;
    font-size: 0.875rem;
}

.detail-value {
    text-align: right;
    font-weight: 500;
}

/* 图标按钮 */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: #94A3B8;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

.icon-btn.copied {
    color: #10B981;
    background: rgba(16, 185, 129, 0.15);
}

/* 外部链接按钮 */
.external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.external-link:hover {
    background: rgba(139, 92, 246, 0.25);
    transform: translateY(-1px);
}

/* 刷新按钮动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.refreshing #refresh-icon {
    animation: spin 1s linear infinite;
}

/* 时间相对显示 */
.time-ago {
    color: #64748B;
    font-size: 0.875rem;
}

/* 发光效果 */
.glow-primary {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.glow-cta {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* 收起按钮 */
.collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #94A3B8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #F8FAFC;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tx-amount {
        font-size: 1.25rem;
    }

    .chain-btn,
    .sort-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 平滑过渡 */
.smooth-transition {
    transition: all 0.2s ease;
}

/* 焦点可见性（可访问性） */
*:focus-visible {
    outline: 2px solid #F59E0B;
    outline-offset: 2px;
}

/* 减少动画（尊重用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
