/* ===== БАЗОВЫЕ СТИЛИ И ПЕРЕМЕННЫЕ ===== */
:root {
    /* Основные цвета */
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --primary-light: rgba(52, 152, 219, 0.1);
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* Фоны */
    --bg-color: #f9f9f9;
    --card-bg: white;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    
    /* Текст */
    --text-color: #333;
    --text-light: #7f8c8d;
    
    /* Границы и тени */
    --border-color: #ddd;
    --hover-color: rgba(52, 152, 219, 0.05);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.08);
    
    /* Темная тема по умолчанию (затем будет переопределена) */
    --dark-bg-color: #1a1a2e;
    --dark-card-bg: #16213e;
    --dark-text-color: #e6e6e6;
    --dark-text-light: #a0a0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Темная тема */
body.dark-mode {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #e6e6e6;
    --text-light: #a0a0a0;
    --light-color: #2d3748;
    --border-color: #374151;
    --hover-color: rgba(255, 255, 255, 0.05);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
}

/* ===== ТИПОГРАФИЯ ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

body.dark-mode h2 {
    color: var(--light-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

body.dark-mode h3 {
    color: var(--text-color);
}

h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* ===== ШАПКА САЙТА ===== */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.sun-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.author {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.8;
}

/* ===== НАВИГАЦИЯ ===== */
nav {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🌱';
    font-size: 1.2rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a i {
    font-size: 1.1rem;
}

.nav-links a:hover {
    background-color: var(--hover-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-links a.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background-color: var(--hover-color);
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

h2 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ===== СИНОПСИС ===== */
.synopsis {
    background: linear-gradient(135deg, var(--light-color), color-mix(in srgb, var(--light-color) 80%, transparent));
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
}

.synopsis p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.synopsis strong {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* ===== АККОРДЕОНЫ ===== */
.accordion, .situation, .principle-accordion {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    background-color: var(--card-bg);
}

.accordion:hover, .situation:hover, .principle-accordion:hover {
    border-color: var(--primary-color);
}

.accordion-title, .situation-title, .principle-title {
    background-color: var(--light-color);
    padding: 1.3rem 1.8rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    user-select: none;
    list-style: none;
}

.accordion-title:hover, .situation-title:hover, .principle-title:hover {
    background-color: var(--primary-color);
    color: white;
}

.accordion-title i, .principle-title i, .situation-title i {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.accordion[open] .accordion-title i,
.principle-accordion[open] .principle-title i,
.situation[open] .situation-title i {
    transform: rotate(90deg);
}

.accordion-content, .principle-content, .situation-content {
    padding: 2rem;
    background-color: var(--card-bg);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ СИТУАЦИЙ ===== */

/* Статистика */
.category-stats {
    margin: 20px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Фильтры */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Поиск */
.search-container {
    margin: 25px 0;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 50px;
    padding: 5px 20px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary-color);
}

.search-icon {
    color: var(--text-light);
    margin-right: 10px;
}

#situationSearch {
    flex: 1;
    padding: 15px 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
}

.clear-search {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.clear-search:hover {
    background: var(--hover-color);
    color: var(--primary-color);
}

.search-tips {
    margin-top: 10px;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

/* Стили ситуаций (аккордеоны) */
.situation-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.situation-number {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.situation-name {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.situation-context {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-light);
    background-color: color-mix(in srgb, var(--warning-color) 10%, transparent);
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--warning-color);
}

.blocks-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.block {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.8rem;
    box-shadow: var(--shadow);
    border-top: 5px solid transparent;
    transition: transform 0.3s;
}

.block:hover {
    transform: translateY(-5px);
}

.block-a {
    border-top-color: var(--primary-color);
}

.block-b {
    border-top-color: var(--accent-color);
}

.block-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.block-header h3 {
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.dark-mode .block-header h3 {
    color: var(--text-color);
}

/* Диалоги */
.dialogue {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dialogue-item {
    padding: 1.3rem;
    border-radius: 8px;
    border-left: 5px solid;
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
    background-color: color-mix(in srgb, var(--card-bg) 95%, white);
}

.dialogue-item:nth-child(1) { animation-delay: 0.1s; }
.dialogue-item:nth-child(2) { animation-delay: 0.2s; }
.dialogue-item:nth-child(3) { animation-delay: 0.3s; }
.dialogue-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dialogue-item.reptiloid {
    border-left-color: #FF5722;
    background: linear-gradient(135deg, color-mix(in srgb, #FFF3E0 90%, var(--card-bg)), color-mix(in srgb, #FFE0B2 90%, var(--card-bg)));
}

.dialogue-item.solar {
    border-left-color: #FF9800;
    background: linear-gradient(135deg, color-mix(in srgb, #FFF8E1 90%, var(--card-bg)), color-mix(in srgb, #FFECB3 90%, var(--card-bg)));
}

.dialogue-item.quantum {
    border-left-color: #2196F3;
    background: linear-gradient(135deg, color-mix(in srgb, #E3F2FD 90%, var(--card-bg)), color-mix(in srgb, #BBDEFB 90%, var(--card-bg)));
}

.dialogue-item.galactic {
    border-left-color: #9C27B0;
    background: linear-gradient(135deg, color-mix(in srgb, #F3E5F5 90%, var(--card-bg)), color-mix(in srgb, #E1BEE7 90%, var(--card-bg)));
}

.speaker {
    font-weight: bold;
    margin-bottom: 0.7rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speaker::before {
    content: '🗣️';
    font-size: 0.9rem;
}

.text {
    line-height: 1.7;
    color: var(--text-color);
}

/* Футер ситуации */
.situation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.situation-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--hover-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-situation-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.copy-situation-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.copy-situation-btn.copied {
    background: var(--success-color);
}

/* Кнопка "Показать еще" */
.load-more-container {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.situations-counter {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Нет результатов */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--text-color);
    margin-bottom: 10px;
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    padding: 1rem 2rem;
    background-color: var(--light-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.2);
}

/* ===== СТРАНИЦА ПРИНЦИПОВ ===== */
.gratitude-container {
    margin-top: 2rem;
}

.gratitude-text {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 5px solid var(--success-color);
}

.gratitude-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.gratitude-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-top: 5px solid transparent;
}

.gratitude-card:nth-child(1) { border-top-color: #27ae60; }
.gratitude-card:nth-child(2) { border-top-color: #9b59b6; }
.gratitude-card:nth-child(3) { border-top-color: #3498db; }
.gratitude-card:nth-child(4) { border-top-color: #e67e22; }
.gratitude-card:nth-child(5) { border-top-color: #e74c3c; }
.gratitude-card:nth-child(6) { border-top-color: #1abc9c; }
.gratitude-card:nth-child(7) { border-top-color: #f1c40f; }
.gratitude-card:nth-child(8) { border-top-color: #34495e; }
.gratitude-card:nth-child(9) { border-top-color: #7f8c8d; }

.gratitude-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.gratitude-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.gratitude-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.warning-box {
    background: linear-gradient(135deg, color-mix(in srgb, #FFEBEE 90%, var(--card-bg)), color-mix(in srgb, #FFCDD2 90%, var(--card-bg)));
    border-left: 5px solid var(--danger-color);
    padding: 1.8rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.warning-box h4 {
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.context-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.context-table th {
    background-color: var(--secondary-color);
    color: white;
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
}

.context-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.context-table tr:hover {
    background-color: var(--hover-color);
}

.highlight {
    background: linear-gradient(135deg, color-mix(in srgb, #E8F5E9 90%, var(--card-bg)), color-mix(in srgb, #C8E6C9 90%, var(--card-bg)));
    padding: 1.8rem;
    border-radius: 8px;
    border-left: 5px solid var(--success-color);
    margin: 1.5rem 0;
}

/* ===== ШАГИ И ЭВОЛЮЦИОННЫЙ ПУТЬ ===== */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.step {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.evolution-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin: 2.5rem 0;
}

.evolution-stage {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-top: 5px solid transparent;
}

.evolution-stage:nth-child(1) { border-top-color: #FF5722; }
.evolution-stage:nth-child(2) { border-top-color: #FF9800; }
.evolution-stage:nth-child(3) { border-top-color: #2196F3; }
.evolution-stage:nth-child(4) { border-top-color: #9C27B0; }

.evolution-stage:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.stage-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* ===== ФУТЕР ===== */
footer {
    background: linear-gradient(135deg, var(--secondary-color), var(--dark-color));
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: var(--light-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    margin-left: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.footer-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.footer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #95a5a6;
    width: 100%;
}

/* ===== КНОПКА "НАВЕРХ" ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

/* ===== БЫСТРАЯ НАВИГАЦИЯ ===== */
.section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light-color), color-mix(in srgb, var(--light-color) 80%, transparent));
    border-radius: 10px;
    margin-top: 3rem;
}

.section-nav h3 {
    width: 100%;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.section-nav a {
    padding: 1rem 1.8rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-nav a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.2);
}

/* ===== ЗАГРУЗКА И АНИМАЦИИ ===== */
.loading-message {
    text-align: center;
    padding: 3rem;
    background-color: var(--light-color);
    border-radius: 10px;
    border: 2px dashed var(--border-color);
}

.loading-message p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .blocks-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 1.5rem;
        border-radius: 0 0 10px 10px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .gratitude-grid,
    .steps-container,
    .evolution-container {
        grid-template-columns: 1fr;
    }
    
    .context-table {
        font-size: 0.9rem;
    }
    
    .context-table th,
    .context-table td {
        padding: 0.8rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-btn {
        justify-content: center;
    }
    
    section {
        padding: 1.5rem;
    }
    
    .dialogue-item {
        padding: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters {
        justify-content: center;
    }
    
    .situation-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .header-content {
        gap: 0.8rem;
    }
    
    .sun-icon {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .section-nav a {
        width: 100%;
        justify-content: center;
    }
    
    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* ===== ПЕЧАТЬ ===== */
@media print {
    .nav-links,
    .filters,
    .search-container,
    .pagination,
    .back-to-top,
    .mobile-menu-btn,
    footer,
    .load-more-container,
    .situation-footer,
    .copy-situation-btn {
        display: none !important;
    }
    
    .blocks-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .accordion[open],
    .situation[open],
    .principle-accordion[open] {
        display: block !important;
    }
    
    details > summary {
        list-style: none;
    }
    
    details > summary::-webkit-details-marker {
        display: none;
    }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ ===== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.shadow-sm { box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-hover); }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 50%; }

.bg-light { background-color: var(--light-color); }
.bg-primary { background-color: var(--primary-color); color: white; }
.bg-secondary { background-color: var(--secondary-color); color: white; }
.bg-accent { background-color: var(--accent-color); color: white; }