/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка - ЕДИНЫЙ СТИЛЬ */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #597d89;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: #597d89;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #597d89;
}

/* Хлебные крошки */
.breadcrumbs {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #597d89;
    text-decoration: none;
}

.breadcrumbs span {
    color: #666;
}

/* Герой-секция */
.map-hero {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.map-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.map-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Галерея миров */
.worlds-gallery {
    padding: 4rem 0;
}

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 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;
    cursor: pointer;
    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: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;
    color: #666;
}

.btn-world-info {
    background: #597d89;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
}

.btn-world-info:hover {
    background: #4a6a75;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.world-icon-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.modal-title h2 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.world-type {
    color: #597d89;
    font-weight: 600;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section h4 {
    color: #597d89;
    margin-bottom: 1rem;
    border-left: 3px solid #597d89;
    padding-left: 0.5rem;
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-item {
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid #597d89;
    line-height: 1.4;
}

/* Подвал - ЕДИНЫЙ СТИЛЬ */
.footer {
    background: #2c3e50;
    color: white;
    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;
    text-decoration: none;
}

.footer-nav a:hover {
    color: #ecf0f1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .worlds-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
    }

    .map-hero h1 {
        font-size: 2rem;
    }

    .map-subtitle {
        font-size: 1rem;
    }

    .footer .container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-nav {
        justify-content: center;
    }
}