/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors from design system */
    --bg-primary: #0E0E0E;
    --bg-secondary: #1A1A1A;
    --bg-surface: #212121;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-tertiary: #808080;
    --text-highlight: #FFD54F;
    --text-link: #FFD700;
    --accent-gold: #FFD700;
    --accent-gold-hover: #FFC107;
    --accent-gold-active: #FFB300;
    --border-color: #2C2C2C;
    --border-highlight: #FFD54F;
    
    /* Gradients */
    --gradient-hero: linear-gradient(90deg, #E91E63 0%, #FF9800 100%);
    --gradient-button: linear-gradient(90deg, #FFD700 0%, #FFB300 100%);
    
    /* Shadows */
    --shadow-default: 0 2px 6px rgba(0,0,0,0.4);
    --shadow-card: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-button: 0 3px 6px rgba(255,215,0,0.25);
    
    /* Border Radius */
    --radius-small: 6px;
    --radius-medium: 10px;
    --radius-large: 16px;
    
    /* Container */
    --container-max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Visually Hidden */
.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;
}

/* Header */
header {
    background-color: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.header-cta {
    display: flex;
    gap: 15px;
}

.header-bottom {
    padding: 10px 0;
}

.main-nav {
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--text-highlight);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

/* Table of Contents */
.toc-wrapper {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 999;
}

.table-of-contents {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.table-of-contents::-webkit-scrollbar {
    display: none;
}

.toc-list {
    display: flex;
    list-style: none;
    gap: 20px;
    padding: 15px 0;
    white-space: nowrap;
}

.toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-block;
}

.toc-list a:hover,
.toc-list a:focus {
    color: var(--text-highlight);
    background-color: rgba(255, 213, 79, 0.1);
}

.toc-list a.active {
    color: var(--text-highlight);
    background-color: rgba(255, 213, 79, 0.15);
    text-decoration: underline;
}

/* Buttons */
.btn {
    min-width: 60px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-small);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-button);
    color: var(--bg-primary);
    box-shadow: var(--shadow-button);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #FFE082 0%, #FFCA28 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,215,0,0.4);
}

.btn-primary:active {
    background: linear-gradient(90deg, #FFC107 0%, #FFA000 100%);
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-highlight);
    color: var(--text-highlight);
}

.btn-secondary:hover {
    background: rgba(255, 213, 79, 0.15);
}

.btn-secondary:active {
    background: rgba(255, 213, 79, 0.3);
}

.btn:focus {
    outline: 1px solid var(--border-highlight);
    outline-offset: 2px;
    box-shadow: 0 0 8px rgba(255,215,0,0.5);
}

/* Hero Section */
#hero {
    padding: 60px 0;
    background-color: var(--bg-primary);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-lead {
    margin-bottom: 20px;
}

.hero-lead p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.reading-time {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.reading-time-label {
    margin-right: 5px;
}

.hero-image-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-image {
    width: 100%;
    max-width: 600px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-medium);
    object-fit: contain;
}

.btn-hero {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.fact-checked {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Games Section */
#games {
    padding: 60px 0;
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-primary);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-card {
    position: relative;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.game-card:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-card);
    transform: translateY(-5px);
}

.game-card-link {
    display: block;
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background-color: var(--bg-surface);
}

.game-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.75) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover .game-card-overlay {
    opacity: 1;
}

.game-play-btn {
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Sections */
section {
    padding: 60px 0;
}

section:nth-child(even) {
    background-color: var(--bg-secondary);
}

section:nth-child(odd) {
    background-color: var(--bg-primary);
}

section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--text-primary);
    scroll-margin-top: 150px;
}

section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-image {
    margin: 30px 0;
    text-align: center;
}

.section-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-medium);
    object-fit: contain;
}

.content {
    color: var(--text-secondary);
}

.content p {
    margin-bottom: 15px;
}

.content ul,
.content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.content li {
    margin-bottom: 10px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background-color: var(--bg-surface);
    border-radius: var(--radius-medium);
    overflow: hidden;
}

thead {
    background-color: var(--bg-secondary);
}

th {
    padding: 15px;
    text-align: left;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr:hover {
    background-color: rgba(255, 213, 79, 0.05);
}

/* Step-by-Step Section */
.steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.step-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    padding: 25px;
    display: flex;
    gap: 20px;
    transition: all 0.3s;
}

.step-card:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-card);
}

.step-index {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-button);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-body {
    flex: 1;
}

.step-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.step-body p {
    color: var(--text-secondary);
    margin: 0;
}

/* Pros & Cons Section */
.pros-cons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 30px 0;
}

.pros-col,
.cons-col {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    padding: 25px;
}

.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: 15px;
    color: var(--text-secondary);
}

.pros-list li:last-child,
.cons-list li:last-child {
    margin-bottom: 0;
}

.icon-check,
.icon-cross {
    flex-shrink: 0;
    margin-top: 2px;
}

.pros-list li {
    color: var(--text-secondary);
}

.cons-list li {
    color: var(--text-secondary);
}

/* Author Section */
#author {
    padding: 40px 0;
    background-color: var(--bg-secondary);
}

.author-block {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 30px;
    background-color: var(--bg-surface);
    border-radius: var(--radius-medium);
    border: 1px solid var(--border-color);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-bio {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.author-updated {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* FAQ Section */
#faq {
    padding: 60px 0;
}

.faq-list {
    margin-top: 30px;
}

.faq-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-medium);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--text-highlight);
    transition: transform 0.3s;
}

.faq-item[open] .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-question:hover {
    background-color: rgba(255, 213, 79, 0.05);
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text-secondary);
}

.faq-answer p {
    margin: 0;
}

/* Footer */
footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover,
.footer-nav a:focus {
    color: var(--text-highlight);
}

.footer-payments {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.payment-icon {
    padding: 8px 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-responsible {
    display: flex;
    align-items: center;
}

.footer-copyright {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-button);
    color: var(--bg-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-button);
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(255,215,0,0.4);
}

.back-to-top:focus {
    outline: 2px solid var(--border-highlight);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-top-content {
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    .header-cta {
        width: auto;
        margin-top: 0;
        justify-content: flex-end;
        flex-shrink: 0;
        gap: 8px;
    }
    
    .header-cta .btn {
        font-size: 0.75rem;
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    .logo img {
        height: 40px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
        gap: 15px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-image-cta {
        flex-direction: column-reverse;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        overflow-x: auto;
        display: flex;
        padding-bottom: 20px;
    }
    
    .game-card {
        min-width: 200px;
        flex-shrink: 0;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
    
    .author-block {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-copyright {
        grid-column: 1;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .header-cta {
        flex-direction: row;
        gap: 6px;
    }
    
    .header-cta .btn {
        width: auto;
        font-size: 0.7rem;
        padding: 6px 10px;
    }
    
    .logo img {
        height: 35px;
    }
}

/* Table to Cards Transformation (Mobile) */
@media (max-width: 768px) {
    .table-card {
        display: block;
        background-color: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-medium);
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .table-card-row {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .table-card-row:last-child {
        border-bottom: none;
    }
    
    .table-card-label {
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .table-card-value {
        color: var(--text-secondary);
    }
}
