:root {
    /* Добавляем новые переменные для графика */
    --profit-color: var(--secondary); /* Используем основной зеленый цвет */
    --profit-glow: rgba(16, 185, 129, 0.2);
    --graph-bg: var(--white);
    --graph-line: var(--primary-light);
}

/* Обновленный графический контейнер */
.graphic-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: var(--graph-bg);
    border-radius: 20px;
    box-shadow: 0px 4px 24px rgba(1, 1, 1, 0.04);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.graphic-container:hover {
    transform: translateY(-5px);
    box-shadow: 0px 8px 32px rgba(1, 1, 1, 0.08);
}

.profit-display {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.profit-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.profit-period {
    display: flex;
    gap: 10px;
}

.period-btn {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--primary-light);
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.profit-graph {
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
    perspective: 500px;
}

.graph-line {
    position: absolute;
    width: 100%;
    height: 100%;
    stroke: var(--profit-color);
    stroke-width: 3;
    fill: none;
}

.graph-fill {
    position: absolute;
    width: 100%;
    height: 100%;
    fill: url(#graph-gradient);
    opacity: 0.1;
}

.graph-grid {
    position: absolute;
    width: 100%;
    height: 100%;
}

.grid-line {
    stroke: var(--graph-line);
    stroke-width: 1;
    opacity: 0.5;
}

.profit-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.stat-card {
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.stat-card:first-child {
    margin-left: 0;
}

.stat-card:last-child {
    margin-right: 0;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 20px rgba(117, 105, 255, 0.1);
}
.update-timer {
    color: var(--profit-color);
    font-weight: bold;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.7; }
}
.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}



.stat-label {
    font-size: 14px;
    color: var(--gray);
}
.metric-label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

.metric-subtext {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 4px;
}
.coin-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Анимации */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes float-up {
    0% { transform: translateY(0); opacity: 0.8; }
    100% { transform: translateY(-20px); opacity: 0; }
}

.profit-bubble {
    position: absolute;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    animation: float-up 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

/* Мини-график в карточке */
.mini-chart {
    width: 60px;
    height: 30px;
    margin-left: auto;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .profit-stats {
        flex-wrap: wrap;
        gap: 15px;
    }

    .stat-card {
        min-width: calc(50% - 20px);
        margin: 0;
    }
}

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

    .stat-card {
        min-width: 100%;
    }

    .profit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .profit-period {
        width: 100%;
        justify-content: space-between;
    }

    .period-btn {
        flex: 1;
        text-align: center;
    }
}