/* Blog Styles - Clair Obscur Theme */
/* Основной файл стилей для блога */

/* ============================================
   COLOR VARIABLES - Управление цветами статьи
   ============================================ */
:root {
    /* Primary colors - изумрудная гамма */
    --color-primary: #2d7a5e;
    --color-primary-dark: #1a3d2e;
    --color-primary-light: rgba(45, 122, 94, 0.8);
    --color-primary-bg: rgba(45, 122, 94, 0.1);
    --color-primary-border: rgba(45, 122, 94, 0.3);
    
    /* Hero overlay gradient */
    --hero-overlay-start: rgba(26, 61, 46, 0.6);
    --hero-overlay-end: rgba(45, 122, 94, 0.6);
    
    /* Text colors */
    --text-main: #333;
    --text-muted: #666;
    --text-light: #7f8c8d;
    --text-white: #fff;
    --text-white-muted: rgba(255, 255, 255, 0.9);
    --text-white-faded: rgba(255, 255, 255, 0.95);
    
    /* Background colors */
    --bg-body: #fafafa;
    --bg-container: #fff;
    --bg-toc: #f8f9fa;
    
    /* Accent colors */
    --accent-lightbox: rgba(0, 0, 0, 0.95);
    --accent-quote: rgba(255, 255, 255, 0.6);
    --accent-shadow: rgba(0, 0, 0, 0.1);
    --accent-shadow-strong: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
}

.container {
    background: var(--bg-container);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--accent-shadow);
    max-width: 800px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--color-primary-dark);
    font-weight: 600;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 15px;
}

h2 {
    font-size: 1.8em;
    margin-top: 40px;
}

h3 {
    font-size: 1.4em;
    margin-top: 30px;
}

p {
    margin-bottom: 15px;
}

/* Text elements */
blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-muted);
}

em {
    color: var(--text-light);
    font-style: italic;
}

h1 em, h2 em, h3 em, h4 em {
    color: inherit;
}

strong {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* media elements */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 8px var(--accent-shadow);
}

/* Center images in article content */
.game-review img {
    display: block;
    margin: 20px auto;
}

video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--accent-lightbox);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Loader styles */
.lightbox-loader {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: var(--text-white);
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--color-primary);
}

/* Clickable images */
.clickable-img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.clickable-img:hover {
    transform: scale(1.02);
}

.media-caption {
    text-align: center;
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: -10px;
    margin-bottom: 20px;
}

/* YouTube embeds */
.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 30px 0;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Lists */
ul, ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 8px;
}

/* Special elements */
.act-title {
    text-align: center;
    font-size: 2em;
    margin: 40px 0;
    color: var(--color-primary);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    h3 {
        font-size: 1.2em;
    }
}

/* Table of contents */
.table-of-contents {
    background: var(--bg-toc);
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid var(--color-primary);
}

.table-of-contents h3 {
    margin-top: 0;
    color: var(--color-primary-dark);
    font-size: 1.2em;
}

.table-of-contents ul {
    margin-left: 0;
    list-style: none;
}

.table-of-contents ul li {
    margin-bottom: 5px;
}

.table-of-contents a {
    color: var(--color-primary);
    text-decoration: none;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

.table-of-contents ul ul {
    margin-left: 20px;
    margin-top: 5px;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
    max-width: 100%;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* Mobile gallery - ensure images fit screen */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery img {
        height: auto;
        max-height: 300px;
    }
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-banner.article-hero {
    height: 100vh;
    background-attachment: fixed;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hero-overlay-start), var(--hero-overlay-end));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
    padding: 40px;
    max-width: 800px;
}

.hero-title {
    font-size: 4em;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.1);
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.2em;
    opacity: 0.95;
    margin-bottom: 30px;
}

.hero-quote {
    border-left: 3px solid var(--accent-quote);
    font-style: italic;
    color: var(--text-white-muted);
    font-size: 1.4em;
    text-align: center;
    margin: 30px auto 0;
    max-width: 600px;
    padding: 0 0 0 25px;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.6;
    text-shadow: 0 2px 10px var(--accent-shadow-strong);
}

.hero-quote p {
    margin: 0;
}

.publication-date {
    background: var(--color-primary-light);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--text-white);
    font-size: 2em;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive hero */
@media (max-width: 768px) {
    .hero-content {
        padding: 25px 20px;
    }
    
    .hero-title {
        font-size: 2.2em;
        -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.1);
        padding: 0 10px;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .hero-banner,
    .hero-banner.article-hero {
        height: 100vh;
    }
    
    .hero-quote {
        font-size: 1.15em;
        margin-top: 20px;
    }
}

/* Article header */
.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-header .publication-date {
    background: var(--color-primary-bg);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 0.9em;
    border: 1px solid var(--color-primary-border);
}

/* ============================================
   MAIN PAGE STYLES - Главная страница блога
   ============================================ */

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 10px var(--accent-shadow);
    transition: transform 0.3s ease;
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5em;
    font-weight: 700;
    color: #1a3d2e;
    text-decoration: none;
    transition: color 0.2s;
}

