/* ===== CSS ПЕРЕМЕННЫЕ ===== */
:root {
    /* Цветовая палитра */
    --primary-color: #2a1a1f;
    --secondary-color: #8b4513;
    --accent-color: #c19a6b;
    --accent-steam: #a8a8a8;
    --rust-color: #b7410e;
    --copper-color: #b87333;
    --text-color: #e8e0d9;
    --bg-color: #1a1111;
    --card-bg: #2d2222;
    --metal-dark: #3a332e;
    --metal-light: #5d534a;
    --steam-color: #d3d3d3;
    --asphalt: #2f2f2f;
    
    /* Типографика */
    --font-heading: 'Cinzel', 'Georgia', serif;
    --font-body: 'Crimson Text', serif;
    
    /* Отступы */
    --section-padding: 100px 0;
    --container-padding: 0 20px;
    --card-padding: 2.5rem;
    
    /* Тени */
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.6);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.6);
    --shadow-large: 0 20px 40px rgba(179, 65, 14, 0.4);

    /* Размер шрифта */
    --font-size-base: 1.1rem;
    --font-size-large: 1.3rem;
    --font-size-xl: 1.5rem;
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-heading);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 80%, var(--rust-color) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--copper-color) 0%, transparent 50%);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, var(--asphalt) 25%, transparent 25%),
        linear-gradient(-45deg, var(--asphalt) 25%, transparent 25%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

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

/* ===== КОМПОНЕНТЫ ===== */

/* Дирижабль */
#airship {
    position: fixed;
    top: 50px;
    right: -200px;
    z-index: 1000;
    animation: fly 35s linear infinite;
    pointer-events: none;
}

#airship img {
    width: 180px;
    height: auto;
    display: block;
    filter: 
        drop-shadow(2px 2px 6px rgba(0,0,0,0.7))
        brightness(0.95)
        contrast(1.1);
    background: transparent;
    border: none;
    outline: none;
}

#airship::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 40px;
    width: 150px;
    height: 50px;
    background: radial-gradient(ellipse, var(--steam-color) 0%, transparent 90%);
    opacity: 0.5;
    filter: blur(15px);
    animation: steam 4s ease-in-out infinite;
    z-index: -1;
}

/* Навигация */
.main-nav, .chapter-nav {
    background: linear-gradient(135deg, var(--metal-dark), var(--copper-color));
    color: var(--text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--rust-color);
    box-shadow: var(--shadow-soft);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--accent-color);
    border-color: var(--rust-color);
    background: rgba(179, 65, 14, 0.15);
    transform: translateY(-2px);
}

/* Секции */
.section {
    padding: var(--section-padding);
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--rust-color), 
        var(--copper-color), 
        var(--rust-color), 
        transparent
    );
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 3rem;
    color: var(--accent-color);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
    font-family: var(--font-heading);
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rust-color), var(--copper-color), var(--rust-color), transparent);
}

/* Герой секция */
.hero {
    background: 
        radial-gradient(ellipse at center, 
            rgba(139, 69, 19, 0.4) 0%, 
            rgba(42, 26, 31, 0.9) 70%);
    color: var(--text-color);
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--rust-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 15px,
            rgba(179, 65, 14, 0.08) 15px,
            rgba(179, 65, 14, 0.08) 30px
        );
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.title-container {
    margin-bottom: 2rem;
}

.book-title {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    text-shadow: 
        3px 3px 8px rgba(0,0,0,0.8),
        0 0 30px rgba(193, 154, 107, 0.4);
    color: var(--accent-color);
    font-family: var(--font-heading);
    letter-spacing: 3px;
    font-weight: 700;
}

.title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
}

.gear-icon {
    font-size: 1.8rem;
    margin: 0 1.5rem;
    opacity: 0.6;
    animation: rotate 10s linear infinite;
}

.divider-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-color), 
        var(--copper-color), 
        var(--accent-color), 
        transparent
    );
    max-width: 300px;
}

.book-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--steam-color);
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    font-family: var(--font-body);
}

