/* ========================================
   ГЛАВНАЯ СТРАНИЦА - НОВЫЙ ДИЗАЙН
   ======================================== */

.home-section {
    padding: 0 20px;
    max-width: 100%;
}

/* ========================================
   СЕКЦИЯ БАННЕРОВ
   ======================================== */
.banners-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    margin-bottom: 32px;
}

/* Главный баннер */
.main-banner {
    position: relative;
    min-height: 280px;
    border-radius: 20px;
    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: 55%;
}

.main-banner-title {
    font-size: 1.75rem;
    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;
}

.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;
    bottom: 0;
    width: 50%;
    height: 100%;
    background: url('/img/banner-character.png') no-repeat right bottom;
    background-size: contain;
    z-index: 1;
}

/* Промо блоки справа */
.promo-blocks {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.promo-card {
    position: relative;
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-2px);
}

.promo-deposit {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 50%, #8b5cf6 100%);
}

.promo-cases {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 50%, #f97316 100%);
}

.promo-content {
    position: relative;
    z-index: 2;
}

.promo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.promo-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.promo-icon {
    position: relative;
    z-index: 2;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
}

.promo-icon svg {
    width: 48px;
    height: 48px;
}

/* Заголовок 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: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-mode-card {
    position: relative;
    padding: 32px 24px 28px;
    border-radius: 24px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    cursor: pointer;
    background: linear-gradient(145deg, #1e222d 0%, #151821 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Фоновый градиент свечения */
.game-mode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: radial-gradient(ellipse at 50% 0%, var(--card-glow) 0%, transparent 70%);
    opacity: 0.15;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Декоративная линия сверху */
.game-mode-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
    border-radius: 0 0 4px 4px;
    opacity: 0.8;
    transition: all 0.4s ease;
}

.game-mode-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.game-mode-card:hover::after {
    width: 80%;
    opacity: 1;
}

/* Цвета для каждой карточки */
.dice-card {
    --card-glow: rgba(139, 92, 246, 0.5);
    --card-glow-hover: rgba(139, 92, 246, 0.2);
    --card-accent: #8b5cf6;
    --icon-gradient-start: #a78bfa;
    --icon-gradient-end: #7c3aed;
}

.wheel-card {
    --card-glow: rgba(236, 72, 153, 0.5);
    --card-glow-hover: rgba(236, 72, 153, 0.2);
    --card-accent: #ec4899;
    --icon-gradient-start: #f472b6;
    --icon-gradient-end: #db2777;
}

.jackpot-card {
    --card-glow: rgba(251, 191, 36, 0.5);
    --card-glow-hover: rgba(251, 191, 36, 0.2);
    --card-accent: #fbbf24;
    --icon-gradient-start: #fcd34d;
    --icon-gradient-end: #f59e0b;
}

.duels-card {
    --card-glow: rgba(34, 211, 238, 0.5);
    --card-glow-hover: rgba(34, 211, 238, 0.2);
    --card-accent: #22d3ee;
    --icon-gradient-start: #67e8f9;
    --icon-gradient-end: #06b6d4;
}

/* Контейнер иконки с свечением */
.game-mode-icon {
    position: relative;
    z-index: 1;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Кольцо свечения под иконкой */
.game-mode-icon::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--card-glow) 0%, transparent 70%);
    opacity: 0.4;
    filter: blur(15px);
    transition: all 0.4s ease;
}

.game-mode-card:hover .game-mode-icon {
    transform: scale(1.15) translateY(-4px);
}

.game-mode-card:hover .game-mode-icon::before {
    opacity: 0.7;
    transform: scale(1.3);
}

.game-mode-icon svg {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 8px 25px var(--card-glow));
    transition: all 0.4s ease;
}

/* Градиентные иконки */
.dice-card .game-mode-icon svg {
    color: #a78bfa;
}

.wheel-card .game-mode-icon svg {
    color: #f472b6;
}

.jackpot-card .game-mode-icon svg {
    color: #fcd34d;
}

.duels-card .game-mode-icon svg {
    color: #67e8f9;
}

.game-mode-card:hover .game-mode-icon svg {
    filter: drop-shadow(0 12px 35px var(--card-glow));
}

.game-mode-info {
    position: relative;
    z-index: 1;
    text-align: center;
}

.game-mode-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Кнопка "Играть" */
.game-play-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.game-mode-card:hover .game-play-btn {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

.game-play-btn .play-arrow {
    position: absolute;
    right: -20px;
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.game-mode-card:hover .game-play-btn .play-arrow {
    opacity: 0.6;
    transform: translateX(0);
}

/* Анимация пульсации для активных игр */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.15;
    }
    50% {
        opacity: 0.25;
    }
}

.game-mode-card::before {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Частицы на фоне (декоративный элемент) */
.game-mode-card .particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.3;
}

.game-mode-card .particles::before,
.game-mode-card .particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--card-accent);
    border-radius: 50%;
    opacity: 0;
}

.game-mode-card:hover .particles::before {
    animation: float-particle 2s ease-in-out infinite;
    left: 20%;
    top: 80%;
}

