/* ==========================================================================
   SPYNX CASINO - OFFICIAL STYLESHEET
   Base Color: #20242D | Accent: #0168FF
   ========================================================================== */

:root {
    --bg-main: #20242D;
    --bg-card: #2a2f3e;
    --bg-hover: #1e1e1e;
    --accent: #0168FF;
    --accent-hover: #0056d6;
    --text-white: #FFFFFF;
    --text-gray: #A0A6B1;
    --border-color: #333333;
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 5px 20px rgba(1, 104, 255, 0.3);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- LAYOUT & TYPOGRAPHY --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 35px;
    font-size: 1.1rem;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 25px;
    word-wrap: break-word;
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* --- HEADER --- */
.main-header {
    background-color: var(--bg-main);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-img {
    max-height: 45px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* --- LANGUAGE SWITCHER --- */
.lang-switcher {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: var(--text-white);
    font-weight: bold;
    font-size: 14px;
}

.current-lang {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #1a1a1a;
    transition: var(--transition);
    display: inline-block;
}

.lang-switcher:hover .current-lang {
    border-color: var(--accent);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 130px;
    z-index: 1000;
    flex-direction: column;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.lang-switcher:hover .lang-dropdown {
    display: flex;
}

.lang-dropdown a {
    padding: 12px 15px;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid #2a2a2a;
}

.lang-dropdown a:last-child {
    border-bottom: none;
}

.lang-dropdown a:hover {
    background: var(--accent);
    color: var(--text-white);
}

.lang-dropdown a.active {
    color: var(--accent);
    font-weight: bold;
    pointer-events: none;
    background: #121212;
}

/* --- BUTTONS --- */
.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-login {
    color: var(--text-white);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.btn-login:hover {
    color: var(--accent);
}

.cta-wrapper {
    text-align: center;
    margin: 35px 0;
}

.btn-reg {
    display: inline-block;
    background: var(--accent);
    color: var(--text-white);
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-accent);
    transition: var(--transition);
    text-align: center;
}

.btn-reg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(1, 104, 255, 0.5);
    background: var(--accent-hover);
}

/* --- GAME IFRAME --- */
.game-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    border: 1px solid rgba(1, 104, 255, 0.15);
}

.game-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- SEO TAGS --- */
.seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: var(--bg-hover);
    color: var(--text-gray);
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag:hover {
    background: var(--accent);
    color: var(--text-white);
    border-color: var(--accent);
}

/* --- SPECS TABLE --- */
.specs {
    width: 100%;
    margin: 30px 0;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

.specs td {
    padding: 16px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.specs tr:last-child td {
    border-bottom: none;
}

.specs td:first-child {
    color: var(--text-gray);
    font-weight: 600;
    width: 45%;
}

/* --- SEO CONTENT & FAQ --- */
.seo-block {
    margin-top: 50px;
    text-align: left;
}

.seo-block h2, .seo-block h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 1.6rem;
}

.seo-block p {
    margin-bottom: 15px;
    color: var(--text-gray);
    font-size: 1.05rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.faq-item strong {
    display: block;
    margin-bottom: 10px;
    color: var(--text-white);
    font-size: 1.1rem;
}

/* --- RELATED GAMES GRID --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: var(--bg-card);
    padding: 12px;
    border-radius: 14px;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow-dark);
    display: block;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 12px;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.card p {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

/* --- FOOTER --- */
footer {
    background-color: var(--bg-main);
    margin-top: 60px;
    padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    text-align: left;
}

.footer-info img {
    margin-bottom: 10px;
}

/* --- POPUP (MODAL) --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}

.modal {
    background: var(--bg-main);
    padding: 40px 30px;
    border-radius: 20px;
    border: 2px solid var(--accent);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 50px rgba(1, 104, 255, 0.3);
}

.modal h2 {
    color: var(--accent);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.modal p {
    font-size: 1.05rem;
    margin-bottom: 25px;
}

/* Текстовые стили генерируемые ИИ */
.seo-text h3 {
    color: var(--accent);
    margin: 25px 0 15px 0;
    font-size: 22px;
}
.seo-text ul {
    margin-bottom: 20px;
    padding-left: 20px;
}
.seo-text li {
    margin-bottom: 10px;
    color: var(--text-gray);
}
.seo-text strong {
    color: #fff;
}


/* ==========================================================================
   🔥 ULTIMATE RESPONSIVE OVERRIDES (TABLETS & MOBILE) 🔥
   ========================================================================== */

/* --- ПЛАНШЕТЫ (до 992px) --- */
@media (max-width: 992px) {
    /* Ломаем 2-колоночные сетки в 1 колонку */
    .game-layout[style],
    .pros-cons[style],
    .provider-hero > div[style*="grid"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .game-sidebar {
        margin-top: 10px;
    }
}

/* --- СМАРТФОНЫ (до 768px) --- */
@media (max-width: 768px) {
    /* Header */
    .header-flex {
        flex-direction: column;
        gap: 15px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
        padding: 0 10px;
    }

    /* Typography & Headers Overrides */
    h1, h1[style] {
        font-size: 26px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    h2[style], h3[style] {
        font-size: 20px !important;
    }

    /* Container Paddings (Hero, Blocks, FAQ) */
    .provider-hero[style],
    .seo-block[style],
    .faq-section[style],
    .game-sidebar[style] {
        padding: 20px !important;
    }

    /* Pros & Cons Boxes Padding */
    .pros-cons > div[style] {
        padding: 20px !important;
    }

    /* Table of Contents (TOC) */
    .toc[style] {
        width: 100%;
        box-sizing: border-box;
    }
    .toc ul[style] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Tables (Specs) */
    .specs td,
    .provider-specs table td[style],
    .game-sidebar table td[style] {
        padding: 10px 0 !important;
        font-size: 13px !important;
    }

    /* Flex Layouts (Date & Titles) */
    div[style*="display: flex; justify-content: space-between"],
    div[style*="display: flex; justify-content: center"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }

    /* Game Container adjustments */
    .game-container[style] {
        aspect-ratio: auto !important; /* Отключаем жесткий aspect-ratio инлайна */
        padding-bottom: 60% !important; /* Включаем отзывчивый паддинг для мобилок */
    }

    /* Buttons */
    .btn-reg {
        width: 100%;
        padding: 10px 20px !important;
        font-size: 1rem;
        display: block !important;
    }

    /* Related Games Grid (2 в ряд на смартфонах) */
    .grid, .grid[style*="grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Скрываем лишние карточки на мобилках (оставляем 4) */
    .grid .card:nth-child(n+5) {
        display: none !important;
    }

    /* Cross Links Tags */
    .cross-links div[style*="display: flex"] {
        justify-content: center;
    }

    /* Footer */
    .footer-flex {
        flex-direction: column;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .footer-auth {
        width: 100%;
    }
}

/* --- МАЛЕНЬКИЕ ЭКРАНЫ (до 480px) --- */
@media (max-width: 480px) {
    /* На очень узких экранах выстраиваем игры по 1 в ряд */
    .grid, .grid[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
}