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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
}

.wallet-section {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 1rem; /* Увеличено расстояние сверху */
}

.chart-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 2px solid #fbbf24;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 15px; /* Добавляем отступы внутри контейнера */
}

#tokenomicsChart {
    display: block;
    width: 90% !important; /* Уменьшаем ширину */
    height: auto !important;
    aspect-ratio: 1 / 1; /* Гарантируем квадратную форму */
}

.wallet-connect {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.wallet-connect:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.balance {
    background: rgba(255,255,255,0.9);
    color: #d97706;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9em;
    min-width: 150px;
    text-align: center;
}

.logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0.5rem 0;
}

.total-supply {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-top: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #374151;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: #6b7280;
}

.tokenomics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.legend-item {
    background: white;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #fbbf24;
    transition: all 0.3s ease;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.legend-content {
    display: flex;
    justify-content: space-between; /* Исправлено выравнивание */
    align-items: center;
    width: 100%;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0; /* Для корректного переноса текста */
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.legend-name {
    font-weight: 600;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-right {
    text-align: right;
    flex-shrink: 0;
    margin-left: 10px;
}

.legend-value {
    font-weight: bold;
    color: #374151;
}

.legend-percentage {
    font-size: 0.9rem;
    color: #6b7280;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 2rem;
    height: 2rem;
}

.stat-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-description {
    opacity: 0.9;
}

.additional-info {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 2px solid #fbbf24;
}

.additional-info h3 {
    text-align: center;
    color: #374151;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-item h4 {
    color: #f59e0b;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.info-item p {
    color: #6b7280;
    line-height: 1.6;
}

.footer {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
}

.navigation-section {
    text-align: center;
    margin-bottom: 2rem;
}

.whitepaper-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.whitepaper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    color: white;
}

/* На мобильных устройствах */
@media (max-width: 768px) {
    .header {
        padding-top: 0.5rem;
    }
    
    .wallet-section {
        position: static;
        width: 100%;
        align-items: center;
        margin-top: 0;
        margin-bottom: 0.5rem;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }
    
    .logo-container {
        margin: 0.5rem 0;
    }
    
    .tokenomics-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .chart-container {
        width: 100%;
        max-width: 400px; /* Ограничиваем максимальную ширину */
        margin: 0 auto;
        padding: 10px; /* Меньше внутренних отступов */
        aspect-ratio: 1 / 1; /* Сохраняем квадрат */
    }
    
    #tokenomicsChart {
        width: 90% !important; /* Еще меньше диаграмма внутри контейнера */
    }
}

@media (max-width: 480px) {
    .chart-container {
        max-width: 90vw; /* Почти на всю ширину экрана */
    }
    
    .wallet-section {
        flex-direction: column;
        gap: 8px;
    }
    
    #tokenomicsChart {
        width: 90% !important; /* Еще меньше на маленьких экранах */
    }
}