/* РћСЃРЅРѕРІРЅС‹Рµ СЃС‚РёР»Рё - РјСЏРіРєР°СЏ РѕСЂР°РЅР¶РµРІРѕ-РєСЂР°СЃРЅР°СЏ РіР°РјРјР° */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #FFF5E6;
    color: #5A4A3C;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

section, header, footer {
    margin: 0;
    padding: 0;
}

/* РЁР°РїРєР° */
header {
    text-align: center;
    background-color: #A52A2A;
    color: #FFF5E6;
    padding: 1.5rem 0;
    border-bottom: 3px solid #8B0000;
}

header h1 {
    margin: 0 auto;
    max-width: 800px;
    padding: 0 20px;
    color: #FFF5E6;
    font-weight: bold;
}

.home-button {
    font-style: italic;
    color: #FFF5E6;
    margin: 0 auto;
    max-width: 800px;
    padding: 0 20px;
    opacity: 0.9;
    text-decoration: none;
}

/* РќР°РІРёРіР°С†РёСЏ */
.main-nav {
    margin: 0 auto;
    max-width: 800px;
    padding: 0 20px;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.nav-link {
    padding: 0.8rem 1.5rem;
    background: #B22222;
    color: #FFF !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
}

.nav-link:hover {
    background: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(139, 0, 0, 0.3);
}

/* РљРѕРЅС‚РµРЅС‚ */
.dialogue-container {
    background-color: #FFF; /* Р‘РµР»С‹Р№ С„РѕРЅ */
    padding: 20px; /* РћС‚СЃС‚СѓРїС‹ РІРЅСѓС‚СЂРё РєРѕРЅС‚РµР№РЅРµСЂР° */
    border-radius: 8px; /* Р—Р°РєСЂСѓРіР»РµРЅРЅС‹Рµ СѓРіР»С‹ */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* РўРµРЅСЊ РґР»СЏ РєРѕРЅС‚РµР№РЅРµСЂР° */
    margin: 20px auto; /* Р¦РµРЅС‚СЂРёСЂРѕРІР°РЅРёРµ РєРѕРЅС‚РµР№РЅРµСЂР° Рё РѕС‚СЃС‚СѓРїС‹ */
    max-width: 800px; /* РњР°РєСЃРёРјР°Р»СЊРЅР°СЏ С€РёСЂРёРЅР° РєРѕРЅС‚РµР№РЅРµСЂР° */
}

.dialogue-container h2,
.dialogue-container h3,
.dialogue-container p {
    color: #5A4A3C; /* Р¦РІРµС‚ С‚РµРєСЃС‚Р°, РєР°Рє РЅР° РІР°С€РµР№ СЃС‚СЂР°РЅРёС†Рµ */
    margin: 10px 0; /* РћС‚СЃС‚СѓРїС‹ РґР»СЏ Р·Р°РіРѕР»РѕРІРєРѕРІ Рё РїР°СЂР°РіСЂР°С„РѕРІ */
}

.dialogue-container .dialogue {
    margin: 15px 0;
    padding: 1rem;
    background: #FFF9F0; /* РЎРІРµС‚Р»С‹Р№ С„РѕРЅ РґР»СЏ РґРёР°Р»РѕРіРѕРІ */
    border-radius: 5px;
    transition: all 0.3s ease;
}

.dialogue-container .dialogue:hover {
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(218,165,32,0.15);
}

.dialogue-container .character {
    font-weight: bold;
    color: #2c3e50;
}

.dialogue-container .action {
    font-style: italic;
    color: #7f8c8d;
    margin: 10px 0;
    padding-left: 2.5rem !important;
    position: relative;
}

.dialogue-container .action::before {
    content: "✦";
    color: #DAA520;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Segoe UI Symbol", Arial, sans-serif;
}

/* РџРѕРґРІР°Р» */
footer {
    background-color: #FFDAB9;
    color: #5A4A3C;
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
    border-top: 3px solid #CD853F;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mini-link {
    color: #5A4A3C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mini-link:hover {
    color: #8B0000;
}

.support-link {
    color: #B22222;
}

.support-link:hover {
    color: #8B0000;
}

.divider {
    color: #5A4A3C;
    opacity: 0.5;
}

.legal-info {
    text-align: right;
    font-size: 0.8em;
    color: #5A4A3C;
}

/* РљРЅРѕРїРєР° "Р’РµСЂРЅСѓС‚СЊСЃСЏ РЅР°РІРµСЂС…" */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #B22222;
    color: #FFF5E6;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(139, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: none;
}

#scroll-to-top:hover {
    background-color: #8B0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(139, 0, 0, 0.4);
}

#scroll-to-top:active {
    transform: translateY(0);
}

/* РђРґР°РїС‚РёРІРЅРѕСЃС‚СЊ */
@media (max-width: 768px) {
    .action {
        padding-left: 2rem !important;
    }
    
    .action::before {
        left: 0.7rem;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .card {
        width: 100%;
        margin-bottom: 20px;
    }

    footer {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .contact-block,
    .legal-info {
        text-align: center;
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .home-button {
        font-size: 0.9rem;
    }

    #scroll-to-top {
        bottom: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (min-width: 1200px) {
    .content {
        max-width: 1100px;
        padding: 2rem;
    }
}

/* РћРїС‚РёРјРёР·Р°С†РёРё */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    -webkit-backface-visibility: hidden;
}

/* РђРЅРёРјР°С†РёРё */
.nav-link, .card, .dialogue {
    transition: 
        transform 0.2s ease, 
        background 0.3s ease, 
        box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Р”РѕРїРѕР»РЅРёС‚РµР»СЊРЅС‹Рµ СЃС‚РёР»Рё РґР»СЏ Р°РґР°РїС‚РёРІРЅС‹С… РёР·РѕР±СЂР°Р¶РµРЅРёР№ */
.card img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px 8px 0 0;
}

/* РЎС‚РёР»Рё РґР»СЏ С„СѓС‚РµСЂР° */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mini-link {
    color: #5A4A3C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mini-link:hover {
    color: #8B0000;
}

.support-link {
    color: #B22222;
}

.support-link:hover {
    color: #8B0000;
}

.divider {
    color: #5A4A3C;
    opacity: 0.5;
}
/* Восстановление анимации диалогов */
.dialogue-container .dialogue:hover {
    transform: translateX(5px) !important;
    border-left: 4px solid #DAA520; /* Сохранение акцентной полосы */
}