/* Explorer Specific Styles */

.explorer-container {
    min-height: 100vh;
    padding: 120px 0 60px;
    background: var(--primary-bg);
}

/* Search Section */
.search-section {
    text-align: center;
    margin-bottom: 3rem;
}

.search-section h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.search-bar {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-bar input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-btn {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border: none;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.search-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Chain Stats */
.chain-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card-explorer {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card-explorer:hover {
    border-color: var(--primary-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.stat-icon-explorer {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Explorer Grid */
.explorer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.explorer-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.explorer-card:hover {
    border-color: var(--primary-accent);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.view-all {
    color: var(--primary-accent);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: var(--secondary-accent);
    transform: translateX(5px);
}

/* Blocks List */
.blocks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.block-item {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.block-item:hover {
    border-color: var(--primary-accent);
    transform: translateX(5px);
}

.block-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.block-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.block-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.block-number {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-accent);
}

.block-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.block-details {
    text-align: right;
}

.block-validator {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.block-txs {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Transactions List */
.transactions-list-explorer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item-explorer {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transaction-item-explorer:hover {
    border-color: var(--primary-accent);
    transform: translateX(5px);
}

.tx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.tx-hash {
    font-family: 'Courier New', monospace;
    color: var(--primary-accent);
    font-weight: 600;
    font-size: 0.875rem;
}

.tx-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tx-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.tx-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.tx-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.tx-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tx-addresses {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.tx-from, .tx-to-addr {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
}

.tx-arrow-icon {
    color: var(--primary-accent);
}

.tx-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* Top Tokens Section */
.top-tokens-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
}

.top-tokens-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.tokens-table {
    overflow-x: auto;
}

.tokens-table table {
    width: 100%;
    border-collapse: collapse;
}

.tokens-table thead {
    background: var(--secondary-bg);
}

.tokens-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tokens-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
}

.tokens-table tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tokens-table tbody tr:hover {
    background: var(--secondary-bg);
}

.token-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.token-name {
    font-weight: 600;
    font-size: 1rem;
}

.token-symbol {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.positive {
    color: #10b981;
    font-weight: 600;
}

.negative {
    color: #ef4444;
    font-weight: 600;
}

/* Detail Modal */
.modal-content.large {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    padding: 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.detail-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
    word-break: break-all;
}

.detail-value.hash {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-accent);
}

.copy-btn {
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-accent);
    color: white;
    border-color: var(--primary-accent);
}

/* Network Button */
.network-icon {
    font-size: 1.25rem;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 968px) {
    .explorer-grid {
        grid-template-columns: 1fr;
    }

    .search-section h1 {
        font-size: 2rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        height: 50px;
    }

    .chain-stats {
        grid-template-columns: 1fr;
    }

    .tokens-table {
        font-size: 0.875rem;
    }

    .tokens-table th,
    .tokens-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 600px) {
    .explorer-container {
        padding: 100px 0 40px;
    }

    .block-item,
    .transaction-item-explorer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .block-details,
    .tx-body {
        width: 100%;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-label {
        flex: none;
    }
}
