/* --- ОБЩИЕ ПЕРЕМЕННЫЕ --- */
:root {
    --bg-sand: #f5f0e6;
    --bg-paper: #fcfaf5;
    --text-main: #2b3238;
    --text-muted: #5e6b73;
    --accent-sea: #2a7f8f;
    --accent-sand: #c29a5b;
    --accent-red: #b33939;
    --border-color: #dcd3c0;
    --support-gold: #d4af37;
    --shop-green: #27ae60;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-sand);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
}

h1, h2, h3, h4, .serif { font-family: 'Cormorant Garamond', serif; font-weight: 600; }
.cinzel { font-family: 'Cinzel', serif; }

/* --- КНОПКИ --- */
.btn { display: inline-block; padding: 14px 35px; background-color: var(--accent-sea); color: white; text-decoration: none; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; border-radius: 2px; transition: all 0.3s; border: 2px solid var(--accent-sea); cursor: pointer; text-align: center; }
.btn:hover { background-color: transparent; color: var(--accent-sea); }
.btn-red { background-color: var(--accent-red); border-color: var(--accent-red); }
.btn-red:hover { background-color: transparent; color: var(--accent-red); }
.btn-green { background-color: var(--shop-green); border-color: var(--shop-green); color: white; }
.btn-green:hover { background-color: transparent; color: var(--shop-green); }

/* --- КНОПКА "НАВЕРХ" --- */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-paper);
    border: 2px solid var(--accent-sea);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-to-top:hover { background: var(--accent-sea); transform: scale(1.1); }
.scroll-to-top svg { width: 24px; height: 24px; fill: var(--accent-sea); transition: fill 0.3s; }
.scroll-to-top:hover svg { fill: white; }

