/* ========== ZEUS CHAIN EXPLORER PRO - 专业优化样式 ========== */

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

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

.explorer-tab:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.explorer-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* 搜索结果模态框 */
.search-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;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

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

.search-result-header h2 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-modal {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

.search-result-body {
    padding: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s;
}

.result-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.result-item .label {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 120px;
}

.result-item .value {
    color: #fff;
    font-size: 0.875rem;
    word-break: break-all;
    text-align: right;
    flex: 1;
}

.value.copyable {
    cursor: pointer;
    color: #6366f1;
    transition: color 0.3s;
}

.value.copyable:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* 区块和交易列表优化 - 紧凑版 */
.block-item,
.transaction-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

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

.block-number,
.tx-hash {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.block-number .label,
.tx-hash .label {
    color: #9ca3af;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.block-number .value {
    color: #10b981;
    font-size: 1rem;
    font-weight: 700;
}

.tx-hash .value {
    color: #6366f1;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

.block-time,
.tx-status {
    color: #9ca3af;
    font-size: 0.7rem;
}

.tx-status {
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    font-weight: 600;
    font-size: 0.7rem;
}

/* 横向显示详情 */
.block-details,
.tx-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

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

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

.detail-value.address {
    color: #6366f1;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
}

.block-hash,
.tx-hash-full {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.hash-label {
    color: #9ca3af;
    font-size: 0.65rem;
    display: inline;
    margin-right: 0.5rem;
}

.hash-value {
    color: #6366f1;
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    cursor: pointer;
    transition: color 0.3s;
}

.hash-value:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* 代币列表 */
.token-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.token-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

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

.token-name {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
}

.token-symbol {
    color: #10b981;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.token-address {
    color: #6366f1;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: color 0.3s;
}

.token-address:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* 全局加载器 */
.global-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-message {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
}

/* Tab 内容容器 */
#latestBlocksList,
#latestTransactionsList,
#tokensList {
    min-height: 300px;
}

/* 空状态和错误状态 */
.empty-message,
.error-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #9ca3af;
    font-size: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 12px;
    border: 1px dashed rgba(99, 102, 241, 0.3);
}

.empty-message::before {
    content: "📭";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-message {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.error-message::before {
    content: "⚠️";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading-skeleton {
    background: linear-gradient(90deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(139, 92, 246, 0.15) 50%,
        rgba(99, 102, 241, 0.05) 100%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
}

.loading-skeleton::before {
    content: "⏳";
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 刷新按钮 */
#refreshDataBtn {
    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;
    margin-bottom: 1rem;
}

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

#refreshDataBtn:active {
    transform: translateY(0);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-item .label {
        margin-bottom: 0.5rem;
    }

    .result-item .value {
        text-align: left;
    }

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

    .detail-item,
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-label {
        margin-bottom: 0.25rem;
    }
}

/* 数字动画优化 */
.stat-value {
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-value.updating {
    color: #10b981;
    transform: scale(1.1);
}

/* 高级统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card-pro {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card-pro:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.stat-card-pro .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.stat-card-pro .stat-label {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-card-pro .stat-value {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
}

.stat-card-pro .stat-change {
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.stat-card-pro .stat-change.negative {
    color: #ef4444;
}

/* RPC 状态指示器 */
.rpc-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

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

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

.rpc-status-dot.disconnected {
    background: #ef4444;
    animation: none;
}

.rpc-status-text {
    color: #9ca3af;
    font-size: 0.875rem;
}

.rpc-latency {
    color: #10b981;
    font-weight: 600;
    margin-left: auto;
}
