/* ОБЩИЕ СТИЛИ */
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fcfaf8; /* Очень светлый беж, как книжная бумага */
    line-height: 1.7;
}

/* ЭКРАН ВЫБОРА ЯЗЫКА */
#language-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.lang-box {
    max-width: 500px;
}

.selectlang {
    font-style: italic;
    margin: 30px 0 15px;
    color: #666;
}

.lang-buttons button {
    background: #333;
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 20px;
    font-family: inherit;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 4px;
}

.lang-buttons button:hover {
    background: #c08081; /* При наведении становится розовым */
}

/* ГЛАВНЫЙ КОНТЕНТ */
header {
    padding: 20px;
    text-align: center;
    background: white;
    border-bottom: 1px solid #eee;
}

.logo {
    font-weight: bold;
    letter-spacing: 3px;
    font-size: 1.2rem;
}

.wrapper {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

/* БЛОК С ТЕКСТОМ (Бумага) */
.paper {
    background: white;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

h2#story-title {
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
}

#story-content {
    font-size: 1.1rem;
    margin-bottom: 30px;
    white-space: pre-line; /* Чтобы сохранялись абзацы */
}

.meta {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Выравнивает всех по центру вертикали */
    border-top: 1px solid #eee;
    width: 100%
    padding-top: 20px;
    margin-top: 30px;
}

.action-btn, 
.author-info {
    height: 40px;             /* Единая высота */
    font-size: 0.7rem;
    font-family: 'Georgia', serif;
    display: flex;            /* Чтобы текст внутри тоже центрировался */
    align-items: center;
    justify-content: center;
    margin: 0;                /* Убираем внешние отступы */
    box-sizing: border-box;
}

/* Кнопки: овальные и аккуратные */
.action-btn {
    border: 1px solid #d1d1d1;
    border-radius: 40px;      /* Овальность */
    background: transparent;
    padding: 0 15px;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;      /* Запрет переноса текста внутри кнопки */
}
 .action-btn {
    transition: 0.3s;
}


.action-btn:hover {
    background: #fce4e4; /* Наш светлый розовый */
    border-color: #c08081;
}

.author-info {
    color: #333;
    padding-left: 10px;       /* Небольшой отступ от центральной кнопки */
}

#author-name {
    margin-left: 5px;
}

/* КНОПКА СЛЕДУЮЩАЯ ИСТОРИЯ */
#btn-next {
    display: block;
    width: 200px;
    margin: 40px auto;
    background: none;
    border: 1px solid #333;
    padding: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
    border-radius: 5px;
}

#btn-next:hover {
    background: #333;
    color: white;
}

/* СВЕТЛО-РОЗОВЫЙ КВАДРАТ (Ad Box) */
.ad-box {
    background-color: #fce4e4; /* Нежный светло-розовый */
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 40px;
    aspect-ratio: 1 / 1; /* Квадрат */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    border-radius: 5%;
}

#ad-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    border: 1px solid #333;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    border-radius: 5px;
}

/* КОНТАКТЫ */
.contact-box {
    text-align: center;
    margin-top: 50px;
}

.email-btn {
    color: #c08081;
    font-weight: bold;
    text-decoration: none;
}

.inst-btn {
color: #c08081;
    font-weight: bold;
    text-decoration: none;
}

.btns {
    display: flex;
    flex-direction: column;
}

/* COPYRIGHT ВНИЗУ */
.copyright-notice {
    margin-top: 30px;
    font-size: 0.8rem;
    color: #888;
}

.legal-link {
    color: #888;
    text-decoration: underline;
}

/* МОДАЛЬНОЕ ОКНО (Mentions Légales) */
.modal-overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
}

.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
}

.modal-title { margin-top: 0; }
.modal-text h3 { font-size: 1rem; margin-top: 20px; border-bottom: 1px solid #eee; }
.modal-text p { font-size: 0.9rem; }

.modal-btn-close {
    width: 100%;
    margin-top: 25px;
    padding: 10px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
}

/* Стили для активной (лайкнутой) кнопки "J'aime" */
.action-btn.liked {
    background-color: #fce4e4; /* Наш светло-розовый */
    border-color: #c08081;     /* Цвет пыльной розы */
    color: #c08081;
}

/* Стили для контейнера сердечек */
#heart-container {
    position: absolute; /* Будет летать над всем */
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы не блокировал клики */
    overflow: hidden; /* Чтобы сердечки не вылетали за границы */
    top: 0;
    left: 0;
}

/* Стили для самих сердечек */
.heart {
    position: absolute;
    font-size: 1.5rem; /* Размер сердечка */
    color: #c08081; /* Цвет пыльной розы */
    animation: fly-up 2s forwards ease-out; /* Анимация полета */
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* Анимация полета сердечка */
@keyframes fly-up {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    30% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
    100% {
        transform: translateY(-100px) scale(1.2); /* Летят выше */
        opacity: 0;
    }
}
@media (max-width: 600px) {
    .meta {
        /* Кнопки остаются в ряд по краям или в центре */
        justify-content: space-around; 
        gap: 10px;
    }

    .author-info {
        /* Занимает 100% ширины, поэтому падает на вторую строку */
        width: 100%; 
        order: 2; /* Принудительно ставим вниз */
        margin-top: 10px;
        padding-left: 0;
    }
    
    #like-btn { order: 1; }
    #read-more-btn { order: 1; }
}