/* --- ШАПКА --- */
header { 
    position: fixed; top: 0; left: 0; right: 0; 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 20px 5%; 
    background: rgba(245, 240, 230, 0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    z-index: 1000; 
    border-bottom: 1px solid rgba(194, 154, 91, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.logo { font-family: 'Cinzel', serif; font-size: 24px; font-weight: 700; color: var(--accent-sea); letter-spacing: 3px; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: color 0.3s; }
.logo:hover { color: var(--accent-red); }

.nav-right { display: flex; align-items: center; gap: 25px; }
nav { display: flex; gap: 25px; }

nav a { color: var(--text-main); text-decoration: none; font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 500; position: relative; padding-bottom: 5px; transition: color 0.3s; }

nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 2px; background-color: var(--support-gold); transition: width 0.3s ease; }
nav a:hover { color: var(--accent-sea); }
nav a:hover::after { width: 100%; }

nav a.support-link { color: var(--accent-red); font-weight: 700; padding-bottom: 5px; border: none; border-radius: 0; background: transparent; }
nav a.support-link::after { display: block; background-color: var(--accent-sand); height: 2px; bottom: 0; left: 0; width: 0%; position: absolute; transition: width 0.3s ease; }
nav a.support-link:hover { background: transparent; color: var(--accent-sea); box-shadow: none; }
nav a.support-link:hover::after { width: 100%; }

/* Переключатель языков */
.lang-switch { display: flex; background: rgba(255, 255, 255, 0.5); border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; cursor: pointer; font-size: 12px; font-weight: 600; backdrop-filter: blur(5px); }
.lang-switch div { padding: 6px 14px; transition: all 0.3s; }
.lang-switch div.active { background-color: var(--accent-sea); color: white; }
.lang-switch div:not(.active):hover { background-color: rgba(255, 255, 255, 0.8); }

/* --- КНОПКА ПЕРЕКЛЮЧЕНИЯ ТЕМЫ --- */
.theme-toggle {
    background: var(--bg-paper);
    border: 1px solid var(--accent-sand);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
    color: var(--text-main);
    flex-shrink: 0;
}
.theme-toggle:hover { background: var(--accent-sand); color: white; }

/* --- ГЛАВНЫЙ ЭКРАН --- */
.hero { padding: 150px 10% 100px; display: flex; align-items: center; justify-content: space-between; gap: 50px; position: relative; background: linear-gradient(to right, rgba(245,240,230,0.9) 0%, rgba(245,240,230,0.7) 50%, rgba(245,240,230,0.9) 100%), url('images/hero-bg.jpg') center/cover; }
.hero-text { flex: 1; max-width: 600px; }
.hero-subtitle { font-size: 22px; color: var(--accent-sea); margin-bottom: 10px; font-family: 'Cormorant Garamond', serif; font-style: italic; }
.hero h1 { font-size: 80px; color: var(--text-main); letter-spacing: 3px; margin-bottom: 10px; line-height: 1.1; text-shadow: 2px 2px 0px rgba(255,255,255,0.5); }
.hero h2 { font-size: 32px; color: var(--accent-red); font-weight: 400; margin-bottom: 25px; }
.hero p { font-size: 17px; color: var(--text-muted); margin-bottom: 40px; }

/* --- ТРИ КАРТИНКИ В СТОЛБИК --- */
.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; padding: 20px 0; }
.hero-image-grid { display: grid; grid-template-columns: 1fr; gap: 30px; width: 100%; max-width: 500px; margin: 0 auto; }
.hero-grid-img { width: 100%; height: 360px; object-fit: cover; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.25); border: 6px solid var(--bg-paper); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hero-grid-img:hover { transform: scale(1.03); box-shadow: 0 15px 35px rgba(0,0,0,0.35); }

/* --- СЕКЦИИ --- */
section { padding: 100px 10%; scroll-margin-top: 100px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 46px; color: var(--accent-sea); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 15px; }
.section-header p { font-size: 18px; color: var(--text-muted); font-style: italic; }

/* --- КНИГИ --- */
.books-section { border: none; background-color: #eee9df; box-shadow: inset 0 20px 30px -30px rgba(0,0,0,0.1), inset 0 -20px 30px -30px rgba(0,0,0,0.1); }
.books-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; max-width: 1100px; margin: 0 auto; }
.book-card { background: var(--bg-paper); border: 1px solid var(--border-color); border-radius: 4px; padding: 30px 20px; text-align: center; transition: box-shadow 0.3s; width: 300px; display: flex; flex-direction: column; }
.book-card:hover { box-shadow: 0 15px 30px rgba(43, 50, 56, 0.1); }
.book-cover { width: 100%; max-width: 220px; height: auto; border-radius: 2px; box-shadow: 5px 5px 15px rgba(0,0,0,0.1); margin-bottom: 25px; align-self: center; }
.book-card h3 { font-size: 26px; color: var(--text-main); margin-bottom: 10px; }
.book-status { display: inline-block; padding: 3px 10px; background-color: rgba(179, 57, 57, 0.1); color: var(--accent-red); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; border-radius: 2px; margin-bottom: 15px; font-weight: 600; align-self: center; }
.book-status.coming { background-color: rgba(42, 127, 143, 0.1); color: var(--accent-sea); }
.book-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 25px; flex-grow: 1; }
.placeholder-cover { width: 100%; max-width: 220px; height: 330px; background: var(--bg-sand); border: 2px dashed var(--border-color); display: flex; align-items: center; justify-content: center; margin: 0 auto 25px; border-radius: 2px; color: var(--text-muted); font-style: italic; }

