/* ===== СТИЛИ ДЛЯ IDVPN.RU ===== */
/* ===== БЛОК 1: ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ И СБРОС ===== */
:root {
    --bg-color: #0B1220;
    --card-bg: #171F2F;
    --border-color: #1F283A;
    --text-primary: #FDFEFE;
    --text-secondary: #AEB0B7;
    --accent-color: #6CD0BA;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 100vh;
}
/* ===== КОНЕЦ БЛОКА 1 ===== */
/* ===== БЛОК 2: ГЕРОЙ ===== */
.hero-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #0B1220;
    z-index: 1000;
    pointer-events: none;
}
/* ===== КОНЕЦ БЛОКА 2 ===== */
/* ===== БЛОК 3: ОСНОВНОЙ КОНТЕНТ ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;           /* добавить */
    display: flex;          /* добавить */
    flex-direction: column; /* добавить */
}
/* ===== КОНЕЦ БЛОКА 3 ===== */
/* ===== БЛОК 4: КАРТОЧКА БЛОГА ===== */
.login-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    margin: 0 auto;
    height: 100%;           /* добавить */
    display: flex;          /* добавить */
    flex-direction: column; /* добавить */
}

.posts-list {
    margin-top: 0px;
    flex: 1;                /* добавить - занимает всё свободное место */
    overflow-y: auto;       /* добавить - скролл внутри списка постов */
    padding-right: 8px;      /* небольшой отступ для скролла */
}

.logo-container {
    text-align: center;
    margin-bottom: 24px;
}
.logo {
    max-width: 80px;
    height: auto;
}
.title {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}
.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1rem;
}
/* ===== КОНЕЦ БЛОКА 4 ===== */
/* ===== БЛОК 5: ПОСТЫ ===== */
.posts-list {
    margin-top: 0px;
}
.post-preview {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}
.post-preview:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.post-title {
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.post-meta {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 12px;
}
.post-summary {
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.read-more-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
    display: inline-block;
}
.read-more-link:hover {
    opacity: 0.8;
}
.no-posts {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 0;
}
/* ===== КОНЕЦ БЛОКА 5 ===== */
/* ===== БЛОК 6: ФУТЕР ===== */
.footer-links {
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
}
.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
.footer-link-separator {
    color: var(--border-color);
    margin: 0 8px;
}
/* ===== КОНЕЦ БЛОКА 6 ===== */
/* ===== БЛОК 7: АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 1200px) {
    .hero-first,
    .hero-second {
        width: 300px;
        height: 300px;
    }
    
    .hero-second.slide-up {
        top: 15px;
        transform: translate(-50%, 0) scale(0.5);
    }
    
    .main-content {
        padding-top: 120px;
    }
    
    .login-card {
        padding: 24px 16px;
    }
    .title {
        font-size: 1.5rem;
    }
    .post-title {
        font-size: 1.2rem;
    }
    #big-logo {
        transform: translate(-50%, -50%) scale(0.5);
    }
    
    #header-logo {
        transform: translateX(-50%) scale(0.5);
        top: 10px;
    }
}
@media (max-aspect-ratio: 1/1) and (max-width: 600px) {
    .login-card {
        padding: 24px 16px;
    }
    .title {
        font-size: 1.5rem;
    }
    .post-title {
        font-size: 1.2rem;
    }
}
/* ===== КОНЕЦ БЛОКА 7 ===== */
/* ===== БЛОК 8: АНИМАЦИЯ ЧАСТИЦ ===== */
#big-logo {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
    transition: opacity 0.5s ease-in-out;
}
#particle-canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}
#header-logo {
    display: none;
    position: fixed;
    top: 20px;
    left: 50%;
    width: 400px;
    height: 80px;
    transform: translateX(-50%);
    z-index: 1002;  /* Логотип выше анимации */
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
}
#header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
body.animating #big-logo {
    opacity: 0;
}
body.animating #header-logo {
    display: block;
}
body.show-header #header-logo {
    opacity: 1;
}
/* ===== КОНЕЦ БЛОКА 8 ===== */

