body {
    font-family: 'Roboto', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
}
.railway-theme {
    background-color: #1e1e1e;
    border-color: #424242;
}
.modal {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.modal-hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}
.countdown {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f39c12;
}
.train-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.subcategories-container {
    background-color: #1e1e1e;
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid #424242;
}
.train-card {
    transition: all 0.3s ease;
}

/* Анимация свечения для кнопок */
@keyframes yellow-glow {
    0%, 100% {
        box-shadow: 0 0 4px rgba(243, 156, 18, 0.6), 0 0 8px rgba(243, 156, 18, 0.4);
    }
    50% {
        box-shadow: 0 0 12px rgba(243, 156, 18, 0.8), 0 0 20px rgba(243, 156, 18, 0.6);
    }
}
.button-glow {
    animation: yellow-glow 3s infinite ease-in-out;
    transition: all 0.3s ease;
}
.button-glow:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(245, 176, 65, 1), 0 0 25px rgba(245, 176, 65, 0.8);
}

/* Стили для стрелок навигации */
.scroll-button {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}
.scroll-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.scroll-button.left {
    left: -20px;
}
.scroll-button.right {
    right: -20px;
}
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}
.carousel-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(100% / 3 - 16px);
    gap: 24px;
    overflow-x: scroll; /* Изменено для плавной прокрутки */
    scroll-behavior: smooth;
    width: 100%;
    /* Скрытие полосы прокрутки */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.carousel-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}
.carousel-grid > .train-card {
    flex-shrink: 0;
    width: 100%;
}

.clickable-image {
    cursor: zoom-in;
}

/* Адаптивность для carousel-grid */
@media (max-width: 1023px) {
    .carousel-grid {
        grid-auto-columns: calc(100% / 2 - 12px);
    }
}
@media (max-width: 767px) {
    .carousel-grid {
        grid-auto-columns: 100%;
    }
}
.preview-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: #2d3748; /* gray-700 */
    border-radius: 0.375rem; /* rounded-md */
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.preview-image-wrapper.fading-out {
    opacity: 0;
    transform: scale(0.9);
}
.preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}
.preview-delete-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 9999px; /* rounded-full */
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.preview-delete-btn:hover {
    background-color: rgba(255, 0, 0, 0.8);
}