/* ===== БАЗОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ВСЕЛЕННОЙ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #333;
    background-color: #c8e4ed;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== ТИПОГРАФИЯ ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    color: #597d89;
}

h3 {
    font-size: 1.8rem;
}

h4 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: #597d89;
    transition: color 0.3s ease;
}

a:hover {
    color: #4a6a75;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #597d89;
    color: white;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #4a6a75;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ===== ШАПКА САЙТА ===== */
.header {
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #597d89;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    font-weight: 600;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: #4a6a75;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #597d89;
}

/* ===== ПОДВАЛ САЙТА ===== */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 2rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: #bdc3c7;
}

.footer-nav a:hover {
    color: #ecf0f1;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 1rem 0;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.breadcrumbs a {
    color: #597d89;
}

.breadcrumbs span {
    color: #666;
}

/* ===== ОСНОВНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ВСЕЛЕННОЙ ===== */
.universe-page {
    padding-top: 2rem;
}

/* Герой-секция вселенной */
.universe-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.universe-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0.3;
}

.universe-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
}

.universe-subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.universe-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    position: relative;
}

.universe-stat {
    text-align: center;
    position: relative;
    padding: 0 1rem;
}

.universe-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 30px;
    background: rgba(255,255,255,0.3);
}

.universe-stat:first-child::before {
    display: none;
}

.universe-stat .number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.universe-stat .label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Навигация по вселенной */
.universe-navigation {
    background: #2c3e50;
    padding: 1.5rem 0;
    position: static;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.universe-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.universe-nav-link {
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.universe-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.universe-nav-link:hover::before {
    left: 100%;
}

.universe-nav-link:hover,
.universe-nav-link.active {
    background: #597d89;
    transform: translateY(-2px);
}

/* Заголовки разделов */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== СЕКЦИЯ СЕРИЙ РОМАНОВ ===== */
.series-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.series-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.series-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #597d89, #4a6a75);
    border-radius: 4px 4px 0 0;
}

.series-card:hover {
    transform: translateY(-10px);
}

.series-icon {
    font-size: 2.5rem;
    color: #597d89;
    margin-bottom: 1.5rem;
    text-align: center;
}

.series-card h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.series-books {
    text-align: center;
    margin-bottom: 1.5rem;
}

.series-books span {
    background: #f8f9fa;
    padding: 0.3rem 1rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #597d89;
    font-weight: 600;
}

.series-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

.books-list {
    margin-top: 1.5rem;
}

.books-list h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: #597d89;
}

.books-list ul {
    list-style-type: none;
}

.books-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.95rem;
}

.books-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #597d89;
}

/* Метаистория */
.metastory {
    padding: 80px 0;
    background: #f8f9fa;
}

.metastory-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.metastory-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.metastory-points {
    display: grid;
    gap: 1.5rem;
}

.metastory-point {
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #597d89;
    transition: transform 0.3s ease;
}

.metastory-point:hover {
    transform: translateY(-5px);
}

.metastory-point h4 {
    color: #597d89;
    margin-bottom: 0.8rem;
}

.metastory-point p {
    margin-bottom: 0;
    font-size: 1rem;
}

/* Космограмма */
.cosmogram {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    margin-top: 2rem;
}

.cosmogram-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: #597d89;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 30px rgba(89, 125, 137, 0.3);
}

.cosmogram-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: rotate 20s linear infinite;
}

.cosmogram-item {
    position: absolute;
    width: 80px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    animation: float 3s ease-in-out infinite;
}

.cosmogram-item:nth-child(1) { 
    top: 20px; 
    left: 110px; 
    animation-delay: 0s;
}
.cosmogram-item:nth-child(2) { 
    top: 60px; 
    right: 30px; 
    animation-delay: 0.5s;
}
.cosmogram-item:nth-child(3) { 
    bottom: 20px; 
    left: 110px; 
    animation-delay: 1s;
}
.cosmogram-item:nth-child(4) { 
    top: 110px; 
    left: 20px; 
    animation-delay: 1.5s;
}
.cosmogram-item:nth-child(5) { 
    top: 40px; 
    right: 40px; 
    animation-delay: 2s;
}
.cosmogram-item:nth-child(6) { 
    bottom: 40px; 
    right: 40px; 
    animation-delay: 2.5s;
}
.cosmogram-item:nth-child(7) { 
    bottom: 40px; 
    left: 40px; 
    animation-delay: 3s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.connection-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.connection-type {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.connection-type:hover {
    transform: translateY(-5px);
}

.connection-type h4 {
    color: #597d89;
    margin-bottom: 1rem;
}

.connection-type ul {
    list-style-type: none;
    flex-grow: 1;
}

.connection-type li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.connection-type li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #597d89;
}

/* Хронология вселенной */
.universe-timeline {
    padding: 80px 0;
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-era {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-left: 5px solid #597d89;
    position: relative;
    margin-left: 40px;
}

.timeline-era::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #597d89;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #597d89;
}

.timeline-era::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #597d89;
}

