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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.input-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.custom-select {
    position: relative;
    width: 100%;
}

.select-selected {
    background-color: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
}

.select-selected img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
}

.select-arrow {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    transition: transform 0.3s ease;
}

.select-selected.select-arrow-active .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.select-items {
    position: absolute;
    background-color: white;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
}

.select-hide {
    display: none;
}

.select-items div {
    color: #333;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.select-items div:hover {
    background-color: #f8f9fa;
}

.select-items div img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 50%;
}

.select-items div:last-child {
    border-bottom: none;
}

#analyze-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#analyze-btn:hover {
    transform: translateY(-2px);
}

#analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-left: 4px solid #e74c3c;
}

.error-section h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.error-section pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12px;
    margin-top: 10px;
}

.hidden {
    display: none;
}

.results-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.pool-header {
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pool-header h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.pool-metadata {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.metadata-item {
    display: flex;
    flex-direction: column;
}

.metadata-item.registry-row {
    grid-column: 1 / -1;
    width: 100%;
}

.metadata-other-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.metadata-item .label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.metadata-item a {
    color: white;
    text-decoration: none;
}

.metadata-item a:hover {
    text-decoration: underline;
}

.chart-section,
.depositors-section {
    padding: 30px;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats span {
    margin-left: 20px;
    color: #666;
}

.table-section {
    margin-top: 30px;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-controls input,
.table-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
}

table tr:hover {
    background-color: #f8f9fa;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .metadata-other-info {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .table-controls {
        flex-direction: column;
        gap: 10px;
    }
}

.token-holders-section {
    padding: 30px;
}

.token-holders-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.token-chart-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.token-chart-container h4 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.token-chart-container .chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.token-chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .token-holders-charts {
        grid-template-columns: 1fr;
    }

    .token-chart-container {
        padding: 15px;
    }
}
.metadata-item.registry-row,
.metadata-item.gauges-row {
    grid-column: 1 / -1;
    width: 100%;
}

.gauges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gauge-link {
    color: white;
    text-decoration: none;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.gauge-link:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}