/* Blockchain Explorer Styles */

.search-section {
    padding: 4rem 2rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.search-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.search-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--text);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box button {
    padding: 1rem 2rem;
    white-space: nowrap;
}

/* Stats Section */
.stats-section {
    padding: 2rem;
    background: var(--bg-alt);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

/* Content Section */
.content-section {
    padding: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Table */
.table-container {
    background: var(--bg-alt);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.explorer-table {
    width: 100%;
    border-collapse: collapse;
}

.explorer-table thead {
    background: var(--bg);
}

.explorer-table th {
    padding: 1rem;
    text-align: left;
    color: var(--primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.explorer-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.explorer-table tbody tr:hover {
    background: var(--bg);
    cursor: pointer;
}

.explorer-table tbody tr:last-child td {
    border-bottom: none;
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem !important;
}

.hash-short {
    font-family: 'Courier New', monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.address-short {
    font-family: 'Courier New', monospace;
    color: var(--secondary);
    font-size: 0.9rem;
}

.amount {
    color: var(--success);
    font-weight: 600;
}

.timestamp {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Detail View */
.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.detail-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-alt);
    border-radius: 8px;
}

.detail-label {
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    color: var(--text);
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.tx-list {
    list-style: none;
    padding: 0;
}

.tx-item {
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.tx-item:hover {
    border-color: var(--primary);
}

.tx-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.tx-id {
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.9rem;
}

.tx-amount {
    color: var(--success);
    font-weight: bold;
}

.tx-details {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-large {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg);
    padding: 2rem;
    border-radius: 15px;
    position: relative;
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 1;
}

.modal-close:hover {
    color: var(--text);
}

/* Error State */
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--danger);
}

.error-message h3 {
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(39, 174, 96, 0.2);
    color: var(--success);
}

.badge-info {
    background: rgba(74, 144, 226, 0.2);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .explorer-table {
        font-size: 0.85rem;
    }
    
    .explorer-table th,
    .explorer-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .detail-item {
        grid-template-columns: 1fr;
    }
    
    .modal-large {
        width: 95%;
        max-height: 95vh;
    }
}