.hero-quote {
    font-style: italic;
    margin: 2.5rem 0;
    font-size: 1.3rem;
    color: var(--steam-color);
    text-shadow: 0 0 15px rgba(193, 154, 107, 0.3);
    font-family: var(--font-body);
    line-height: 1.8;
}

/* Кнопки */
.cta-button, .read-button, .nav-button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--rust-color), var(--copper-color));
    color: var(--text-color);
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.4s ease;
    border: 2px solid var(--accent-color);
    font-family: var(--font-heading);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    cursor: pointer;
}

.read-button, .nav-button {
    padding: 12px 28px;
    font-size: 1rem;
    letter-spacing: 1px;
}

.cta-button::before, .read-button::before, .nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.cta-button:hover, .read-button:hover, .nav-button:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 25px rgba(179, 65, 14, 0.5),
        inset 0 0 30px rgba(255,255,255,0.1);
    letter-spacing: 3px;
}

.cta-button:hover::before, .read-button:hover::before, .nav-button:hover::before {
    left: 100%;
}

.coming-soon, .nav-button:disabled {
    background: var(--asphalt) !important;
    border-color: #666 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

.coming-soon:hover, .nav-button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
    letter-spacing: 1px !important;
}

/* Карточки */
.chapters-grid, .world-features, .world-map, .footer-content {
    display: grid;
    gap: 2.5rem;
    margin-top: 3rem;
}

.chapters-grid {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.world-features, .world-map {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.footer-content {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 3rem;
}

.chapter-card, .feature-item, .region {
    background: linear-gradient(145deg, var(--card-bg), var(--metal-dark));
    border: 1px solid var(--metal-light);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 
        var(--shadow-medium),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.4s ease;
    position: relative;
}

.chapter-card::before, .feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rust-color), var(--copper-color), var(--accent-color), var(--copper-color), var(--rust-color));
    z-index: 2;
}

.feature-item::before {
    width: 5px;
    height: 100%;
    right: auto;
    background: linear-gradient(to bottom, var(--rust-color), var(--copper-color));
}

.chapter-card:hover, .feature-item:hover, .region:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
}

.chapter-image {
    position: relative;
    overflow: hidden;
}

.chapter-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: sepia(0.5) contrast(1.1) brightness(0.85);
    transition: all 0.4s ease;
}

.chapter-card:hover .chapter-image img {
    filter: sepia(0.2) contrast(1.2) brightness(0.95);
    transform: scale(1.05);
}

.chapter-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--rust-color);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 1.3rem;
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.chapter-info, .feature-item, .region {
    padding: var(--card-padding);
}

.chapter-info h3, .feature-item h3, .region h3 {
    color: var(--accent-color);
    margin-bottom: 1.2rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.chapter-info h3 {
    border-left: 4px solid var(--rust-color);
    padding-left: 1.2rem;
    font-size: 1.4rem;
}

.chapter-info p, .feature-item p, .region p {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.chapter-info p {
    font-size: 1.1rem;
}

.chapter-meta {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.location, .date {
    font-size: 0.85rem;
    color: var(--accent-color);
    background: rgba(193, 154, 107, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 3px;
    border: 1px solid var(--metal-light);
    font-family: var(--font-heading);
}

/* Содержание главы */
.chapter-content {
    padding: 4rem 0;
    background: rgba(42, 26, 31, 0.85);
    min-height: 100vh;
}

.chapter-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 2.5rem;
    border-bottom: 3px solid var(--metal-light);
    position: relative;
}

.chapter-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: var(--rust-color);
}

.chapter-title {
    font-size: 3.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

.chapter-text {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--metal-light);
    box-shadow: 
        0 15px 40px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    overflow: visible; /* ИЗМЕНИТЬ с hidden на visible */
    height: auto; /* ДОБАВИТЬ */
    min-height: auto; /* ДОБАВИТЬ */
}

@media (min-width: 769px) {
    .chapter-text {
        padding: 4rem;
    }
}

.chapter-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, 
        var(--rust-color), 
        var(--copper-color), 
        var(--accent-color), 
        var(--copper-color), 
        var(--rust-color)
    );
}

