* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f1419;
    color: #e1e8ed;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #15202b;
    padding: 30px 0;
    border-bottom: 1px solid #38444d;
    margin-bottom: 30px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.logo {
    width: 128px;
    height: 128px;
    object-fit: contain;
    position: absolute;
    right: 20px;
    top: 0;
}

h1 {
    color: #1da1f2;
    margin: 0;
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: 700;
}

.title-link {
    color: #1da1f2;
    text-decoration: none;
    transition: opacity 0.2s;
}

.title-link:hover {
    opacity: 0.8;
}

.search-bar {
    display: flex;
    gap: 10px;
    max-width: 600px;
    width: 100%;
}

#searchInput {
    flex: 1;
    padding: 12px 16px;
    background: #192734;
    border: 1px solid #38444d;
    border-radius: 4px;
    color: #e1e8ed;
    font-size: 16px;
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: #1da1f2;
}

#searchButton {
    padding: 12px 24px;
    background: #1da1f2;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#searchButton:hover {
    background: #1a8cd8;
}

/* Network Stats */
.network-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #15202b;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #38444d;
}

.stat-label {
    color: #8899a6;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #e1e8ed;
    font-size: 24px;
    font-weight: 700;
}

/* Content Sections */
.content-section {
    background: #15202b;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #38444d;
    margin-bottom: 20px;
}

h2 {
    color: #e1e8ed;
    margin-bottom: 20px;
    font-size: 1.8em;
}

h3 {
    color: #e1e8ed;
    margin: 30px 0 15px 0;
    font-size: 1.4em;
}

/* Loading & Error */
.loading {
    text-align: center;
    padding: 40px;
    color: #8899a6;
    font-size: 18px;
}

.error {
    background: #dc3545;
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #192734;
}

th {
    padding: 15px;
    text-align: left;
    color: #8899a6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-top: 1px solid #38444d;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #192734;
}

.clickable {
    color: #1da1f2;
    cursor: pointer;
    text-decoration: none;
}

.clickable:hover {
    text-decoration: underline;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    color: #8899a6;
    font-size: 14px;
    font-weight: 600;
}

.detail-value {
    color: #e1e8ed;
    font-size: 16px;
    word-break: break-all;
}

/* Balance highlighted */
#addressBalanceConfirmed,
#addressBalanceUnconfirmed {
    font-size: 28px;
    font-weight: 700;
    color: #1da1f2;
}

.monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Transaction List */
.tx-item {
    background: #192734;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #38444d;
    cursor: pointer;
    transition: background 0.2s;
}

.tx-item:hover {
    background: #1c2a38;
}

.tx-hash {
    color: #1da1f2;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    word-break: break-all;
}

/* Back Button */
.back-button {
    padding: 10px 20px;
    background: #192734;
    border: 1px solid #38444d;
    border-radius: 4px;
    color: #1da1f2;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.back-button:hover {
    background: #1c2a38;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #8899a6;
    font-size: 14px;
    border-top: 1px solid #38444d;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .search-bar {
        flex-direction: column;
    }

    .network-stats {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px;
    }
}

/* Truncate long hashes */
.hash-short {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .hash-short {
        max-width: 200px;
    }
}

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

.content-section {
    animation: fadeIn 0.3s ease-out;
}
