/* ANTDChain Explorer Styles */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --danger-color: #7209b7;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-dark {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Footer */
.footer {
    border-top: 1px solid #dee2e6;
}

/* Table styles */
.table {
    background-color: white;
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Badge styles */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

/* List group items */
.list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.list-group-item:first-child {
    border-top: none;
}

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

/* Search form */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

/* Status indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--danger-color);
}

.status-syncing {
    color: var(--warning-color);
}

/* Address and hash display */
.address-link, .hash-link {
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Courier New', monospace;
}

.address-link:hover, .hash-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Value display */
.value-positive {
    color: #28a745;
    font-weight: 600;
}

.value-negative {
    color: #dc3545;
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-info {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.alert-warning {
    background-color: rgba(247, 37, 133, 0.1);
    color: var(--warning-color);
}

.alert-success {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success-color);
}

/* Block and transaction details */
.detail-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 150px;
}

.detail-value {
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .detail-label {
        min-width: 120px;
    }
}

/* Animation for new blocks/transactions */
@keyframes highlight {
    0% { background-color: rgba(67, 97, 238, 0.1); }
    100% { background-color: transparent; }
}

.highlight-new {
    animation: highlight 2s ease-out;
}

/* Loading spinner */
.spinner {
    width: 3rem;
    height: 3rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Code display for contract code */
.code-display {
    background-color: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Tooltip enhancement */
.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 1rem;
    background-color: var(--dark-color);
    font-size: 0.875rem;
}
