/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #00205B;
    --accent-yellow: #FFD600;
    --deep-gold: #E0A300;
    --light-gold: #FFDD55;
    --dark-gray: #1A1A1A;
    --medium-gray: #2A2A2A;
    --light-gray: #D8D8D8;
    --white: #FFFFFF;
    --red-accent: #FF2E2E;
    --green-accent: #1ED760;
    --purple-highlight: #9C27B0;
    --gradient-gold: linear-gradient(135deg, #FFD600 0%, #E0A300 100%);
    --gradient-blue: linear-gradient(180deg, #00205B 0%, #003580 100%);
    --shadow-soft: 0 2px 6px rgba(0,0,0,0.25);
    --shadow-medium: 0 4px 10px rgba(0,0,0,0.35);
    --shadow-intense: 0 8px 16px rgba(0,0,0,0.45);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --border-light: 1px solid rgba(255, 255, 255, 0.1);
    --container-max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--white);
    background: var(--dark-gray);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--white);
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

h4 {
    font-size: 18px;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-yellow);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    min-width: 60px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient-gold);
    color: var(--primary-blue);
    box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
    background: linear-gradient(135deg, #FFE54D 0%, #EABA00 100%);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

.btn--primary:active {
    background: linear-gradient(135deg, #E0A300 0%, #C98A00 100%);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}

.btn--secondary {
    background: var(--primary-blue);
    color: var(--white);
    border: 1px solid var(--accent-yellow);
}

.btn--secondary:hover {
    background: #003580;
    border-color: #FFE54D;
}

.btn--header {
    padding: 8px 16px;
    font-size: 13px;
}

.btn--hero {
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
}

/* Header */
.header {
    background: var(--primary-blue);
    border-bottom: var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__top {
    border-bottom: var(--border-light);
}

.header__top-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.header__cta-group {
    display: flex;
    gap: 12px;
}

.header__bottom {
    position: relative;
}

.header__bottom-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.header__burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.header__burger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

.header__nav {
    display: flex;
    justify-content: center;
}

.header__nav-list {
    display: flex;
    list-style: none;
    gap: 24px;
    padding: 16px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.header__nav-link {
    color: var(--white);
    font-weight: 500;
    transition: color 0.2s ease;
}

.header__nav-link:hover {
    color: var(--accent-yellow);
    text-decoration: none;
}

/* Dropdown Menu */
.header__nav-item {
    position: relative;
}

.header__nav-item--dropdown {
    position: relative;
}

.header__nav-link--dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header__nav-link--dropdown::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.3s ease;
}

.header__nav-item--dropdown.active .header__nav-link--dropdown::after {
    transform: rotate(180deg);
}

.header__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-blue);
    border: var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-intense);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 8px;
}

.header__nav-item--dropdown.active .header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown-list {
    list-style: none;
    padding: 8px 0;
}

.header__dropdown-item {
    margin: 0;
}

.header__dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--white);
    font-size: 14px;
    transition: all 0.2s ease;
}

.header__dropdown-link:hover {
    background: rgba(255, 214, 0, 0.1);
    color: var(--accent-yellow);
    text-decoration: none;
}

/* Table of Contents */
.header__toc-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-top: var(--border-light);
    position: sticky;
    top: 0;
    z-index: 999;
    overflow: hidden;
}

.toc {
    max-width: var(--container-max-width);
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox - скрыть scrollbar */
    -ms-overflow-style: none; /* IE и Edge - скрыть scrollbar */
}

.toc::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera - скрыть scrollbar */
}

.toc__list {
    display: flex;
    list-style: none;
    gap: 16px;
    padding: 12px 20px;
    white-space: nowrap;
    width: fit-content;
    min-width: 100%;
}

.toc__item {
    flex-shrink: 0;
}

.toc__link {
    display: block;
    padding: 6px 12px;
    color: var(--light-gray);
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toc__link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.toc__link.active {
    color: var(--accent-yellow);
    background: rgba(255, 214, 0, 0.1);
    font-weight: 600;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--medium-gray);
    padding: 12px 0;
    border-bottom: var(--border-light);
}

