/* Explorer Specific Styles */

.explorer-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--dark) 0%, var(--darker) 100%);
}

.explorer-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.explorer-header p {
    color: var(--gray);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box input::placeholder {
    color: var(--gray);
}

/* Network Stats */
.network-stats {
    padding: 40px 0;
    background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-value {
    font-size: 1rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Recent Blocks */
.recent-blocks {
    padding: 60px 0;
}

.recent-blocks h2 {
    margin-bottom: 30px;
}

.blocks-table-container {
    overflow-x: auto;
}

.blocks-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
}

.blocks-table th,
.blocks-table td {
    padding: 15px 20px;
    text-align: left;
}

.blocks-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blocks-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blocks-table tr:last-child {
    border-bottom: none;
}

.blocks-table tr:hover {
    background: rgba(99, 102, 241, 0.1);
    cursor: pointer;
}

.blocks-table .height {
    font-weight: 700;
    color: var(--primary);
}

.blocks-table .hash {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--gray);
}

.blocks-table .time {
    color: var(--gray);
    font-size: 0.9rem;
}

.blocks-table .loading {
    text-align: center;
    color: var(--gray);
    padding: 40px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 50px 20px;
}

.modal.active {
    display: block;
}

.modal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--light);
}

.modal-content h2 {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content h3 {
    margin: 30px 0 15px;
    font-size: 1.1rem;
}

.block-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.detail-label {
    min-width: 120px;
    color: var(--gray);
    font-size: 0.9rem;
}

.detail-value {
    flex: 1;
    word-break: break-all;
}

.detail-value.hash {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--secondary);
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tx-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.tx-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--secondary);
    word-break: break-all;
    margin-bottom: 10px;
}