.site-title:hover {
    color: #2d7a5e;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2d7a5e;
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #2d7a5e;
}

/* Blog Hero */
.blog-hero {
    padding: 140px 30px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-toc) 0%, var(--bg-body) 100%);
}

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

.blog-hero h1 {
    font-size: 3em;
    color: var(--color-primary-dark);
    margin-bottom: 15px;
    border: none;
}

.blog-hero p {
    color: var(--text-muted);
    font-size: 1.2em;
}

/* Articles Container */
.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px 80px;
}

/* Hero Image */
.hero-image-container {
    max-width: 500px;
    margin: -30px auto 40px;
    padding: 0 40px;
}

.hero-image-container img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--accent-shadow);
}

.section-title {
    font-size: 1.8em;
    color: var(--color-primary-dark);
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-primary-border);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Article Card */
.article-card {
    background: var(--bg-container);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--accent-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--accent-shadow-strong);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Article Card Theme-specific colors */
.article-card[data-theme="darkred"] .card-category {
    background: #8b0000;
}

.article-card[data-theme="darkred"] .card-title {
    color: #4a0000;
}

.article-card[data-theme="darkred"]:hover .card-title {
    color: #8b0000;
}

.article-card[data-theme="blue"] .card-category {
    background: #1976d2;
}

.article-card[data-theme="blue"] .card-title {
    color: #0d47a1;
}

.article-card[data-theme="blue"]:hover .card-title {
    color: #1976d2;
}

.article-card[data-theme="purple"] .card-category {
    background: #7b1fa2;
}

.article-card[data-theme="purple"] .card-title {
    color: #4a148c;
}

.article-card[data-theme="purple"]:hover .card-title {
    color: #7b1fa2;
}

.article-card[data-theme="orange"] .card-category {
    background: #e65100;
}

.article-card[data-theme="orange"] .card-title {
    color: #bf360c;
}

.article-card[data-theme="orange"]:hover .card-title {
    color: #e65100;
}

.article-card[data-theme="red"] .card-category {
    background: #c62828;
}

.article-card[data-theme="red"] .card-title {
    color: #8e0000;
}

.article-card[data-theme="red"]:hover .card-title {
    color: #c62828;
}

.article-card[data-theme="emerald"] .card-category {
    background: #2d7a5e;
}

.article-card[data-theme="emerald"] .card-title {
    color: #1a3d2e;
}

.article-card[data-theme="emerald"]:hover .card-title {
    color: #2d7a5e;
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.4em;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
    transition: color 0.2s;
}

.article-card:hover .card-title {
    color: var(--color-primary);
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: var(--text-light);
}

/* Responsive main page */
@media (max-width: 768px) {
    .header-content {
        padding: 12px 20px;
    }
    
    .site-title {
        font-size: 1.2em;
    }
    
    .main-nav {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 0.9em;
    }
    
    .blog-hero {
        padding: 120px 20px 60px;
    }
    
    .blog-hero h1 {
        font-size: 2em;
    }
    
    .blog-hero p {
        font-size: 1em;
    }
    
    .articles-container {
        padding: 30px 20px 60px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .site-footer {
        padding: 20px;
    }
}

/* Footer */
.site-footer {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Feedback Form */
.feedback-form {
    background: var(--bg-container);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--accent-shadow);
    max-width: 800px;
    margin: 20px auto 40px;
}

.feedback-form iframe {
    display: block;
    width: 100%;
}

/* Spoiler / Cut Block Styles */
.spoiler-block {
    background: var(--bg-toc);
    border: 1px solid var(--color-primary-border);
    border-radius: 8px;
    margin: 25px 0;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--accent-shadow);
}

.spoiler-title {
    display: block;
    width: 100%;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--color-primary-dark);
    cursor: pointer;
    background: var(--color-primary-bg);
    border: none;
    position: relative;
    list-style: none;
    font-size: 1.05em;
    transition: background 0.2s ease;
}

.spoiler-title:hover {
    background: rgba(45, 122, 94, 0.2);
}

/* Custom marker for spoiler title */
.spoiler-title::marker {
    display: none;
}

.spoiler-title::-webkit-details-marker {
    display: none;
}

.spoiler-title::before {
    content: '▶';
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s ease;
    color: var(--color-primary);
}

.spoiler-block[open] .spoiler-title::before {
    transform: rotate(90deg);
}

.spoiler-content {
    padding: 20px;
    background: var(--bg-container);
    border-top: 1px solid var(--color-primary-border);
}

.spoiler-content > *:first-child {
    margin-top: 0;
}

.spoiler-content > *:last-child {
    margin-bottom: 0;
}

/* Smooth animation for spoiler opening */
.spoiler-block {
    transition: max-height 0.3s ease-out;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .spoiler-title {
        padding: 12px 15px;
        font-size: 1em;
    }
    
    .spoiler-content {
        padding: 15px;
    }
}