.text-part {
    margin-bottom: 4rem;
    position: relative;
}

.text-part p {
    font-size: 1.2rem;
    line-height: 1.9;
    margin-bottom: 1.8rem;
    text-align: justify;
    color: var(--text-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-family: var(--font-body);
}

.illustration {
    margin: 3.5rem 0;
    text-align: center;
    position: relative;
}

.illustration::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 2px solid var(--rust-color);
    border-radius: 4px;
    opacity: 0.2;
    pointer-events: none;
}

.illustration img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 
        0 12px 35px rgba(0,0,0,0.5),
        0 0 0 1px var(--metal-light);
    filter: sepia(0.4) contrast(1.1) brightness(0.9);
    transition: all 0.4s ease;
}

/* Обычные изображения - меняют цвет при наведении */
.illustration:hover img:not(.no-color-change) {
    filter: sepia(0.1) contrast(1.2) brightness(1);
    transform: scale(1.03);
    box-shadow: 
        0 20px 50px rgba(179, 65, 14, 0.3),
        0 0 0 1px var(--metal-light);
}

/* Изображения с классом no-color-change - не меняют фильтры */
.illustration:hover img.no-color-change {
    filter: sepia(0.4) contrast(1.1) brightness(0.9); /* Оставляем оригинальные фильтры */
    transform: scale(1.03);
    box-shadow: 
        0 20px 50px rgba(179, 65, 14, 0.3),
        0 0 0 1px var(--metal-light);
}

.image-caption {
    font-style: italic;
    color: var(--accent-color);
    margin-top: 1.2rem;
    font-size: 1rem;
    text-align: center;
    border-top: 1px solid var(--metal-light);
    padding-top: 0.8rem;
    font-family: var(--font-body);
}

.steam-quote {
    border-left: 4px solid var(--rust-color);
    padding: 2rem 2.5rem;
    margin: 3rem 0;
    background: rgba(42, 26, 31, 0.7);
    font-style: italic;
    position: relative;
    font-family: var(--font-body);
    font-size: 1.3rem;
    line-height: 1.7;
}

.steam-quote::before {
    content: '"';
    font-size: 5rem;
    position: absolute;
    top: -1rem;
    left: 1rem;
    color: var(--rust-color);
    opacity: 0.2;
    font-family: serif;
}

/* Навигация по главам */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 3px solid var(--metal-light);
    position: relative;
}

.chapter-navigation::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rust-color), transparent);
}

.chapter-progress {
    text-align: center;
}

.chapter-progress span {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.progress-bar {
    width: 250px;
    height: 6px;
    background: var(--metal-dark);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--metal-light);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rust-color), var(--copper-color));
    transition: width 0.5s ease;
}

/* Футер */
.footer {
    background: linear-gradient(135deg, var(--metal-dark), var(--primary-color));
    color: var(--text-color);
    padding: 4rem 0 2rem;
    border-top: 4px solid var(--rust-color);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-color), 
        var(--copper-color), 
        var(--accent-color), 
        transparent
    );
}

.footer-section h4 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--rust-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-section p {
    line-height: 1.7;
    font-family: var(--font-body);
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid var(--metal-light);
    padding-top: 2rem;
    text-align: center;
    font-family: var(--font-heading);
}

/* Декоративные элементы */
.steam-effect {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(transparent, rgba(211, 211, 211, 0.05));
    pointer-events: none;
    z-index: 50;
}

.gear {
    position: absolute;
    font-size: 4rem;
    opacity: 0.08;
    animation: rotate 25s linear infinite;
    z-index: -1;
}

.gear-1 {
    top: 15%;
    left: 8%;
    animation-duration: 30s;
}

.gear-2 {
    top: 55%;
    right: 12%;
    animation-duration: 35s;
    animation-direction: reverse;
}

.gear-3 {
    bottom: 25%;
    left: 15%;
    animation-duration: 40s;
}

