/* ========== ZEUS CHAIN EXPLORER - 增强版样式 ========== */

/* Tab 导航 */
.explorer-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.explorer-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: #a0aec0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.explorer-tab:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.1);
}

.explorer-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* Tab 内容 */
.tab-content {
    display: none;
    margin-top: 2rem;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* 区块列表 */
.block-item {
    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: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.block-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.block-number {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.block-time {
    color: #a0aec0;
    font-size: 0.7rem;
}

.block-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 4px;
}

.detail-item .label {
    color: #9ca3af;
    font-size: 0.7rem;
}

.detail-item .value {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}
    font-weight: 500;
}

/* 交易列表 */
.tx-item {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.tx-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.tx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tx-hash {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    color: #10b981;
}

.tx-status {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.tx-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.tx-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.tx-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.tx-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.detail-row .label {
    color: #a0aec0;
    min-width: 60px;
}

.detail-row .value {
    color: #fff;
}

/* 代币列表 */
.token-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(184, 134, 11, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.token-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.token-icon {
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
}

.token-info {
    flex: 1;
}

.token-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.token-symbol {
    color: #a0aec0;
    font-size: 0.875rem;
}

.token-address {
    font-family: monospace;
    color: #6366f1;
}

/* 搜索结果卡片 */
.search-result-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    animation: slideIn 0.3s;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.result-header h3 {
    color: #fff;
    margin: 0;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.badge.contract {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

.badge.address {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.badge.block {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.info-row .label {
    color: #a0aec0;
    min-width: 120px;
    font-weight: 500;
}

.info-row .value {
    color: #fff;
    flex: 1;
}

.info-row .value.highlight {
    color: #10b981;
    font-weight: 600;
    font-size: 1.1em;
}

.info-row .value.hash {
    font-family: monospace;
    color: #6366f1;
    font-size: 0.9em;
}

.info-row .value.selectable {
    user-select: all;
}

.info-row .value.link {
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.info-row .value.link:hover {
    color: #8b5cf6;
}

.copy-btn {
    padding: 0.25rem 0.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: #6366f1;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(1.1);
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.action-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* 加载和错误状态 */
.loading {
    text-align: center;
    padding: 3rem;
    color: #a0aec0;
    font-size: 1.2em;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    margin-top: 1rem;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .explorer-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .explorer-tab {
        white-space: nowrap;
    }

    .block-details {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-row .label {
        min-width: auto;
    }
}

/* 容器布局 */
#blocksContainer,
#transactionsContainer,
#tokensContainer {
    min-height: 200px;
}

/* Hash 样式统一 */
.hash {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* 网络状态指示器 */
.network-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin: 1rem 0;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 统计卡片增强 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card-enhanced {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.stat-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.stat-icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-label-enhanced {
    color: #a0aec0;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value-enhanced {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 600;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .block-item,
    .transaction-item {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.6rem;
        border-radius: 6px;
    }
    
    .block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        margin-bottom: 0.4rem;
    }
    
    .block-number {
        font-size: 0.9rem;
    }
    
    .block-time {
        font-size: 0.65rem;
    }
    
    .block-details {
        gap: 0.5rem;
    }
    
    .detail-item {
        padding: 0.2rem 0.4rem;
        gap: 0.25rem;
        font-size: 0.7rem;
    }
    
    .detail-item .label {
        font-size: 0.65rem;
    }
    
    .detail-item .value {
        font-size: 0.7rem;
    }
    
    .hash-value {
        font-size: 0.65rem;
    }
    
    /* Tab优化 */
    .explorer-tabs {
        gap: 0.3rem;
    }
    
    .explorer-tab {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .block-item,
    .transaction-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .block-details {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .detail-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .explorer-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}
