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

:root {
    --primary: #000000;
    --secondary: #32373c;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #1a1a1a;
    --dark: #000000;
    --border: #32373c;
    --text: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--primary);
}

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

header {
    background: var(--primary);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--secondary);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    height: 80px;
    width: auto;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #e74c3c;
    font-weight: bold;
}

header .subtitle {
    opacity: 0.9;
    font-size: 1.1rem;
}

section {
    background: var(--light);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

h2 {
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.status-card {
    background: var(--primary);
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--border);
}

.status-label {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tooltip {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: help;
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 13px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--dark);
    z-index: 1000;
}

.status-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

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

.search-bar button {
    padding: 0.75rem 2rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: var(--primary);
}

#searchResult {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 6px;
    display: none;
}

#searchResult.show {
    display: block;
}

#searchResult pre {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--light);
}

th {
    background: var(--secondary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

td a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

td a:hover {
    color: #2980b9;
    text-decoration: underline;
}

tbody tr:hover {
    background: var(--secondary);
}

.hash {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #3498db;
    word-break: break-all;
}

.clickable {
    cursor: pointer;
    color: #3498db;
    text-decoration: underline;
}

.clickable:hover {
    color: #2980b9;
    text-decoration: underline;
}

.loading {
    text-align: center;
    color: #999;
    font-style: italic;
}

.error {
    background: #fee;
    color: var(--danger);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--danger);
}

.success {
    background: #efe;
    color: var(--success);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--success);
}

footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
}

.tip-jar {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tip-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #999;
}

.tip-addresses {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tip-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-label {
    font-size: 0.85rem;
    color: #999;
}

.tip-address code {
    background: var(--secondary);
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    user-select: all;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.chart-container {
    background: var(--primary);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.chart-container h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.chart-container canvas {
    max-height: 300px;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

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

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

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }
}