/* Специальные стили для кнопок навигации */
.back-home.nav-button, .home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
    min-width: max-content;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fly {
    0% {
        right: -200px;
        transform: translateY(0px) rotate(1deg);
    }
    25% {
        transform: translateY(-25px) rotate(-2deg);
    }
    50% {
        transform: translateY(10px) rotate(3deg);
    }
    75% {
        transform: translateY(-15px) rotate(-1deg);
    }
    100% {
        right: calc(100% + 200px);
        transform: translateY(0px) rotate(1deg);
    }
}

@keyframes steam {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

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

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .book-title {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }
    
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }
    
    .chapter-title {
        font-size: 2.5rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .chapter-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .chapter-text {
        padding: 2rem 1.5rem;
    }
    
    #airship {
        display: none;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    /* Адаптивность для навигации глав */
    .chapter-nav .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .chapter-title {
        font-size: 1.5rem;
        order: 2;
        white-space: normal;
        line-height: 1.3;
    }
    
    .back-home.nav-button {
        order: 1;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .chapter-controls {
        order: 3;
    }
    
    .home-button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ГЛАВЫ ===== */
.chapter-title {
    white-space: nowrap;
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: var(--font-heading);
    font-weight: 600;
}

/* Убираем дублирующие стили для chapter-header */
.chapter-text {
    padding-top: 2rem; /* Добавляем отступ сверху вместо удаленного header */
}

/* Улучшенные стили для текста главы */
.text-part h3 {
    color: var(--accent-color);
    margin: 2.5rem 0 1.5rem 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--rust-color);
    padding-bottom: 0.5rem;
}

/* Специфичные настройки для страницы главы */
.chapter-content {
    background: rgba(42, 26, 31, 0.9);
}

.chapter-nav {
    background: linear-gradient(135deg, var(--metal-dark), var(--primary-color));
}

/* Адаптивность для страницы главы */
@media (max-width: 768px) {
    .chapter-title {
        white-space: normal;
        font-size: 1.4rem;
        line-height: 1.3;
        text-align: center;
    }
    
    .chapter-nav .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .chapter-text {
        padding: 1rem 1rem 2rem 1rem !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .text-part {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        margin-bottom: 2rem;
    }
    
    .text-part p {
        font-size: 1.1rem;
        line-height: 1.6;
        text-indent: 1.5em;
        margin-bottom: 1.2rem;
        text-align: left; /* ИЗМЕНЕНИЕ: убираем выравнивание по ширине */
        text-align-last: left; /* ИЗМЕНЕНИЕ: выравнивание последней строки */
        hyphens: auto; /* ДОПОЛНИТЕЛЬНО: перенос слов при необходимости */
    }
    
    .illustration {
        margin: 2rem 0;
    }
    
    .illustration img {
        max-width: 100%;
        height: auto;
    }
    
    .chapter-content {
        overflow: visible !important;
    }
    
    .container {
        overflow: visible !important;
        max-width: 100% !important;
    }

    .feature-item-link {
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .feature-item-link .feature-item {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Убедимся, что ссылки не имеют подчеркивания на мобильных */
    .world-features a {
        text-decoration: none !important;
    }
}

/* ===== ФОРМАТИРОВАНИЕ ТЕКСТА С ОТСТУПАМИ ===== */
.text-part p {
    text-indent: 2em;
    margin-bottom: 1.5em;
    line-height: 1.8;
    text-align: justify;
    text-align-last: left; /* ДОБАВИТЬ: для десктопной версии тоже */
    font-size: 1.2rem;
    color: var(--text-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-family: var(--font-body);
}

/* Убираем отступ первой строки для первого абзаца после иллюстрации */
.illustration + p {
    text-indent: 0;
}

/* Отступы для разделов текста */
.text-part {
    margin-bottom: 3rem;
}

/* ===== ЗАЩИТА ОТ КОПИРОВАНИЯ ===== */


/* Разрешаем выделение только для навигации и кнопок */
.nav-button, .chapter-navigation, .footer {
    user-select: auto;
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
}

/* Разрешить выделение текста для чтения */
.chapter-text, 
.text-part, 
.text-part p {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Убедиться, что ничего не обрезается */
.chapter-content,
.container,
.chapter-text,
.text-part {
    overflow: visible !important;
    max-height: none !important;
}

/* ===== СТИЛИ ДЛЯ ДОНАТОВ ===== */
.usdt-address {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.crypto-label {
    font-size: 0.9em;
    color: var(--accent-color);
    width: 100%;
    margin-bottom: 5px;
    font-family: var(--font-body);
}

.wallet-address {
    background: rgba(0,0,0,0.2);
    padding: 6px 10px;
    font-family: monospace;
    font-size: 0.8em;
    word-break: break-all;
    flex: 1;
    min-width: 150px;
    color: var(--text-color);
}

.copy-btn {
    background: rgba(139, 69, 19, 0.7);
    border: 1px solid var(--metal-light);
    color: var(--text-color);
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8em;
    font-family: var(--font-heading);
}

.copy-btn:hover {
    background: rgba(160, 82, 45, 0.8);
    transform: translateY(-1px);
}

.footer-section small {
    color: var(--steam-color);
    font-size: 0.75em;
    display: block;
    margin-top: 8px;
    font-family: var(--font-body);
}

/* Адаптивность для донатов */
@media (max-width: 768px) {
    .usdt-address {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wallet-address {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .copy-btn {
        align-self: flex-end;
    }

    .world-map {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 10px !important;
    }
    
    .region {
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Специфично для страницы поддержки */
    .world.section .world-map {
        grid-template-columns: 1fr;
    }
}

/* ===== ВЫРАВНИВАНИЕ СЕКЦИЙ ФУТЕРА ===== */
.footer-content {
    align-items: start; /* Выравнивание по верху */
}

.footer-section {
    flex: 1;
    min-width: 250px;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    height: 100%; /* Занимает всю доступную высоту */
}

/* Специфичные стили для секции донатов */
.footer-section:nth-child(3) p:first-of-type {
    margin-bottom: 12px;
    font-size: 0.95em;
    line-height: 1.4;
}

.footer-section:nth-child(3) .usdt-address {
    margin: 8px 0;
}

.footer-section:nth-child(3) small {
    margin-top: auto; /* Прижимает текст к низу */
    padding-top: 10px;
}

/* Уменьшаем отступы для балансировки */
.footer-section h4 {
    margin-bottom: 1rem; /* Уменьшаем отступ под заголовком */
}

.footer-section p {
    margin-bottom: 0.8rem; /* Уменьшаем отступы между параграфами */
    line-height: 1.5;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .footer-section {
        margin-bottom: 2rem;
        height: auto;
    }
    
    .footer-section:nth-child(3) small {
        margin-top: 10px;
    }
}

/* Стили для кликабельных карточек */
.feature-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.3s ease;
}

.feature-item-link:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

.feature-item-link:hover .feature-item {
    box-shadow: var(--shadow-large);
    border-color: var(--rust-color);
}

.feature-item {
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-item-link .feature-item:hover {
    background: linear-gradient(145deg, var(--card-bg), var(--metal-light));
}

/* Стили для страницы поддержки */
.donation-methods {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.donation-item {
    background: linear-gradient(145deg, var(--card-bg), var(--metal-dark));
    border: 1px solid var(--metal-light);
    border-radius: 4px;
    padding: 2rem;
    position: relative;
}

.donation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rust-color), var(--copper-color));
}

.donation-item h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.wallet-address-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0;
}

.wallet-address-container .wallet-address {
    background: rgba(0,0,0,0.3);
    padding: 12px 15px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
    flex: 1;
    border: 1px solid var(--metal-light);
    border-radius: 3px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .donation-methods {
        grid-template-columns: 1fr;
    }
    
    .wallet-address-container {
        flex-direction: column;
        align-items: stretch;
    }
}

.image-title {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 1rem 0 0.5rem 0;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    padding: 0 10px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .image-title {
        font-size: 1.1rem;
        margin: 0.8rem 0 0.3rem 0;
        padding: 0 5px;
        line-height: 1.2;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .image-title {
        font-size: 1rem;
        margin: 0.6rem 0 0.2rem 0;
    }
}