/* --- Кнопка "Вся вселенная" --- */
.universe-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 42px;
    background: transparent;
    border: 2px solid var(--support-gold);
    color: var(--support-gold);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
}
.universe-btn::before { content: ''; position: absolute; inset: 0; background: var(--support-gold); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; z-index: 0; }
.universe-btn:hover::before { transform: scaleX(1); }
.universe-btn:hover { color: #1a2f3a; border-color: var(--support-gold); transform: translateY(-2px); }
.universe-btn > * { position: relative; z-index: 1; }
.universe-btn-icon { font-size: 18px; transition: transform 0.4s ease; }
.universe-btn:hover .universe-btn-icon { transform: rotate(-12deg) scale(1.15); }
.universe-btn-arrow { font-size: 16px; transition: transform 0.4s ease; }
.universe-btn:hover .universe-btn-arrow { transform: translateX(4px); }

/* --- МАГАЗИН --- */
.store-section { background-color: var(--bg-paper); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.store-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1100px; margin: 0 auto; }
.store-card { background: var(--bg-sand); border: 1px solid var(--border-color); border-radius: 8px; padding: 30px; text-align: center; transition: transform 0.3s; position: relative; overflow: hidden; }
.store-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.store-badge { position: absolute; top: 15px; right: -30px; background: var(--accent-red); color: white; padding: 5px 40px; transform: rotate(45deg); font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.store-icon { font-size: 40px; margin-bottom: 15px; display: block; }
.store-card h4 { font-size: 22px; color: var(--text-main); margin-bottom: 10px; }
.store-card p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; min-height: 60px; }
.store-price { font-size: 24px; font-weight: 700; color: var(--accent-sea); margin-bottom: 20px; display: block; }

/* --- ОТЗЫВЫ --- */
.reviews-container { display: flex; gap: 50px; max-width: 1100px; margin: 0 auto; align-items: flex-start; }
.review-form-wrapper { flex: 1; background: var(--bg-paper); padding: 40px; border-radius: 8px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.05); position: sticky; top: 100px; }
.review-form-wrapper h3 { font-size: 28px; color: var(--accent-sea); margin-bottom: 10px; }
.review-form-wrapper p { color: var(--text-muted); font-size: 15px; margin-bottom: 25px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--text-main); }
.form-group input, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 4px; font-family: 'Montserrat', sans-serif; font-size: 14px; background: var(--bg-sand); transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-sea); }
.form-group textarea { resize: vertical; }
.reviews-list { flex: 1.2; display: flex; flex-direction: column; gap: 20px; }
.review-card { background: var(--bg-paper); padding: 25px; border-radius: 8px; border-left: 4px solid var(--accent-sand); position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.03); transition: transform 0.3s; }
.review-card:hover { transform: translateX(-5px); }
.review-card::before { content: '“'; font-family: 'Cormorant Garamond', serif; font-size: 60px; color: rgba(42, 127, 143, 0.15); position: absolute; top: 0; left: 15px; }
.review-text { font-size: 16px; font-style: italic; color: var(--text-main); margin-bottom: 20px; position: relative; z-index: 1; }
.review-author { display: flex; align-items: center; gap: 15px; }
.review-author img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-sea); }
.review-author div span { display: block; font-size: 15px; font-weight: 600; color: var(--accent-sea); }
.review-author div small { display: block; font-size: 12px; color: var(--text-muted); }

