.coin-page {
    /*background-color: black;*/
    background-image: url('/static/images/velvet_black.webp');
    background-size: cover;
    overflow: hidden
}

.site-header {
    padding-top: 100px;
}

.back-button::before {
    content: '❮';
    /*content: '˂';*/
    margin-right: 8px;
    font-size: 25px;
    display: inline-block;
    transform: scale(1.2) translateY(3px);
}

.back-button {
    position: absolute;
    top:60px;
    left: 50px;
    color:#999;
    font-size:15px;
    font-family:'Playfair Display Bold', sans-serif;
    text-decoration: none;
    text-transform:uppercase;
    z-index:100;
}

.coin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70vh;
    position: relative;
    transition: transform 0.5s ease-in-out;
}

.coin {
    max-width: 600px;
    transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
    position: absolute;
}

.coin.fade-out {
    opacity: 0;
}

.coin-info {
    position: absolute;
    right: 0;
    max-width: 500px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px 90px 20px 20px;
    border-left: 2px solid gold;
    transition: transform 0.5s ease-in-out;
    transform: translateX(100%);
    box-sizing: border-box;

}

.coin-info h3 {
    font-family: 'Playfair Display', sans-serif;
    font-size: 20px;
    margin-bottom: 10px;
    color: white;
}

.coin-info p {
    font-family: 'Playfair Display', sans-serif;
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
}

.coin-info a {
    color: gold;
}

.coin-container.info-visible .coin {
    transform: translateX(-200px);
}

.coin-container.info-visible .coin-info {
    transform: translateX(0);
}

.side-panel {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.thumbnail {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s ease;
}

.thumbnail img {
    width: 100%;
    height: 100%;
}

.thumbnail.active {
    border: 2px solid gold;
}

.info-btn {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    padding: 10px;
    background: none;
    color: white;
    cursor: pointer;
    border: none;
    font-size: 14px;
    margin-top: 10px;
}


/* Mobile styles */
@media (max-width: 768px) {
    .site-header {
        padding-top: 80px;
    }

    .back-button {
        top: 30px;
        left: 30px;
        font-size: 13px;
    }

    .back-button::before {
        font-size: 20px;
        transform: scale(1.1) translateY(2px);
    }

    .coin-page {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: auto;
    }

    .coin-container {
        height: auto;
        display: flex;
        flex-direction: column;
        padding: 20px 20px;
        align-items: center;
    }

    /* Основное изображение монеты */
    .coin {
        max-width: 380px;
        width: 100%;
        margin: 0;
        position: relative;
        order: 1;
    }

    /* Блок миниатюр */
    .side-panel {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        /*width: 100%;*/
        /*margin: 0;*/
        padding: 0;
        order: 2;
        gap: 15px; /* Промежуток между миниатюрами */
        margin-top: 50px;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
        margin: 0;
    }

    /* Скрываем кнопку информации */
    .info-btn {
        display: none;
    }

    /* Блок информации */
    .coin-info {
        position: relative;
        max-width: 100%;
        width: 100%;
        transform: none;
        padding: 20px;
        border-left: none;
        border-top: 2px solid gold;
        margin: 0;
        order: 3;
        box-sizing: border-box;
    }

    /* Отключаем анимации для мобильной версии */
    .coin-container.info-visible .coin,
    .coin-container.info-visible .coin-info {
        transform: none;
    }

    /* Скрываем псевдоэлемент закрытия */
    .coin-container.info-visible .side-panel::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .coin {
        max-width: 340px;
    }

    .thumbnail {
        width: 45px;
        height: 45px;
    }

    .coin-info {
        padding: 15px;
    }

    .coin-info h3 {
        font-size: 17px;
    }

    .coin-info p {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .coin {
        max-width: 280px;
    }

    .thumbnail {
        width: 40px;
        height: 40px;
    }

    .coin-info h3 {
        font-size: 15px;
    }

    .coin-info p {
        font-size: 14px;
    }
}