.breadcrumbs__list {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--light-gray);
}

.breadcrumbs__item:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--accent-yellow);
}

.breadcrumbs__link {
    color: var(--accent-yellow);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs__link:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Hero Section */
.hero {
    padding: 40px 0;
    background: var(--gradient-blue);
}

.hero__content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.hero__title {
    font-size: 36px;
    margin-bottom: 24px;
    text-align: center;
}

.hero__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 20px;
}

.hero__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero__lead {
    font-size: 16px;
    line-height: 1.7;
}

.hero__meta {
    margin-top: auto;
}

.reading-time {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--light-gray);
}

.reading-time__label {
    font-weight: 600;
}

.reading-time__value {
    color: var(--accent-yellow);
}

.hero__image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__figure {
    width: 100%;
    margin: 0;
}

.hero__image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.hero__fact-checked {
    text-align: center;
    margin-top: 20px;
    padding: 8px 16px;
    background: rgba(30, 215, 96, 0.2);
    border-radius: var(--radius-sm);
    display: inline-block;
    font-size: 12px;
    color: var(--green-accent);
}

/* Games Section */
.games {
    padding: 60px 0;
    background: var(--medium-gray);
}

.games__title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
}

.games__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.game-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/2;
    background: var(--dark-gray);
}

.game-card__link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.game-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-card__image {
    transform: scale(1.05);
}

.game-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card__overlay {
    opacity: 1;
}