.era-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.era-header h3 {
    margin-bottom: 0;
    color: #597d89;
}

.era-years {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    color: #666;
}

.era-books {
    display: grid;
    gap: 1.5rem;
}

.timeline-book {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.book-marker {
    width: 20px;
    height: 20px;
    background: #597d89;
    border-radius: 50%;
    margin-top: 0.3rem;
}

.book-info h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.book-year {
    color: #597d89;
    font-weight: 600;
    margin-right: 1rem;
}

.book-info p {
    margin: 0.5rem 0 0 0;
    color: #666;
    font-style: italic;
}

/* Миры вселенной */
.universe-worlds {
    padding: 80px 0;
    background: #f8f9fa;
}

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.world-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.world-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #597d89, #4a6a75);
    border-radius: 4px 4px 0 0;
}

.world-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 50px 50px;
    border-color: transparent transparent #597d89 transparent;
    opacity: 0.1;
}

.world-card:hover {
    transform: translateY(-10px);
}

.world-icon {
    font-size: 3rem;
    color: #597d89;
    margin-bottom: 1.5rem;
}

.world-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.world-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.world-books {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Персонажи */
.universe-characters {
    padding: 80px 0;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.character-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.character-card:hover {
    transform: translateY(-5px);
}

.character-image {
    height: 250px;
    overflow: hidden;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.character-card:hover .character-image img {
    transform: scale(1.05);
}

.character-info {
    padding: 2rem;
}

.character-info h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.character-role {
    color: #597d89;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.character-info p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.character-books {
    font-size: 0.9rem;
    color: #666;
}

.characters-cta {
    text-align: center;
}

/* Философские основы */
.universe-philosophy {
    padding: 80px 0;
    background: #f8f9fa;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.philosophy-concept {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.philosophy-concept:hover {
    transform: translateY(-5px);
}

.philosophy-concept h3 {
    color: #597d89;
    margin-bottom: 1rem;
}

.philosophy-concept p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.concept-books {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* Зона для фанатов */
.fan-zone {
    padding: 80px 0;
}

.fan-materials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.fan-material {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.fan-material:hover {
    transform: translateY(-5px);
}

.fan-material i {
    font-size: 3rem;
    color: #597d89;
    margin-bottom: 1.5rem;
}

.fan-material h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.fan-material p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.4rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .metastory-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .cosmogram {
        order: -1;
    }
    
    .series-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .universe-navigation {
        position: static;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .universe-hero h1 {
        font-size: 2.5rem;
    }
    
    .universe-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .universe-stat::before {
        display: none;
    }
    
    .universe-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .era-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .timeline-era {
        margin-left: 20px;
    }
    
    .timeline-era::before {
        left: -30px;
    }
    
    .timeline-era::after {
        left: -20px;
    }
    
    .timeline-book {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .book-marker {
        margin: 0 auto;
    }
    
    .characters-grid,
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .series-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .container {
        width: 100%;
        padding: 0 20px;
    }
    
    .universe-hero h1 {
        font-size: 2rem;
    }
    
    .universe-subtitle {
        font-size: 1.1rem;
    }
    
    .worlds-grid {
        grid-template-columns: 1fr;
    }
    
    .fan-materials {
        grid-template-columns: 1fr;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-nav {
        justify-content: center;
    }
    
    .series-card {
        padding: 2rem 1.5rem;
    }
}

/* ===== АНИМАЦИИ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ ===== */
.metastory-content,
.timeline-era,
.world-card,
.character-card,
.philosophy-concept,
.fan-material,
.series-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.metastory-content.visible,
.timeline-era.visible,
.world-card.visible,
.character-card.visible,
.philosophy-concept.visible,
.fan-material.visible,
.series-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.fa-crystal-ball:before {
    content: "🔮";
    font-style: normal;
}

/* Или если хотите использовать Font Awesome классы, добавьте: */
.fa-crystal-ball:before {
    content: "\f6e8";
}