
/* =========================================
   1. Reset & Variables (Modern Foundation)
   ========================================= */
:root {
    /* Цветовая палитра (Dark Gaming Theme) */
    --bg-body: #0b1120;       /* Глубокий темный фон */
    --bg-card: #1e293b;       /* Цвет карточек */
    --bg-header: rgba(15, 23, 42, 0.95);
    
    --primary: #6366f1;       /* Индиго - основной акцент */
    --primary-hover: #4f46e5;
    --accent: #f59e0b;        /* Золотой/Янтарный - для действий */
    --accent-glow: rgba(245, 158, 11, 0.4);
    
    --text-main: #f8fafc;     /* Почти белый текст */
    --text-muted: #94a3b8;    /* Приглушенный текст */
    --text-dark: #0f172a;
    
    --success: #10b981;
    --danger: #ef4444;

    /* Типографика */
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --h1-size: clamp(1.75rem, 5vw, 2.5rem);
    --h2-size: clamp(1.5rem, 4vw, 2rem);
    --body-size: 1rem;

    /* Отступы и размеры */
    --container-width: 75rem; /* ~1200px */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 15px var(--accent-glow);
    
    /* Анимации */
    --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 {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
}

ul, ol {
    list-style: none;
    margin-bottom: 1.5rem;
}

/* =========================================
   2. Layout & Containers
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Flex layout helper for the fragmented HTML structure */
div[style*="display:flex"] {
    display: flex !important;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* =========================================
   3. Header & Navigation
   ========================================= */
header, header.mob {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Объединяем стили для логотипа */
.men1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.men1 a {
    display: block;
    width: 10rem;
    height: 3rem;
    background-color: rgba(255,255,255,0.1); /* Плейсхолдер для лого */
    border-radius: var(--radius-sm);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 30" fill="%23fff"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" font-family="sans-serif" font-weight="bold">CASINO X</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Навигация в хедере */
.menn {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.men3, .men4 {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-align: center;
}

.men3 {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.men3:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.men4 {
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: var(--text-dark);
    border: none;
}

.men4:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* =========================================
   4. Hero Section (.joyl-slide)
   ========================================= */
.joyl-slide {
    position: relative;
    background: linear-gradient(to bottom, var(--bg-card), var(--bg-body));
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    min-height: 15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main1 {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.2), transparent);
}

/* =========================================
   5. Typography & Content
   ========================================= */
h1, h2, h3 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

h1 {
    font-size: var(--h1-size) !important; /* Переопределение inline стилей */
    font-weight: 800;
    text-align: center;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 2rem 0 !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

h2 {
    font-size: var(--h2-size);
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin-top: 2.5rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    text-align: justify;
}

strong {
    color: var(--text-main);
}

/* Списки */
ul li, ol li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

ul li::before {
    content: "•";
    color: var(--accent);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -0.2rem;
}

ol {
    counter-reset: item;
}

ol li {
    padding-left: 2rem;
}

ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* =========================================
   6. Main Content Layout (Flex Columns)
   ========================================= */
.joy-left {
    flex: 1; /* Основной контент занимает все доступное место */
    min-width: 0; /* Фикс для flexbox overflow */
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.main-right {
    flex: 0 0 20rem; /* Сайдбар шириной 320px */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Блоки внутри сайдбара или реклама */
.main-right a.href {
    display: block;
    height: 25rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.main-right a.href::before {
    content: "BANNER / SLOT";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.2);
    font-weight: bold;
}

.main-right a.href:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

/* =========================================
   7. Interactive Elements (Buttons & Forms)
   ========================================= */
.btn-box {
    text-align: center;
    margin: 2rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), #4338ca);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
    color: white;
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: translateY(1px);
}

/* Таблицы (если есть в контенте, хотя в HTML не видно) */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: left;
}

th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* =========================================
   8. Footer
   ========================================= */
footer {
    background: #020617;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.menu-fo {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.menu-fo a {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

.menu-fo a:hover {
    color: var(--accent);
}

/* =========================================
   9. Scroll to Top Button
   ========================================= */
#scroller {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all var(--transition-fast);
    opacity: 0.8;
}

#scroller:hover {
    opacity: 1;
    transform: translateY(-5px);
    background: var(--accent);
}

.b-top-but {
    font-size: 0; /* Скрываем текст */
}

#scroller::before {
    content: "▲";
    font-size: 1.2rem;
    color: white;
}

/* =========================================
   10. Responsiveness (Mobile & Tablet)
   ========================================= */
@media (max-width: 992px) {
    div[style*="display:flex"] {
        flex-direction: column !important;
    }

    .main-right {
        flex: auto;
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .main-right a.href {
        width: 100%;
        height: 10rem;
        flex: 0 0 15rem; /* Горизонтальный скролл баннеров на мобильных */
    }
}

@media (max-width: 768px) {
    /* Хедер */
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .menn {
        flex-wrap: wrap;
    }

    .men3, .men4 {
        width: 100%;
        padding: 0.8rem;
    }

    /* Типографика */
    h1 {
        margin: 1rem 0 !important;
    }

    .joy-left {
        padding: 1.5rem;
    }

    /* Кнопки */
    .btn {
        width: 100%;
    }

    /* Сайдбар */
    .main-right {
        display: none; /* Часто на мобильных скрывают сайдбар или переносят вниз */
    }
    
    #scroller {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* =========================================
   11. Utility / Helper Effects
   ========================================= */
/* Эффект стеклянной панели для важных блоков */
.glass-effect {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Стилизация скроллбара */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