.tx-outputs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tx-output {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.tx-output .address {
    color: var(--gray);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
}

.tx-output .amount {
    color: var(--accent);
    font-weight: 600;
}

/* Address Lookup Section */
.address-lookup {
    padding: 60px 0;
    background: var(--dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.address-lookup h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.address-lookup .section-desc {
    text-align: center;
    color: var(--gray);
    margin-bottom: 30px;
}

.address-search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto 30px;
    gap: 10px;
}

.address-search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 1rem;
    font-family: inherit;
}

.address-search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.address-result {
    max-width: 800px;
    margin: 0 auto;
    background: var(--darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.address-header {
    padding: 20px;
    background: rgba(0, 229, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.address-header h3 {
    margin: 0 0 10px 0;
    color: var(--primary);
}

.address-full {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--light);
    word-break: break-all;
}

.address-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.addr-stat {
    background: var(--darker);
    padding: 20px;
    text-align: center;
}

.addr-stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.addr-stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.address-transactions {
    padding: 20px;
}

.address-transactions h4 {
    margin: 0 0 15px 0;
    color: var(--light);
}

.address-tx-list {
    max-height: 400px;
    overflow-y: auto;
}

.addr-tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.addr-tx-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.addr-tx-item.received {
    border-left-color: #4caf50;
}

.addr-tx-item.sent {
    border-left-color: #f44336;
}

.addr-tx-main {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.tx-type-icon {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.addr-tx-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.addr-tx-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--primary);
}

.addr-tx-block {
    font-size: 0.75rem;
    color: var(--gray);
}

.addr-tx-time {
    font-size: 0.75rem;
    color: var(--gray);
    min-width: 60px;
    text-align: right;
}

.addr-tx-amount {
    font-weight: 700;
    font-size: 1rem;
    min-width: 120px;
    text-align: right;
}

.addr-tx-amount.positive {
    color: #4caf50;
}

.addr-tx-amount.negative {
    color: #f44336;
}

.no-tx, .error {
    text-align: center;
    color: var(--gray);
    padding: 40px;
}

.error {
    color: #f44336;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
}

.pagination-controls button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.pagination-controls button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray);
    cursor: not-allowed;
}

.pagination-controls .page-info {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Pending Transaction Styling */
.pending-tx {
    background: rgba(255, 193, 7, 0.05);
}

.pending-tx:hover {
    background: rgba(255, 193, 7, 0.1) !important;
}

.status-pending {
    color: #ffc107 !important;
}

/* UTXO Styling */
.utxo-section {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.utxo-section h4 {
    margin: 0 0 5px 0;
    color: var(--light);
}

.section-hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.utxo-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.utxo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border-left: 3px solid #4caf50;
    transition: all 0.2s ease;
}

.utxo-item:hover {
    background: rgba(76, 175, 80, 0.15);
}

.utxo-item code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--primary);
}

.utxo-amount {
    font-weight: 700;
    color: #4caf50;
    font-size: 0.95rem;
}

.utxo-conf {
    font-size: 0.75rem;
    color: var(--gray);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
}

/* Improved Address Stats */
.addr-stat.highlight {
    background: rgba(0, 229, 255, 0.1);
}

.addr-stat-value.large {
    font-size: 1.5rem;
}

/* Clean Transaction IO Items */
.io-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.io-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.io-item.coinbase-item {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

.io-item.input-item {
    background: rgba(0, 229, 255, 0.05);
    border-left: 3px solid var(--primary);
}

.io-item.output-item {
    background: rgba(76, 175, 80, 0.08);
    border-left: 3px solid #4caf50;
}

.io-item.output-item.change {
    background: rgba(158, 158, 158, 0.08);
    border-left-color: #9e9e9e;
}

.io-icon {
    font-size: 1.2rem;
    width: 28px;
    text-align: center;
}

.io-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.io-address {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.io-address.clickable:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.io-label {
    font-size: 0.9rem;
    color: var(--light);
    font-weight: 500;
}

.io-sublabel {
    font-size: 0.75rem;
    color: var(--gray);
}

.io-amount {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--light);
    min-width: 100px;
    text-align: right;
}

.io-amount.highlight {
    color: #4caf50;
}

/* Scripts Section */
.scripts-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.scripts-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.script-status {
    color: #4caf50;
    font-weight: 500;
}

.scripts-detail {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.script-item {
    margin-bottom: 10px;
}

.script-label {
    font-size: 0.85rem;
    color: var(--gray);
    display: block;
    margin-bottom: 3px;
}

.script-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    color: var(--secondary);
    word-break: break-all;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 8px;
    border-radius: 4px;
    display: block;
}

/* Transaction IO Container */
.tx-io-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin: 20px 0;
}

.tx-inputs, .tx-outputs {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 15px;
}

.tx-inputs h4, .tx-outputs h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: var(--light);
}

.tx-arrow {
    display: flex;
    align-items: center;
    font-size: 2rem;
    color: var(--primary);
}

.io-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .search-box .btn {
        width: 100%;
    }
    
    .address-search-box {
        flex-direction: column;
    }
    
    .address-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .addr-tx-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .pool-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pool Stats Section */
.pool-stats-section {
    padding: 60px 0;
    background: linear-gradient(180deg, var(--darker) 0%, var(--dark) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pool-stats-section h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.pool-stats-section .section-desc {
    color: var(--gray);
    margin-bottom: 30px;
}

.pool-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pool-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.pool-stat-card:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.pool-stat-icon {
    font-size: 2rem;
}

.pool-stat-info {
    display: flex;
    flex-direction: column;
}

.pool-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.pool-stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.workers-table-container,
.payouts-table-container {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.workers-table-container h3,
.payouts-table-container h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.workers-table,
.payouts-table {
    width: 100%;
    border-collapse: collapse;
}

.workers-table th,
.workers-table td,
.payouts-table th,
.payouts-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.workers-table th,
.payouts-table th {
    color: var(--gray);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.workers-table tbody tr:hover,
.payouts-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.address-link {
    cursor: pointer;
    color: var(--primary);
    transition: color 0.2s;
}

.address-link:hover {
    color: #ffed4a;
    text-decoration: underline;
}

.payout-amount {
    color: var(--primary);
    font-weight: 600;
}

.pool-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    width: fit-content;
}

.pool-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.pool-status-indicator.online {
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
}

.pool-status-indicator.offline {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: none;
}

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