/* --- ОСНОВНЫЕ НАСТРОЙКИ --- */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #000;
    --gray-color: #888;
    --font-main: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: var(--font-main);
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }

/* --- ШАПКА --- */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 60px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #eee;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.header-wrapper {
    width: 100%; max-width: 700px; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.site-title { font-weight: 600; font-size: 1rem; }
.lang-toggle .toggle-btn { font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.lang-toggle span { color: #ccc; }

/* --- КОНТЕНТ --- */
.page-content {
    padding-top: 100px;
    max-width: 700px;
    margin: 0 auto;
    padding-bottom: 60px;
    padding-left: 20px; padding-right: 20px;
}

/* --- КАРТОЧКА СТАТЬИ --- */
.post-card { 
    margin-bottom: 60px; 
    /* Нет рамок и линий, полный минимализм */
}

/* Опционально: если хочешь чуть выделить закрепленную статью */
.pinned-highlight { border-bottom: 1px solid #000; padding-bottom: 40px; margin-bottom: 60px; }

.post-image {
    width: 100%; height: 280px; 
    background-size: cover; background-position: center;
    border-radius: 8px; margin-bottom: 20px;
}

.post-content h3 { margin: 0 0 8px 0; font-size: 1.6rem; letter-spacing: -0.02em; }
.post-date-line { font-size: 0.8rem; color: #999; margin-bottom: 12px; }
.post-excerpt { margin-top: 0; margin-bottom: 15px; color: #444; }
.post-meta { font-size: 0.85rem; color: var(--gray-color); display: flex; gap: 15px; }

/* --- СТРАНИЦА СТАТЬИ --- */
.post-header { margin-bottom: 30px; text-align: left; }
.post-title { font-size: 2.2rem; line-height: 1.2; margin-bottom: 10px; margin-top: 0; letter-spacing: -0.03em;}
.post-date-single { color: #999; font-size: 0.9rem; margin-bottom: 25px; }

.main-post-image { 
    width: 100%; height: auto; 
    border-radius: 8px; margin-bottom: 30px; 
    display: block; 
}

.post-content-body { 
    font-size: 1.15rem; 
    line-height: 1.7;
    user-select: none;
    -webkit-user-select: none;
}

.post-content-body a {
    color: #ff3b30;            /* Цвет как у лайка/сердечка */
    text-decoration: underline; /* Подчеркивание, чтобы точно поняли, что это ссылка */
    font-weight: 600;           /* Чуть жирнее обычного текста */
    transition: opacity 0.2s;
}

.post-content-body a:hover {
    opacity: 0.7;               /* Эффект при наведении */
    text-decoration: none;      /* Убираем подчеркивание при наведении */
}

/* --- ПАНЕЛЬ СОЦСЕТЕЙ В СТАТЬЕ --- */
.social-bar {
    display: flex;
    gap: 18px;             /* Расстояние между иконками */
    margin-bottom: 25px;   /* Отступ снизу до просмотров */
    margin-top: -10px;     /* Чуть подтянем к дате */
    align-items: center;
}

.social-icon {
    width: 22px;           /* Размер иконок */
    height: 22px;
    fill: #a0a0a0;         /* Базовый серый цвет */
    transition: fill 0.2s, transform 0.2s;
}

.social-bar a:hover .social-icon {
    fill: #333;            /* Цвет при наведении */
    transform: translateY(-2px); /* Легкое всплытие */
}

/* --- КНОПКИ --- */
.post-actions { margin-top: 60px; display: flex; justify-content: center; }
.like-button {
    background: #f7f7f7; border: none; padding: 12px 28px;
    border-radius: 50px; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; gap: 10px;
    transition: all 0.2s;
    color: #333;
}
.like-button:hover { background: #eee; }
.like-button:active { transform: scale(0.95); }

/* --- АНИМАЦИИ --- */
.heart-animation {
    position: fixed;
    transform: translate(-50%, -50%) scale(0);
    font-size: 80px; 
    color: #ff3b30;
    pointer-events: none; 
    z-index: 9999;
}

.heart-animation.animate { 
    animation: popup 0.8s ease-out forwards; 
}

@keyframes popup {
    0% { 
        transform: translate(-50%, -50%) scale(0); 
        opacity: 0; 
    }
    20% { 
        transform: translate(-50%, -50%) scale(1.2) rotate(-15deg); 
        opacity: 1; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1) rotate(15deg); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(1.5) translateY(-50px); 
        opacity: 0; 
    }
}

/* --- КНОПКА НАВЕРХ --- */
#back-to-top {
    position: fixed; 
    bottom: 30px; 
    right: 30px;
    background: #1a1a1a; 
    width: 50px; 
    height: 50px;
    border-radius: 50%; 
    border: none; 
    cursor: pointer;
    
    /* ЦЕНТРИРОВАНИЕ ИКОНКИ */
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 0; 
    transition: opacity 0.3s, transform 0.2s;
    pointer-events: none;
    z-index: 1000;
}

#back-to-top.visible { 
    opacity: 1; 
    pointer-events: auto; 
}

#back-to-top:hover { 
    transform: translateY(-3px); 
    background: #333; /* Чуть светлее при наведении */
}

/* Стиль самой стрелочки */
.arrow-icon {
    width: 32px;
    height: 32px;
    fill: #fff; /* Белый цвет стрелки */
}

/* --- ТУЛТИП ДЛЯ КОПИРОВАНИЯ ПОЧТЫ --- */
#email-copy-btn {
    position: relative; /* Чтобы тултип позиционировался относительно иконки */
}

.copy-tooltip {
    position: absolute;
    bottom: 130%; /* Висит над иконкой */
    left: 50%;
    transform: translateX(-50%); /* Центрируем */
    
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap; /* Текст в одну строку */
    pointer-events: none; /* Чтобы не мешал кликать */
    
    opacity: 0; /* Скрыт по умолчанию */
    transition: opacity 0.3s ease, bottom 0.3s ease;
    z-index: 100;
}

/* Маленький треугольничек снизу (стрелочка) */
.copy-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Класс, который добавляет JS при клике */
.copy-tooltip.visible {
    opacity: 1;
    bottom: 150%; /* Чуть всплывает вверх при появлении */
}
