@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Playfair+Display:wght@700;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Lora', serif;
    background: #05070a;
    color: #fff;
    overflow-x: hidden;
}

/* КОСМИЧЕСКИЙ ФОН СО ЗВЕЗДАМИ */
.space-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1b2735 0%, #05070a 100%);
}
.space-bg::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(white, rgba(255,255,255,0.2) 1px, transparent 40px);
    background-size: 100px 100px;
    animation: stars 100s linear infinite;
}
@keyframes stars { from { background-position: 0 0; } to { background-position: 1000px 1000px; } }

/* ШАПКА КАК НА ФОТО */
.navbar {
    display: flex; justify-content: space-between; padding: 20px 10%;
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px);
}
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: #aaa; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: #8a96ff; }

/* БЕЖЕВАЯ КАРТОЧКА (ТОЧЬ-В-ТОЧЬ КАК НА МАКЕТЕ) */
.content-card {
    max-width: 900px; margin: 40px auto; padding: 50px;
    background: #fdf5f0; color: #1a1a1a; 
    border-radius: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    position: relative; border: 1px solid rgba(0,0,0,0.05);
}

/* ЗАГОЛОВКИ И ТЕКСТ */
.main-title { font-family: 'Playfair Display', serif; font-size: 52px; text-align: center; margin-bottom: 10px; }
.subtitle { text-align: center; color: #666; margin-bottom: 40px; font-size: 18px; }

/* КНОПКА "ВЕРНУТЬСЯ" */
.btn-back {
    display: inline-flex; align-items: center; padding: 12px 25px;
    background: #3f51b5; color: #fff; text-decoration: none;
    border-radius: 50px; font-weight: bold; margin-bottom: 20px; transition: 0.3s;
}
.btn-back:hover { transform: scale(1.05); background: #303f9f; }

.tree-page-content {
    padding: 40px 10%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-main-frame {
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.tree-img {
    width: 100%;
    border-radius: 40px;
    display: block;
}

/* ТОТ САМЫЙ ЕДИНЫЙ БЕЛЫЙ БЛОК */
.tree-description-block {
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 1100px;
    padding: 50px;
    border-radius: 50px;
    color: #1a1a1a;
    text-align: left; /* Текст выровнен по левому краю, как в книгах */
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.text-group {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.text-group h3 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 10px;
    color: #2c2c54;
}

.text-group p {
    font-size: 19px;
    line-height: 1.6;
}

.text-group-footer {
    margin-top: 30px;
    font-style: italic;
    font-weight: bold;
    color: #555;
    text-align: center;
}
/* СЕТКА ДЛЯ СТРАНИЦЫ "МОЯ СЕМЬЯ" */
.family-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; margin-top: 30px;
}
.member-card {
    background: #fff; padding: 20px; border-radius: 30px; text-align: center;
    border: 2px solid #eee; transition: 0.3s;
}
.member-card:hover { border-color: #3f51b5; transform: translateY(-5px); }