/* --- АВТОР --- */
.author-section { background-color: var(--bg-paper); }
.author-container { display: flex; align-items: center; gap: 60px; max-width: 1100px; margin: 0 auto; }
.author-image-wrapper { flex: 0 0 300px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.author-image { width: 100%; height: 400px; border-radius: 4px; box-shadow: 15px 15px 0px rgba(42, 127, 143, 0.2); border: 5px solid var(--bg-paper); overflow: hidden; }
.btn-vk { width: 100%; padding: 10px 20px; font-size: 12px; }
.author-text { flex: 1; }
.author-text h2 { font-size: 42px; color: var(--accent-sea); margin-bottom: 20px; }
.author-text p { font-size: 17px; color: var(--text-muted); margin-bottom: 20px; }
.quote { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-style: italic; color: var(--text-main); border-left: 3px solid var(--accent-sand); padding-left: 20px; margin: 30px 0; }

/* --- ПОДДЕРЖАТЬ --- */
.support-section { background-color: #1a2f3a; color: #f5f0e6; text-align: center; border-top: 5px solid var(--support-gold); }
.support-section .section-header h2 { color: var(--support-gold); }
.support-section .section-header p { color: #a0b2c6; }
.support-container { max-width: 800px; margin: 0 auto; background: rgba(255,255,255,0.05); padding: 40px; border-radius: 8px; border: 1px solid rgba(212, 175, 55, 0.3); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.support-container h3 { font-size: 28px; color: var(--support-gold); margin-bottom: 15px; font-family: 'Cormorant Garamond', serif; }
.support-container > p { font-size: 16px; color: #c0c8d0; margin-bottom: 30px; line-height: 1.6; }

.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 800px; margin: 0 auto; }
.support-card { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); text-align: left; transition: transform 0.3s, border-color 0.3s; width: 100%; display: flex; flex-direction: column; }
.support-card:hover { transform: translateY(-5px); border-color: var(--support-gold); }
.support-card h4 { color: var(--support-gold); font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.support-card p { font-size: 14px; color: #a0b2c6; margin-bottom: 15px; flex-grow: 1; }

.copy-box { display: flex; align-items: center; justify-content: space-between; background: #06121a; padding: 10px 15px; border-radius: 4px; border: 1px dashed rgba(255,255,255,0.2); cursor: pointer; transition: background 0.3s; position: relative; }
.copy-box:hover { background: #0e2130; }
.copy-box span { font-family: monospace; font-size: 15px; color: #fff; letter-spacing: 1px; }
.copy-box button { background: var(--support-gold); color: #000; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-weight: bold; font-size: 12px; transition: background 0.3s; }
.copy-box button:hover { background: #fff; }
.copy-tooltip { position: absolute; top: -25px; right: 0; background: #27ae60; color: white; padding: 2px 8px; border-radius: 4px; font-size: 11px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.copy-tooltip.show { opacity: 1; }

.support-link-btn { display: inline-block; width: 100%; text-align: center; background: transparent; color: var(--support-gold); border: 1px solid var(--support-gold); padding: 10px; border-radius: 4px; text-decoration: none; font-size: 14px; font-weight: 600; transition: all 0.3s; margin-top: auto; }
.support-link-btn:hover { background: var(--support-gold); color: #000; }

/* --- ПОДВАЛ --- */
footer { background-color: #e8e2d5; padding: 40px 20px; text-align: center; border-top: 1px solid var(--border-color); }
footer p { color: var(--text-muted); font-size: 14px; margin-bottom: 10px; }
footer a { color: var(--accent-sea); text-decoration: none; font-weight: 600; }

/* ========================================= */
/* --- ПАНЕЛЬ ИНСТРУМЕНТОВ ЧИТАЛКИ --- */
/* ========================================= */
.floating-controls {
    position: sticky;
    top: 60px;
    z-index: 3000;
    width: 100%;
    background: rgba(252, 250, 245, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: background-color 0.4s, border-color 0.4s;
}

.floating-controls .left-zone { display: flex; align-items: center; min-width: 0; flex: 1 1 auto; }
.floating-controls .right-zone { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.chapter-progress-label { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 600; color: var(--accent-sea); letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }

.floating-controls .tool-btn { background: transparent; border: 1px solid transparent; padding: 7px 12px; border-radius: 18px; cursor: pointer; font-family: 'Montserrat', sans-serif; font-size: 12.5px; font-weight: 500; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s ease; white-space: nowrap; }
.floating-controls .tool-btn:hover { background: var(--bg-paper); border-color: var(--border-color); color: var(--accent-sea); }

.font-sizer { display: flex; gap: 2px; margin-left: 4px; align-items: center; }
.font-sizer button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--bg-paper); color: var(--text-main); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.font-sizer button:hover { background: var(--accent-sand); color: #fff; border-color: var(--accent-sand); }

/* ========================================= */
/* --- ВЫПАДАЮЩЕЕ МЕНЮ "ПОДЕЛИТЬСЯ" --- */
/* ========================================= */
.btn-share-toggle { background: var(--accent-sea); border-color: var(--accent-sea); color: white; }
.btn-share-toggle:hover { background: transparent; color: var(--accent-sea); }

.share-menu { display: none; justify-content: center; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border-color); animation: fadeIn 0.3s ease; }
.share-menu.active { display: flex; flex-wrap: wrap; }

.share-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 4px; text-decoration: none; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s ease; border: 2px solid transparent; }
.share-vk { background-color: #0077FF; color: white; }
.share-vk:hover { background-color: transparent; color: #0077FF; border-color: #0077FF; }
.share-tg { background-color: #229ED9; color: white; }
.share-tg:hover { background-color: transparent; color: #229ED9; border-color: #229ED9; }
.share-copy { background-color: var(--accent-sand); color: white; }
.share-copy:hover { background-color: transparent; color: var(--accent-sand); border-color: var(--accent-sand); }

body.dark-mode .share-menu { border-top-color: #2a3f4d; }

/* ========================================= */
/* --- ТЁМНАЯ ТЕМА --- */
/* ========================================= */
body.dark-mode {
    --bg-sand: #0b1a26;
    --bg-paper: #112233;
    --text-main: #e0e0e0;
    --text-muted: #8899a6;
    --border-color: #2a3f4d;
    background-image: none;
}

body.dark-mode header { background: rgba(17, 34, 51, 0.95); }
body.dark-mode .logo { color: var(--accent-sand); }
body.dark-mode .logo:hover { color: var(--accent-red); }
body.dark-mode nav a { color: #e0e0e0; }
body.dark-mode nav a:hover { color: var(--accent-sand); }
body.dark-mode .lang-switch { background: #1a2f3a; border-color: #2a3f4d; }
body.dark-mode .lang-switch div { color: var(--accent-sand); }
body.dark-mode .lang-switch div.active { background: var(--accent-sand); color: #0b1a26; }
body.dark-mode .theme-toggle { background: #1a2f3a; border-color: #2a3f4d; color: var(--accent-sand); }
body.dark-mode .hero h1 { color: #e0e0e0; text-shadow: 2px 2px 0 rgba(0,0,0,0.3); }
body.dark-mode .hero h2 { color: var(--accent-sand); }
body.dark-mode .section-header h2 { color: var(--accent-sand); }
body.dark-mode .book-card, body.dark-mode .review-card, body.dark-mode .review-form-wrapper, body.dark-mode .store-card, body.dark-mode .note-card { background: #1a2f3a; border-color: #2a3f4d; }
body.dark-mode .book-card h3, body.dark-mode .review-text, body.dark-mode .note-card h3 { color: #e0e0e0; }
body.dark-mode .form-group input, body.dark-mode .form-group textarea { background: #112233; border-color: #2a3f4d; color: #e0e0e0; }
body.dark-mode .author-section { background: #0e2130; }
body.dark-mode .author-image { box-shadow: 15px 15px 0 rgba(212, 175, 55, 0.15); border-color: #112233; }
body.dark-mode .quote { border-left-color: var(--accent-sand); color: #e0e0e0; }
body.dark-mode footer { background: #0e2130; border-color: #2a3f4d; }
body.dark-mode footer p { color: #8899a6; }
body.dark-mode .universe-section.alt { background-color: #0e2130; }
body.dark-mode .cycle-card { background: #1a2f3a; }
body.dark-mode .roadmap-item h4 { color: #e0e0e0; }
body.dark-mode .universe-quote { background: rgba(42, 127, 143, 0.15); }
body.dark-mode .universe-quote p { color: #e0e0e0; }
body.dark-mode .books-section { background-color: #0e2130; box-shadow: inset 0 20px 30px -30px rgba(0,0,0,0.4), inset 0 -20px 30px -30px rgba(0,0,0,0.4); }
body.dark-mode .hero { background: linear-gradient(to right, rgba(11,26,38,0.95) 0%, rgba(11,26,38,0.85) 50%, rgba(11,26,38,0.95) 100%); }
body.dark-mode .universe-section.paper { background-color: #112233; }
body.dark-mode .universe-hero { background: linear-gradient(to bottom, rgba(11,26,38,0.95), rgba(11,26,38,0.9)), url('https://images.unsplash.com/photo-1505118380757-91f5f5632de0?auto=format&fit=crop&w=1920&q=80') center/cover; }
body.dark-mode .floating-controls { background: rgba(17, 34, 51, 0.97); border-bottom-color: #2a3f4d; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
body.dark-mode .chapter-progress-label { color: var(--accent-sand); }
body.dark-mode .floating-controls .tool-btn { color: #8899a6; }
body.dark-mode .floating-controls .tool-btn:hover { background: #1a2f3a; border-color: #2a3f4d; color: var(--accent-sand); }
body.dark-mode .font-sizer button { background: #1a2f3a; border-color: #2a3f4d; color: var(--accent-sand); }
body.dark-mode .font-sizer button:hover { background: var(--accent-sand); color: #0b1a26; border-color: var(--accent-sand); }

/* ========================================= */
/* --- АДАПТИВНОСТЬ --- */
/* ========================================= */
@media (max-width: 992px) {
    .hero { flex-direction: column-reverse; text-align: center; padding: 120px 5% 60px; }
    .hero h1 { font-size: 60px; }
    .author-container { flex-direction: column; text-align: center; }
    .author-image-wrapper { width: 100%; max-width: 300px; margin: 0 auto; }
    .author-image { box-shadow: none; border: none; height: 350px; }
    .quote { border-left: none; padding-left: 0; }
    .nav-right { gap: 10px; }
    nav { gap: 10px; }
    .reviews-container { flex-direction: column; }
    .review-form-wrapper { position: static; width: 100%; }
    .reviews-list { width: 100%; }
}

@media (max-width: 768px) {
    header { padding: 15px 5%; }
    .burger { display: flex; z-index: 1001; }
    nav { position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-paper); flex-direction: column; align-items: center; padding: 20px 0; border-bottom: 2px solid var(--accent-sand); display: none; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    nav.active { display: flex; }
    nav a { margin: 10px 0; font-size: 15px; }
    .hero h1 { font-size: 42px; letter-spacing: 1px; }
    .hero h2 { font-size: 24px; }
    .hero p { font-size: 15px; }
    .btn { display: block; width: 100%; margin-bottom: 10px; text-align: center; }
    section { padding: 60px 5%; scroll-margin-top: 80px; }
    .section-header h2 { font-size: 32px; }
    .support-container { padding: 20px; }
    .support-grid { grid-template-columns: 1fr; }
    .support-card { padding: 18px; }
    .store-container { grid-template-columns: 1fr; }
    .hero-image-grid { gap: 20px; max-width: 320px; }
    .hero-grid-img { height: 220px; border-width: 4px; }
    .scroll-to-top { width: 40px; height: 40px; bottom: 15px; right: 15px; }
    .scroll-to-top svg { width: 18px; height: 18px; }
    .theme-toggle { width: 30px; height: 30px; font-size: 14px; }
    .universe-btn { padding: 14px 28px; font-size: 12px; letter-spacing: 1.5px; }

    .floating-controls { top: 52px; padding: 8px 12px; gap: 8px; }
    .chapter-progress-label { font-size: 11px; letter-spacing: 0; }
    .floating-controls .tool-btn { padding: 7px 9px; font-size: 12px; gap: 0; }
    .floating-controls .tool-btn span { display: none; }
    .font-sizer { margin-left: 2px; }
    .font-sizer button { width: 28px; height: 28px; font-size: 11px; }

    .share-buttons { flex-direction: column; align-items: center; }
    .share-btn { width: 100%; max-width: 300px; }
}