.game-mode-card:hover .particles::after {
    animation: float-particle 2.5s ease-in-out infinite 0.5s;
    right: 25%;
    top: 70%;
}

@keyframes float-particle {
    0% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.5);
    }
}

/* ========================================
   ИСТОРИЯ СТАВОК
   ======================================== */
.bets-history-section {
    background: linear-gradient(145deg, #1e222d 0%, #151821 100%);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.bets-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.bets-history-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.bets-history-section.collapsed .bets-history-header {
    border-bottom: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Индикатор Live */
.live-indicator {
    width: 10px;
    height: 10px;
    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.5);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.live-text {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.online-count {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-left: 8px;
}

.online-count svg {
    width: 14px;
    height: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: #22c55e;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: #fff;
}

/* Контейнер истории */
.bets-history-container {
    overflow: hidden;
    max-height: 800px;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
    opacity: 1;
}

.bets-history-container.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Заголовки таблицы */
.bets-table-header {
    display: grid;
    grid-template-columns: 1.8fr 2fr 1fr 1fr;
    gap: 20px;
    padding: 14px 28px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bets-table-header > div {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Список ставок */
.bets-history-list {
    display: flex;
    flex-direction: column;
}

.bet-history-item {
    display: grid;
    grid-template-columns: 1.8fr 2fr 1fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.bet-history-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.bet-history-item:last-child {
    border-bottom: none;
}

/* Колонка игры */
.col-game .game-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.col-game .game-icon {
    width: 20px;
    height: 20px;
    color: #fbbf24;
}

.col-game .game-icon.mines {
    color: #22c55e;
}

.col-game .game-icon.wheel {
    color: #ec4899;
}

.col-game .game-icon.dice {
    color: #8b5cf6;
}

.game-name-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.game-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Колонка игрока */
.col-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-name {
    font-weight: 500;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Колонки со значениями */
.col-bet,
.col-win {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}

.coin-icon {
    width: 16px;
    height: 16px;
}

.col-win.win {
    color: #22c55e;
}

.col-win.lose {
    color: rgba(255, 255, 255, 0.35);
}

/* ========================================
   АДАПТИВНОСТЬ
   ======================================== */
@media (max-width: 1200px) {
    .banners-section {
        grid-template-columns: 1fr 280px;
    }
    
    .games-modes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .game-mode-card {
        min-height: 200px;
        padding: 28px 20px 24px;
    }
    
    .main-banner-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .banners-section {
        grid-template-columns: 1fr;
    }
    
    .promo-blocks {
        flex-direction: row;
    }
    
    .promo-card {
        flex: 1;
    }
    
    .games-modes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .game-mode-card {
        min-height: 200px;
    }
}

@media (max-width: 900px) {
    .bets-table-header,
    .bet-history-item {
        grid-template-columns: 1.5fr 1.5fr 1fr 1fr;
        gap: 12px;
        padding: 12px 18px;
    }
    
    .player-name {
        max-width: 100px;
    }
    
    .main-banner {
        min-height: 220px;
    }
    
    .main-banner-content {
        max-width: 100%;
    }
    
    .main-banner-character {
        display: none;
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 0 15px;
    }
    
    .promo-blocks {
        flex-direction: column;
    }
    
    .games-modes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .game-mode-card {
        min-height: 180px;
        padding: 24px 18px 20px;
        border-radius: 20px;
    }
    
    .game-mode-card::after {
        width: 50%;
        height: 2px;
    }
    
    .game-mode-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }
    
    .game-mode-icon::before {
        width: 60px;
        height: 60px;
    }
    
    .game-mode-icon svg {
        width: 56px;
        height: 56px;
    }
    
    .game-mode-info h3 {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }
    
    .game-play-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    
    .main-banner {
        min-height: 200px;
        border-radius: 16px;
    }
    
    .main-banner-content {
        padding: 24px;
    }
    
    .main-banner-title {
        font-size: 1.25rem;
    }
    
    .main-banner-subtitle {
        font-size: 0.8rem;
    }
    
    .bets-table-header {
        display: none;
    }
    
    .bet-history-item {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 14px 16px;
    }
    
    .col-game {
        grid-column: 1 / -1;
    }
    
    .col-player {
        grid-column: 1 / -1;
    }
    
    .bets-history-header {
        padding: 14px 16px;
    }
    
    .promo-card {
        border-radius: 16px;
    }
    
    .promo-title {
        font-size: 1rem;
    }
}

@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: 160px;
        padding: 20px 14px 18px;
        border-radius: 18px;
    }
    
    .game-mode-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }
    
    .game-mode-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .game-mode-info h3 {
        font-size: 0.95rem;
    }
    
    .game-play-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
    
    .game-play-btn .play-arrow {
        width: 12px;
        height: 12px;
    }
    
    .player-name {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    .col-bet,
    .col-win {
        font-size: 0.85rem;
    }
    
    .originals-header {
        font-size: 0.8rem;
    }
}

/* Старые стили (совместимость) */
.section {
    padding-left: 20px;
}
