/* ========================================
   ГЛАВНАЯ СТРАНИЦА
   ======================================== */

.home-section {
    padding: 0 32px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   СЕКЦИЯ БАННЕРОВ - СЛАЙДЕР
   ======================================== */
.banners-section {
    display: block;
    margin-bottom: 32px;
    position: relative;
}

.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    min-height: 280px;
}

/* Banner Skeleton Shimmer */
.banner-skeleton-inner {
    min-height: 280px;
    background: linear-gradient(135deg, rgba(26, 31, 60, 1) 0%, rgba(45, 42, 94, 0.6) 40%, rgba(30, 58, 95, 0.4) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.banner-skeleton-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,0.06) 37%, transparent 50%);
    background-size: 200% 100%;
    animation: bannerShimmer 1.8s infinite linear;
}

@keyframes bannerShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.banner-skeleton-content {
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 60%;
}

.banner-skeleton-title {
    width: 320px;
    height: 28px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.banner-skeleton-subtitle {
    width: 260px;
    height: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.banner-skeleton-subtitle.short {
    width: 180px;
}

.banner-skeleton-btn {
    width: 140px;
    height: 44px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-top: 8px;
}

.banner-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
    min-width: 100%;
    flex-shrink: 0;
}

/* Главный баннер */
.main-banner {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1f3c 0%, #2d2a5e 40%, #1e3a5f 100%);
}

.main-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(99, 102, 241, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
}

.main-banner-content {
    position: relative;
    z-index: 2;
    padding: 36px 40px;
    max-width: 70%;
}

.main-banner-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.3;
}

.main-banner-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    line-height: 1.5;
}

.promo-copy {
    color: #FFA500;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.2s ease;
}

.promo-copy:active {
    opacity: 0.7;
}

.main-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.main-banner-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.main-banner-btn svg {
    color: #FFC645;
}

.main-banner-character {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    z-index: 1;
}

.main-banner-character::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    z-index: 1;
}

/* Эффекты искр на главном баннере */
.main-banner::before,
.main-banner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 1;
}