/* ===== БЛОК 9: ВЫЕЗД ЛЕНТЫ ПОСЛЕ АНИМАЦИИ ===== */
/* ===== БЛОК 9: ВЫЕЗД ЛЕНТЫ ===== */
.main-content {
    position: relative;
    z-index: 1;
    background-color: var(--bg-color);
    min-height: 100vh;
    padding-top: 120px;
    transform: translateY(-100%);
    transition: transform 0.8s ease-in-out;
    max-height: calc(100vh - 240px);  /* отступы сверху и снизу */
    overflow-y: auto;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .main-content {
        padding-top: 60px;
        max-height: calc(100vh - 80px);  /* меньше отступы на мобилках */
    }
}

body.animation-complete .main-content {
    transform: translateY(0);
}
/* ===== КОНЕЦ БЛОКА 9 ===== */

.hero-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-color: #0B1220;
    z-index: 8;
    pointer-events: none;
    opacity: 1;  /* По умолчанию не видна */
    
}
/* ===== БЛОК 10: НОВЫЕ СТИЛИ ДЛЯ ПОСТОВ ===== */
.post-image {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    max-height: 300px;
    background-color: var(--border-color);
}

.post-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.post-image img:hover {
    transform: scale(1.02);
}

.post-quote {
    background-color: rgba(108, 208, 186, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-quote p {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.post-quote footer {
    color: var(--accent-color);
    font-style: normal;
    font-weight: 500;
}
/* ===== КОНЕЦ БЛОКА 10 ===== */
/* ===== БЛОК 11: КРУТАЯ ПОДСКАЗКА ===== */
.auto-badge {
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
    font-weight: 600;
    position: relative;
    cursor: help;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    letter-spacing: 0.3px;
}

/* Контейнер для подсказки */
.auto-badge[data-tooltip] {
    position: relative;
}

/* Сама подсказка - появляется сверху */
.auto-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: #2b3b4c;  /* Тёмно-синий фон */
    color: #ffffff;        /* Яркий белый текст */
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border: 1px solid var(--accent-color);  /* Цветная обводка */
    z-index: 10001;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 0.3px;
    font-style: normal;
}

/* Стрелочка подсказки */
.auto-badge[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 27px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: var(--accent-color) transparent transparent transparent;  /* Стрелка цвета акцента */
    z-index: 10002;
}

.auto-badge:hover {
    background-color: #5fb8a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
/* ===== КОНЕЦ БЛОКА 11 ===== */
/* ===== БЛОК 12: МОДАЛЬНОЕ ОКНО ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-container {
    position: relative;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow-y: auto;
    z-index: 2001;
    animation: modalFadeIn 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: sticky;
    top: 15px;
    right: 15px;
    float: right;
    width: 36px;
    height: 36px;
    background: var(--border-color);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 15px;
}

.modal-close:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: scale(1.1);
}

.modal-content {
    padding: 20px 30px 30px;
    clear: both;
}

/* ===== БЛОК 13: СТИЛИ ДЛЯ ПОЛНОГО ПОСТА ===== */
.back-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

.post-full-title {
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-full-image {
    margin: 25px 0;
    border-radius: 16px;
    overflow: hidden;
    max-height: 500px;
}

.post-full-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.post-full-content {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 25px;
}

.post-full-content h1,
.post-full-content h2,
.post-full-content h3 {
    color: var(--text-primary);
    margin: 30px 0 15px;
}

.post-full-content p {
    margin-bottom: 20px;
}

.post-full-content ul,
.post-full-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-full-content li {
    margin-bottom: 8px;
}

.post-full-content blockquote {
    border-left: 4px solid var(--accent-color);
    background: rgba(108, 208, 186, 0.05);
    padding: 15px 25px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-full-content code {
    background: var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.95rem;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px 20px 20px;
    }
    
    .post-full-title {
        font-size: 1.8rem;
    }
    
    .post-full-content {
        font-size: 1rem;
    }
}

/* ===== БЛОК 14: КНОПКИ ДЕЙСТВИЙ ===== */
.action-buttons {
    display: flex;
    gap: 200px;                   
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    padding: 8px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    min-width: 220px;
    line-height: 1.3;
}

/* Левая кнопка (градиентная) */
.subscribe-button {
    background: linear-gradient(135deg, #bb46f63a 0%, #bb46f600 100%);
    color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(10, 50, 40, 0.4);
    border: 1px solid #BA46F6;    /* ← обводка теперь всегда */
}

.subscribe-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #bb46f676 0%, #bb46f600 100%);
    box-shadow: 0 8px 25px rgba(35, 89, 71, 0.6);
    color: #FFFFFF;
    /* border убрали отсюда */
}

/* Правая кнопка (прозрачная) */
.access-button {
    background: transparent;
    color: #83cab76f;
    border: 1px solid #83cab76f;    /* добавил для симметрии */
}

.access-button:hover {
    background: rgba(108, 208, 186, 0.1);
    color: #ff0000;
    transform: translateY(-2px);
}

/* Иконка внутри кнопки */
.button-icon {
    font-size: 1.4rem;           /* Чуть крупнее */
    line-height: 1;
}

/* Контейнер для двухстрочного текста */
.button-text {
    display: flex;
    flex-direction: column;
    text-align: center;          /* Центрируем текст по горизонтали */
    align-items: center;         /* Центрируем дочерние элементы */
    gap: 2px;
}

/* Первая строка (основная) */
.button-text .line1 {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
    text-align: center;          /* Центрирование для надёжности */
}

/* Вторая строка (подпись) */
.button-text .line2 {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
    color: inherit;
    text-align: center;          /* Центрирование для надёжности */
}

/* ===== СТИЛИ ДЛЯ МОДАЛКИ ПОДПИСКИ ===== */
.subscribe-options {
    margin-top: 10px;
}

.subscribe-option {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.subscribe-option h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

#telegram-username {
    width: 100%;
    padding: 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    margin-bottom: 15px;
    box-sizing: border-box;
}

#telegram-username:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(108, 208, 186, 0.2);
}

/* ===== АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 600px) {
    .action-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-button {
        width: 100%;
        min-width: unset;        /* Убираем фикс. ширину на мобилках */
    }
    
    .button-text .line1 {
        font-size: 0.95rem;
    }
    
    .button-text .line2 {
        font-size: 0.75rem;
    }
}
/* ===== КОНЕЦ БЛОКА 14 ===== */
/* ПОДНИМАЕМ МОДАЛКУ НАД ВСЕМ */
#subscribe-modal {
    z-index: 999999 !important;
}

