/* ===== Общий фон секции ===== */
.cripto {
    margin: 2rem 0px;
    padding: 30px 25px;
    font-family: 'Georgia', serif;
    background: linear-gradient(180deg, #fdfdfd 0%, #f7f7f7 100%);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    color: #111;
}

/* ===== Заголовки ===== */
.cripto-header h1 {
    font-family: 'Georgia', serif;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.cripto-header p {
    font-family: 'Georgia', serif;
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
}


.separator-cripto {
    background: #d3d3d3;
    width: 1px;
}

/* ===== Колонки ===== */
.crypto-columns {
    display: flex;
    justify-content: space-between;
    gap: 2%;
}

/* ===== Каждая колонка ===== */
.crypto-column {
    display: flex;
    border-radius: 10px;
    transition: transform 0.25s, box-shadow 0.25s;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1rem;
}

/* ===== Заголовки колонок ===== */
.crypto-column h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
}

/* ===== Список ===== */
.crypto-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}


/* ===== Табличная структура ===== */
.crypto-row {
    display: grid;
    grid-template-columns: 0.1fr 1.8fr 1fr 1fr 1fr; /* ширина колонок: название, цена, изменение, капитализация */
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
    justify-items: start;
}

/* Hover эффект */
.crypto-row:hover {
    transform: translateX(5px);
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}

/* Подсветка роста и падения */
.crypto-row.positive {
    background-color: #e6f8e6; /* светло-зеленый */
}

.crypto-row.negative {
    background-color: #fbeaea; /* светло-красный */
}

/* Каждая ячейка таблицы */
.crypto-cell {
    padding: 2px 6px;
    overflow: hidden;
}

/* Название с лого */
.crypto-name-cell .crypto-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111;
    font-weight: 600;
}

.crypto-name-cell .crypto-link:hover {
    color: #0a74ff;
    text-decoration: underline;
}

.crypto-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

/* Выравнивание остальных колонок по правому краю */
.crypto-price-cell,
.crypto-change-cell,
.crypto-marketcap-cell {
    text-align: right;
    font-weight: 500;
}


/* ===== Название монеты ===== */
.crypto-link {
    display: flex;
    align-items: center;
    gap: 8px; /* расстояние между логотипом и названием */
    text-decoration: none;
    color: #111;
    font-weight: 600;
}

.crypto-link:hover {
    color: #0a74ff;
    text-decoration: underline;
}

.crypto-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

/* ===== Остальные данные ===== */
.crypto-price,
.crypto-change,
.crypto-marketcap {
    text-align: right;
}

/* ===== Стили для изменения процентов ===== */
.crypto-change {
    font-weight: 600;
}

/* ===== Вау-эффекты ===== */
.crypto-row.positive::before,
.crypto-row.negative::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 100%;
    border-radius: 3px;
    margin-right: 8px;
}

.crypto-row.positive::before {
    background: linear-gradient(180deg, #a3f9a3, #0a8a0a);
}

.crypto-row.negative::before {
    background: linear-gradient(180deg, #f9a3a3, #d00);
}

.title-cripto-list {
    display: grid;
    grid-template-columns: 0.1fr 1.8fr 1fr 1fr 1fr;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s;
    justify-items: start;
}

.title-span {
    font-family: 'Georgia', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #3b3b3b;
}

.crypto-rows-container {
    display: flex;
    gap: 5px;
    flex-direction: column;

    max-height: 400px; /* высота блока с данными */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* плавная прокрутка на мобильных */
    scrollbar-width: none; /* Firefox */
}

/* Скрываем полосу прокрутки в Chrome, Edge, Safari */
.crypto-rows-container::-webkit-scrollbar {
    display: none;
}

/* Опционально: плавное появление hover-эффекта при скролле */
.crypto-row {
    transition: transform 0.2s, background 0.3s;
}


@media (max-width: 768px) {
    .cripto {
        padding: 16px;
        margin: 1rem 0px;
        font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    .cripto-header h1 {
        font-size: 1.3rem;
    }
    .crypto-column {
        align-items: center;
    }
    .crypto-column h2 {
        font-size: 1.3rem;
    }

    .title-span {
        font-size: 0.7rem; 
    }
    .crypto-row {
        padding: 8px 6px;
        font-size: 0.6rem;
    }
    .crypto-columns {
        flex-direction: column;
        gap: 1rem;
    }
}