.game-card__btn {
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Content Sections */
.content-section {
    padding: 60px 0;
}

.content-section:nth-child(even) {
    background: var(--medium-gray);
}

.section-title {
    font-size: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.figure-centered {
    text-align: center;
    margin: 30px 0;
}

.section-image {
    max-width: 50%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.content {
    max-width: 800px;
    margin: 0 auto;
}

.content h3 {
    margin-top: 30px;
    margin-bottom: 16px;
    color: var(--accent-yellow);
}

.content h4 {
    margin-top: 24px;
    margin-bottom: 12px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: var(--medium-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
}

thead {
    background: var(--primary-blue);
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--white);
}

td {
    padding: 12px;
    border-top: var(--border-light);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Lists */
ul, ol {
    padding-left: 24px;
}

li {
    margin-bottom: 8px;
}

/* Steps Section */
.steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.step-card {
    background: linear-gradient(180deg, #2A2A2A 0%, #1A1A1A 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.step-index {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.step-body {
    flex: 1;
}

.step-title {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--white);
}

.step-body p {
    margin: 0;
    color: var(--light-gray);
    font-size: 14px;
}

/* Pros & Cons Section */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.pros-col, .cons-col {
    background: linear-gradient(180deg, #2A2A2A 0%, #1A1A1A 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 24px;
}

.pros-list, .cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-list li, .cons-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
}

.pros-list li:last-child, .cons-list li:last-child {
    margin-bottom: 0;
}

.icon-check, .icon-cross {
    flex-shrink: 0;
    margin-top: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Bonus Slider */
.bonus-slider {
    position: relative;
    margin: 40px 0;
    padding: 0 50px;
}

.bonus-cards {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.bonus-cards::-webkit-scrollbar {
    height: 6px;
}

.bonus-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.bonus-cards::-webkit-scrollbar-thumb {
    background: var(--accent-yellow);
    border-radius: 3px;
}

.bonus-card {
    flex: 0 0 300px;
    background: linear-gradient(180deg, #2A2A2A 0%, #1A1A1A 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 24px;
    scroll-snap-align: start;
    box-shadow: var(--shadow-soft);
}

.bonus-card__title {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--accent-yellow);
}

.bonus-card__desc {
    font-size: 14px;
    color: var(--light-gray);
    margin-bottom: 20px;
}

.bonus-card__btn {
    width: 100%;
}

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: 1px solid var(--accent-yellow);
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.slider-prev {
    left: 0;
}

.slider-next {
    right: 0;
}

.slider-prev:hover, .slider-next:hover {
    background: #003580;
    border-color: #FFE54D;
}

/* Author Section */
.author-section {
    padding: 40px 0;
    background: var(--medium-gray);
}

.author {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    max-width: 800px;
    margin: 0 auto;
}

.author__avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author__info {
    flex: 1;
}

.author__name {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--accent-yellow);
}

.author__bio {
    color: var(--light-gray);
    margin-bottom: 12px;
}

.author__updated {
    font-size: 12px;
    color: var(--light-gray);
}

/* FAQ Section */
.faq-section {
    padding: 60px 0;
}

.faq-list {
    max-width: 800px;
    margin: 30px auto 0;
}

.faq-item {
    background: linear-gradient(180deg, #2A2A2A 0%, #1A1A1A 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 40px;
    user-select: none;
}

.faq-question::marker {
    display: none;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--accent-yellow);
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--light-gray);
}

.faq-answer p {
    margin: 0;
}

/* Footer */
.footer {
    background: var(--primary-blue);
    padding: 40px 0 20px;
    border-top: var(--border-light);
}

.footer__content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer__logo {
    text-align: center;
    margin-bottom: 30px;
}

.footer__logo img {
    height: 50px;
    width: auto;
}

.footer__nav {
    margin-bottom: 30px;
}

.footer__nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    list-style: none;
    padding: 0;
}

.footer__nav-list a {
    color: var(--white);
    transition: color 0.2s ease;
}

.footer__nav-list a:hover {
    color: var(--accent-yellow);
    text-decoration: none;
}

.footer__payments {
    text-align: center;
    margin-bottom: 30px;
}

.footer__payments-title {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--accent-yellow);
}

.footer__payment-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.payment-icon {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.footer__responsible {
    text-align: center;
    margin-bottom: 30px;
}

.footer__responsible img {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer__responsible img:hover {
    opacity: 1;
}

.footer__copyright {
    text-align: center;
    padding-top: 20px;
    border-top: var(--border-light);
    font-size: 12px;
    color: var(--light-gray);
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: var(--primary-blue);
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    z-index: 100;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-intense);
}

.back-to-top.visible {
    display: flex;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .games__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }
    
    .section-image {
        max-width: 100%;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .header__top-container {
        padding: 8px 15px;
        align-items: center;
        gap: 10px;
    }
    
    .header__logo img {
        height: 32px;
    }
    
    .header__cta-group {
        flex-shrink: 0;
        gap: 8px;
    }
    
    .btn--header {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .header__burger {
        display: flex;
    }
    
    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-blue);
        border-top: var(--border-light);
    }
    
    .header__nav.active {
        display: block;
    }
    
    .header__nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .header__nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: var(--border-light);
    }
    
    /* Mobile Dropdown */
    .header__nav-item--dropdown .header__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        margin-top: 0;
        background: rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .header__nav-item--dropdown.active .header__dropdown {
        max-height: 500px;
    }
    
    /* Auto-expand dropdown in mobile when nav is active */
    .header__nav.active .header__nav-item--dropdown .header__dropdown {
        max-height: 500px;
    }
    
    .header__dropdown-link {
        padding: 10px 20px 10px 40px;
    }
    
    .hero__layout {
        grid-template-columns: 1fr;
    }
    
    .hero__image-wrapper {
        order: -1;
    }
    
    .games__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .bonus-slider {
        padding: 0 40px;
    }
    
    .bonus-card {
        flex: 0 0 280px;
    }
    
    .author {
        flex-direction: column;
        text-align: center;
    }
    
    .footer__nav-list {
        flex-direction: column;
        gap: 12px;
    }
    
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 30px 0;
    }
    
    .hero__title {
        font-size: 24px;
    }
    
    .games__grid {
        grid-template-columns: 1fr;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    
    .game-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .bonus-slider {
        padding: 0 30px;
    }
    
    .slider-prev, .slider-next {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .back-to-top,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