.main-banner::before {
    background-image: 
        radial-gradient(3px 3px at 20% 30%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 60% 70%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 50% 50%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 80% 10%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 90% 60%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 30% 80%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 70% 40%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 40% 20%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 10% 60%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 45% 10%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 85% 85%, var(--sparkle-color, #FFC645), transparent);
    background-repeat: repeat;
    background-size: 200% 200%;
    animation: sparkle-1 8s linear infinite;
}

.main-banner::after {
    background-image: 
        radial-gradient(2px 2px at 15% 25%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 55% 65%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 75% 35%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 85% 55%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 25% 75%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 65% 15%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 45% 85%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 95% 45%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(3px 3px at 5% 50%, var(--sparkle-color, #FFC645), transparent),
        radial-gradient(2px 2px at 35% 5%, var(--sparkle-color, #FFC645), transparent);
    background-repeat: repeat;
    background-size: 250% 250%;
    animation: sparkle-2 10s linear infinite reverse;
}

@keyframes sparkle-1 {
    0% { background-position: 0% 0%; opacity: 1; }
    50% { background-position: 100% 100%; opacity: 0.85; }
    100% { background-position: 0% 0%; opacity: 1; }
}

@keyframes sparkle-2 {
    0% { background-position: 100% 100%; opacity: 0.85; }
    50% { background-position: 0% 0%; opacity: 1; }
    100% { background-position: 100% 100%; opacity: 0.85; }
}

/* Динамические баннеры — стили через CSS custom properties --sparkle-color */

/* Точки навигации */
.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.banner-dot.active {
    background: rgba(255, 255, 255, 0.6);
    width: 24px;
    border-radius: 4px;
}

/* Стрелки навигации */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.banner-slider:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.banner-arrow-left {
    left: 16px;
}

.banner-arrow-right {
    right: 16px;
}

/* Заголовок Originals */
.originals-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.originals-icon {
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   ИГРОВЫЕ РЕЖИМЫ
   ======================================== */
.games-modes-section {
    margin-bottom: 40px;
}

.games-modes-grid {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
}

.game-mode-card {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    transition: background 0.3s ease;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 0;
    height: 200px;
    cursor: pointer;
    background: #16161D;
    border: none;
}

/* Hover — блок чуть ярче, картинка увеличивается */
.game-mode-card:hover {
    background: #141419;
}

.game-mode-card:hover .game-mode-img {
    transform: rotate(-10deg) scale(1.15);
}

/* Шапка карточки: название + игроки */
.game-mode-header {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.game-mode-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
    text-transform: uppercase;
}

.game-mode-players {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    font-weight: 500;
}

.player-icon {
    opacity: 0.5;
}

.players-count,
.active-bets-sum {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    font-weight: 500;
}

/* Картинка-иконка внутри карточки (справа снизу) */
/* === РЕГУЛИРОВКА РАСПОЛОЖЕНИЯ ИКОНОК ===
   Чтобы двигать иконку:
   - right: сдвиг от правого края (меньше = правее)
   - bottom: сдвиг от нижнего края (меньше = ниже)
   - width: размер иконки
   ======================================= */
.game-mode-img {
    position: absolute;
    right: -35px;       /* <-- двигай влево/вправо */
    bottom: -40px;      /* <-- двигай вверх/вниз */
    width: 200px;       /* <-- размер иконки */
    height: auto;
    object-fit: contain;
    z-index: 1;
    pointer-events: none;
    transform: rotate(-10deg);
    transition: transform 0.3s ease;
}

/* === ПЕРСОНАЛЬНЫЕ НАСТРОЙКИ ИКОНОК === */
/* Classic: ниже 8px, правее 5px */
a[href="/easy"] .game-mode-img {
    right: -48px;
    bottom: -53px;
}

/* Blackjack: ниже 4px, правее 3px, меньше на 5px */
a[href="/blackjack"] .game-mode-img {
    right: -38px;
    bottom: -44px;
    width: 195px;
}

/* Wheel */
a[href="/wheel"] .game-mode-img {
    right: -50px;
    bottom: -44px;
    width: 220px;
}

/* Mines */
a[href="/mines"] .game-mode-img {
    right: -50px;
    bottom: -100px;
}

/* Keno */
a[href="/keno"] .game-mode-img {
    width: 320px;
    right: -100px;
    bottom: -70px;
}

/* HiLo: наклонить ещё на 7 градусов (итого -17deg) */
a[href="/hilo"] .game-mode-img {
    transform: rotate(-17deg);
}
a[href="/hilo"]:hover .game-mode-img {
    transform: rotate(-17deg) scale(1.15);
}

/* ========================================
   ИСТОРИЯ СТАВОК
   ======================================== */
.bets-history-section {
    background: #16161D;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 50px;
}

.bets-history-section .rub-icon {
    vertical-align: text-bottom;
    margin-left: 2px;
}

.bets-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    transition: background 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.bets-history-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.live-text {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.collapse-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    z-index: 1;
}

.collapse-arrow-btn:hover {
    color: rgba(255, 255, 255, 0.6);
}

.collapse-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bets-history-section.collapsed .collapse-arrow {
    transform: rotate(-180deg);
}

/* Контейнер истории — единое сворачивание */
.bets-history-container {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.bets-history-container > .bets-history-inner {
    overflow: hidden;
}

.bets-history-container.collapsed {
    grid-template-rows: 0fr;
}

/* Заголовки таблицы */
.bets-table-header {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
    gap: 16px;
    padding: 10px 24px;
    background: rgba(11, 11, 15, .4);
}

.bets-table-header > div {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.bets-table-header > .col-win {
    text-align: right;
}

/* Список ставок */
.bets-history-list {
    display: flex;
    flex-direction: column;
}

.bet-history-item {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
    gap: 16px;
    align-items: center;
    padding: 10px 24px;
    animation: betSlideIn 0.4s ease-out;
    cursor: pointer;
}
.bet-history-item:nth-child(even) {
    background: rgba(255,255,255,0.01);
}

@keyframes betSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.bet-history-item:last-child {
    border-bottom: none;
}

/* Колонка игры */
.col-game {
}

.col-game .game-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-game .game-icon {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.game-name-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
}

.game-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.game-name:hover {
    color: rgba(255, 255, 255, 0.95);
}

.game-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
}

/* Колонка игрока */
.col-player {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.player-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    cursor: pointer;
}

/* Колонки со значениями */
.col-bet,
.col-win {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.col-win {
    justify-content: flex-end;
}

.coin-icon {
    display: none;
}

.col-win.win,
.col-win.lose {
    color: #fff;
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */
@media (max-width: 1200px) {
    .games-modes-grid {
        gap: 10px;
    }
    
    .game-mode-card {
        height: 180px;
        padding: 16px;
    }

    .game-mode-img {
        width: 170px;
    }
    
    .main-banner-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .games-modes-grid {
        gap: 10px;
        flex-wrap: wrap;
    }

}

@media (max-width: 900px) {
    .bets-table-header,
    .bet-history-item {
        grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
        gap: 10px;
        padding: 10px 16px;
    }
    
    .player-name {
        max-width: 100px;
    }
    
    .main-banner {
        min-height: 200px;
    }
    
    .main-banner-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 0 15px;
    }
    
    .games-modes-grid {
        gap: 10px;
    }
    
    .game-mode-card {
        flex: 0 0 calc(50% - 5px);
        height: 170px;
        border-radius: 10px;
    }

    .game-mode-img {
        width: 130px;
    }
    
    .main-banner {
        min-height: 180px;
    }
    
    .main-banner-content {
        padding: 20px;
        max-width: 100%;
    }

    .main-banner-character {
        background-size: cover;
        background-position: right center;
    }
    
    .main-banner-title {
        font-size: 1.15rem;
    }
    
    .main-banner-subtitle {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }
    
    .bets-table-header {
        display: none;
    }
    
    .bet-history-item {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding: 12px 16px;
    }
    
    .col-game {
        grid-column: 1 / -1;
    }
    
    .col-player {
        grid-column: 1 / -1;
    }
    
    .banner-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-banner-title {
        font-size: 1.1rem;
    }
    
    .main-banner-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .game-mode-card {
        min-height: 140px;
        height: auto;
        border-radius: 10px;
        padding: 14px;
    }

    .game-mode-name {
        font-size: 0.8rem;
    }

    .game-mode-img {
        width: 100px;
        right: -10px;
        bottom: -15px;
    }
    
    .originals-header {
        font-size: 0.8rem;
    }
}

/* Старые стили (совместимость) */
.section {
    padding-left: 20px;
}
