
:root {
    /* Цветовая палитра - Dark Casino Theme */
    --color-bg-body: #0f172a; /* Глубокий темно-синий */
    --color-bg-card: #1e293b; /* Светлее для карточек */
    --color-bg-header: #0b1120; /* Темный хедер */
    
    --color-primary: #fb5e01; /* Оранжевый акцент (из SVG) */
    --color-primary-hover: #ff7b29;
    --color-secondary: #10b981; /* Зеленый для кнопок успеха/входа */
    --color-accent-blue: #3b82f6; /* Для ссылок/иконок */
    
    --color-text-main: #f1f5f9; /* Белый текст */
    --color-text-muted: #94a3b8; /* Серый текст */
    
    --gradient-primary: linear-gradient(135deg, #fb5e01 0%, #d94502 100%);
    --gradient-gold: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    
    /* Размеры и отступы */
    --container-width: 1400px;
    --header-height: 70px;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-glow: 0 0 15px rgba(251, 94, 1, 0.3);
    
    /* Типографика */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс и базовые стили */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* SVG иконки */
.icon svg, .icon-res svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

/* Контейнер */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- HEADER --- */
.header {
    background-color: var(--color-bg-header);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-before {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.875rem;
}

.header-before .left,
.header-before .right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.left-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.left-item:hover {
    color: var(--color-primary);
}

.left-item .icon {
    color: var(--color-accent-blue);
}

.logo img {
    height: 40px;
    width: auto;
}

/* Кнопки в хедере */
.btn-box {
    display: flex;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6em 1.5em;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
}

.btn-a {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(251, 94, 1, 0.4);
}

.btn-a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 94, 1, 0.6);
}

.btn-b {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-main);
}

.btn-b:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(251, 94, 1, 0.1);
}

/* Нижняя часть хедера */
.header-logo-naw {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.naw {
    display: flex;
    gap: 2rem;
}

.naw-item {
    font-weight: 600;
    color: var(--color-text-main);
    position: relative;
    padding: 0.5rem 0;
}

.naw-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.naw-item:hover {
    color: var(--color-primary);
}

.naw-item:hover::after {
    width: 100%;
}

/* Мобильные элементы */
.btn-navigate, .logo-mobile {
    display: none;
}

/* --- SLIDER & WINNERS --- */
.slider {
    margin-bottom: 2rem;
    position: relative;
}

.owl-slider .item img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 100%;
    object-fit: cover;
}

/* Бегущая строка победителей */
.box-viner {
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    padding: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.box-viner-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-secondary);
    font-weight: 800;
    text-transform: uppercase;
    margin-right: 1.5rem;
    white-space: nowrap;
    animation: pulse 2s infinite;
}

.box-viner-title .icon-prise svg {
    fill: #fcd34d;
    width: 1.5rem;
    height: 1.5rem;
}

.box-viner-content {
    display: flex;
    gap: 1.5rem;
    animation: scrollTicker 30s linear infinite;
}

.vitem {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.03);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    min-width: max-content;
}

.vitem img {
    border-radius: 4px;
    width: 50px;
    height: 35px;
    object-fit: cover;
}