#subscribe-modal .modal-container {
    z-index: 9999999 !important;
    position: relative;
    background: var(--card-bg) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#subscribe-modal .modal-content {
    opacity: 1 !important;
    visibility: visible !important;
    color: var(--text-primary) !important;
}
#subscribe-modal .modal-container {
    overflow: visible !important;
}

#subscribe-modal .modal-content {
    overflow: visible !important;
    display: block !important;
}

.main-content {
    padding-top: 120px;  /* это оставляем */
    margin-top: 0;        /* убеждаемся, что нет отрицательных margin */
}

/* Для мобилок, где шапка может быть меньше */
@media (max-width: 768px) {
    .main-content {
        padding-top: 80px;  /* подгоняем под высоту шапки на мобилках */
    }
}

/* А шапка пусть остаётся фиксированной, но мы точно знаем её высоту */
#header-logo {
    height: 80px;           /* фиксируем высоту */
    line-height: 80px;      /* чтобы контент не съезжал */
}

/* Убираем белую заливку при автозаполнении */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #101725 inset !important;
    -webkit-text-fill-color: #FDFEFE !important;
    caret-color: #FDFEFE;
    border: 2px solid #1F283A !important;
}

/* Для поля с паролем (если нужно отдельно) */
#login-password:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #101725 inset !important;
    -webkit-text-fill-color: #FDFEFE !important;
}