.vitem .right {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.game-name {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.vin-symma {
    font-weight: 700;
    color: #fcd34d;
    font-size: 0.875rem;
}

/* --- LAYOUT GRID (Aside + Content) --- */
/* Создаем Grid макет для основного контента */
body > .header-before + .slider + div:not([class]), /* хак если нет обертки */
body {
    display: grid;
    /* Grid areas: Header is top, then content splits */
    /* В HTML структуре .aside и .content идут друг за другом, предположим обертку или применим к body для примера */
}

/* Поскольку в HTML нет явного контейнера-обертки для aside и content, 
   применим flex к body, но с учетом header и slider это может сломать поток.
   Предположим, что они находятся в контейнере или идут последовательно.
   Для надежности стилизуем их как блоки, которые на десктопе встают рядом через float или flex
   если бы был родитель. 
   Мы применим CSS Grid к 'body' для областей ниже хедера, если структура позволяет, 
   или просто используем media query для aside и content, если они прямые дети body.
*/

@media (min-width: 1024px) {
    body {
        display: grid;
        grid-template-rows: auto auto auto 1fr;
        grid-template-columns: 280px 1fr;
        grid-template-areas:
            "header header"
            "slider slider"
            "aside content"
            "footer footer";
        gap: 0 2rem;
    }
    .header { grid-area: header; }
    .slider { grid-area: slider; max-width: var(--container-width); margin: 0 auto 2rem; width: 100%; padding: 0 1rem;}
    .aside { 
        grid-area: aside; 
        align-self: start; 
        position: sticky;
        top: 90px;
        margin-left: max(0px, calc((100vw - var(--container-width)) / 2));
        padding-left: 1rem;
    }
    .content { 
        grid-area: content; 
        margin-right: max(0px, calc((100vw - var(--container-width)) / 2));
        padding-right: 1rem;
    }
}

/* --- SIDEBAR --- */
.aside .box {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.box-bonus {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    text-align: center;
    border: 1px solid var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.box-bonus .title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.box-bonus .summa {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.box-nawigate {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.box-nawigate .item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.box-nawigate .item:hover,
.box-nawigate .item.active {
    background: rgba(255,255,255,0.05);
    color: var(--color-text-main);
    transform: translateX(5px);
}

.box-nawigate .item .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    fill: var(--color-primary);
}

/* --- CONTENT --- */
.content h1 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

/* Form Section */
.content-form {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    background-image: radial-gradient(circle at top right, rgba(251,94,1,0.1), transparent);
}

.content-form .h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.form-box {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group-email {
    flex: 1;
    min-width: 200px;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(251, 94, 1, 0.2);
}

.btn-green {
    background: var(--color-secondary);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    width: 100%;
}

.btn-green:hover {
    background: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Game Grids (.gama-box) */
.gama-box {
    margin-bottom: 3rem;
}

.gama-box-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.gama-box-title .left {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gama-box-title .right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-prev, .icon-next {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.icon-prev:hover, .icon-next:hover {
    background: var(--color-primary);
}

.btn-all-games {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Grid для игр (имитация owl-carousel grid fallback) */
.gama-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.gama-item {
    position: relative;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    group: game-card;
}

.gama-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    z-index: 2;
}

.gama-item img {
    width: 100%;
    aspect-ratio: 16/11;
    object-fit: cover;
    transition: filter var(--transition-fast);
}

.gama-item:hover img {
    filter: brightness(1.1);
}

.title-box {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.title-box .name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.refca {
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-fast);
}

.gama-item:hover .refca {
    opacity: 1;
    transform: scale(1);
}

/* --- АНИМАЦИИ --- */
@keyframes pulse {
    0% { opacity: 1; text-shadow: 0 0 10px rgba(252, 211, 77, 0.2); }
    50% { opacity: 0.8; text-shadow: 0 0 20px rgba(252, 211, 77, 0.6); }
    100% { opacity: 1; text-shadow: 0 0 10px rgba(252, 211, 77, 0.2); }
}

@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 1024px) {
    .header-logo-naw {
        flex-direction: column;
        gap: 1rem;
    }
    
    .naw {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    body {
        display: block; /* Сброс Grid для планшетов */
    }
    
    .aside {
        display: none; /* Скрываем сайдбар или перемещаем вниз */
    }
    
    .slider, .content, .container {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .header-before {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }
    
    .header-before .left {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-navigate {
        display: block;
        cursor: pointer;
    }
    
    .logo-mobile {
        display: block;
    }
    
    .logo:not(.logo-mobile),
    .dovnload,
    .obxod-blokirovki,
    .header-logo-naw .naw {
        display: none; /* Упрощаем хедер */
    }
    
    .header-logo-naw {
        display: none;
    }
    
    .gama-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .form-box {
        flex-direction: column;
    }
    
    .box-viner-content {
        animation: scrollTicker 15s linear infinite;
    }
}

@media (max-width: 480px) {
    .gama-slider {
        grid-template-columns: 1fr;
    }
    
    .btn-box {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn {
        flex: 1;
        padding: 0.6em 0.5em;
        font-size: 0.75rem;
    }
}
