/* --- ЕДИНЫЙ СТИЛЬ ДЛЯ ЭКОСИСТЕМЫ D-EXTRA.SU (2026) --- */

/* --- ЕДИНЫЙ СТИЛЬ ДЛЯ ЭКОСИСТЕМЫ OLEG BELYAEV (ТЕМНАЯ ТЕМА) --- */
:root {
    --primary-color: #4facfe;       /* Светящийся голубой */
    --secondary-color: #0066cc;     /* Насыщенный синий */
    --text-dark: #f1f5f9;           /* Мягкий белый текст */
    --text-muted: #94a3b8;          /* Приглушенный серый текст */
    --bg-light: #0f172a;            /* Глубокий космический фон */
    --card-bg: #1e293b;             /* Графитовая подложка карточек */
}

/* Изменение фона для куки-баннера и подвала, чтобы они не выбивались */
footer {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

.cookie-banner {
    background: #1e293b !important;
    border-color: rgba(79, 172, 254, 0.15) !important;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

#snowCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Фон и снег будут строго под кнопками и текстом */
    pointer-events: none;
}


/* --- Шапка сайта --- */
header {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* На странице политики флекс распределит элементы, на главной — выровняет по центру */
.header-container.split {
    justify-content: space-between;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo a {
     font-size: 2rem;
     font-weight: 700;
     color: var(--primary-color);
     letter-spacing: 1px;
     text-decoration: none;
     transition: opacity 0.2s ease;
}

.logo a:hover { 
    opacity: 0.85;
    }

.btn-back {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.btn-back:hover {
    color: var(--primary-color); 
    
}

/* --- Контентные блоки страниц --- */
main {
    max-width: 600px;
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 100%;
}

main.wide { 
    max-width: 800px;
    justify-content: flex-start; 
    margin-top: 20px; 
    
}

/* Главная: Иконка бесконечности */
.icon-container {
    margin-bottom: 30px;
    position: relative;
    width: 100px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-main {
    font-size: 5rem;
    color: var(--primary-color);
    line-height: 1;
    font-weight: 300;
    animation: pulse-infinity 2.5s infinite ease-in-out;
    user-select: none;
}

@keyframes pulse-infinity {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(0, 102, 204, 0)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 15px rgba(0, 102, 204, 0.4)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(0, 102, 204, 0)); }
}

h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 15px; color: var(--text-dark); line-height: 1.2; }
p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 40px; }

.progress-container { width: 100%; max-width: 450px; margin: 20px auto; background: rgba(0, 0, 0, 0.05); border-radius: 20px; padding: 4px; border: 1px solid rgba(0, 102, 204, 0.08); position: relative; }
.progress-bar { height: 12px; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 20px; animation: progressLoad 2s ease-out; }
.progress-text { font-size: 0.85rem; color: var(--text-muted); display: block; margin-top: 8px; font-weight: 600; text-align: center; }
@keyframes progressLoad { from { width: 0; } to { width: 74%; } }


/* Карточка контактов и карточка политики */
.contacts, .policy-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.05);
    width: 100%;
    text-align: left;
}
.contacts h2 { font-size: 1.2rem; margin-bottom: 20px; font-weight: 600; text-align: center; }
.contact-item { margin: 12px 0; font-size: 1.05rem; text-align: center; }
.contact-item a, .contact-link { color: var(--primary-color); text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.contact-item a:hover, .contact-link:hover { color: var(--secondary-color); }

/* --- СТИЛИ ДЛЯ ФОРМЫ ОБРАТНОЙ СВЯЗИ (ИНТЕГРАЦИЯ В ТЕМУ) --- */
.feedback-container { 
    width: 100%;
    max-width: 450px; 
    margin: 40px auto; 
    padding: 30px; 
    background: var(--card-bg); 
    border-radius: 16px; 
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.05);
    border: 1px solid rgba(0, 102, 204, 0.08);
    text-align: left; 
}

.feedback-container h2 { 
    margin-top: 0; 
    font-size: 1.4rem; 
    margin-bottom: 25px; 
    color: var(--text-dark); 
    font-weight: 600;
    text-align: center; 
}

.form-group { 
    margin-bottom: 18px; 
}

.form-group input, 
.form-group textarea { 
    width: 100%; 
    padding: 14px; 
    background: var(--bg-light); 
    border: 1px solid rgba(0, 0, 0, 0.08); 
    border-radius: 8px; 
    color: var(--text-dark); 
    font-family: 'Inter', sans-serif; 
    font-size: 0.95rem; 
    box-sizing: border-box; 
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-group input:focus, 
.form-group textarea:focus { 
    border-color: var(--primary-color); 
    outline: none; 
    background: var(--card-bg); 
}

.submit-btn { 
    width: 100%; 
    padding: 14px; 
    background: var(--primary-color); 
    border: none; 
    border-radius: 8px; 
    color: #ffffff; 
    font-weight: 600; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: background-color 0.2s ease, transform 0.1s ease; 
}

.submit-btn:hover { 
    background: #0052a3; 
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* --- БЛОК И КНОПКА ПОДДЕРЖКИ ПРОЕКТА --- */
.donation-container {
    width: 100%;
    max-width: 450px;
    margin: 25px auto 0 auto;
    padding: 20px;
    background: rgba(16, 185, 129, 0.04); /* Легкий изумрудный оттенок безопасности */
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    text-align: center;
}

.donation-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 15px;
}

.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 14px 20px;
    background-color: #10b981; /* Приятный зеленый цвет (цвет успеха/доната) */
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.donate-btn:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.donate-btn:active {
    transform: translateY(0);
}

.donate-icon {
    font-size: 1.1rem;
    animation: heartBeat 1.5s infinite ease-in-out;
}

/* Эффект биения сердечка на кнопке */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.25); }
    28% { transform: scale(1); }
    42% { transform: scale(1.25); }
    70% { transform: scale(1); }
}

/* --- МОДАЛЬНОЕ ОКНО ДЛЯ QR-КОДА --- */
.qr-modal {
    display: none; /* Изначально скрыто */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px); /* Красивое размытие фона сайта */
    z-index: 2000; /* Перекрывает всё на странице */
    align-items: center;
    justify-content: center;
}

.qr-modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 102, 204, 0.08);
    position: relative;
    animation: qrPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes qrPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.qr-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.qr-close:hover {
    color: #ff4d4d;
}

.qr-modal-content h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.qr-image {
    width: 220px;
    height: 220px;
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: inline-block;
}


/* Политика: текстовые элементы */
.policy-card { padding: 40px; margin-bottom:20px;}
.policy-card h1 { font-size: 2rem; text-align: left; margin-bottom: 10px; }
.policy-card h2 { font-size: 1.3rem; font-weight: 600; color: var(--text-dark); margin: 30px 0 15px 0; }
.policy-card p { margin-bottom: 15px; color: #4a5568; font-size: 1.05rem; text-align: left; }
.meta-date { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 30px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); padding-bottom: 15px; }
.policy-card ul { margin-bottom: 20px; padding-left: 20px; color: #4a5568; text-align: left; }
.policy-card li { margin-bottom: 8px; font-size: 1.05rem; }
.highlight-box { background-color: var(--bg-light); border-left: 4px solid var(--primary-color); padding: 20px; border-radius: 0 12px 12px 0; margin: 25px 0; }
.highlight-box p { margin-bottom: 0; font-style: italic; color: var(--text-dark); }


/* --- Подвал сайта --- */
footer {
    width: 100%;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0,0,0,0.05);
    background-color: rgba(255, 255, 255, 0.5);
    margin-top: auto;
}
footer a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
footer a:hover { text-decoration: underline; color: var(--secondary-color); }

/* --- Куки-баннер --- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: calc(100% - 40px);
    max-width: 550px;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 51, 102, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 1000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 102, 204, 0.08);
}
.cookie-banner.show { transform: translateX(-50%) translateY(0); }
.cookie-text { font-size: 0.95rem; color: var(--text-dark); line-height: 1.5; text-align: left; }
.cookie-text a { color: var(--primary-color); text-decoration: none; font-weight: 600; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-btn { background-color: var(--primary-color); color: #ffffff; border: none; padding: 10px 20px; font-size: 0.95rem; font-weight: 600; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: background-color 0.2s ease, transform 0.1s ease; }
.cookie-btn:hover { background-color: #0052a3; }
.cookie-btn:active { transform: scale(0.97); }

/* --- Медиа-запросы (Адаптивность) --- */
@media (max-width: 540px) {
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; gap: 15px; bottom: 15px; }
    .cookie-banner .cookie-text { text-align: center; }
    .cookie-btn { width: 100%; }
}

@media (max-width: 480px) {
    h1, .policy-card h1 { font-size: 1.8rem; }
    p, .policy-card p, .policy-card li { font-size: 1rem; }
    .contacts, .policy-card { padding: 20px; }
    header { padding: 25px 20px; }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f172a; /* Глубокий темно-синий */
        --text-dark: #f1f5f9; /* Почти белый */
        --card-bg: #1e293b; /* Серый графит для карточек */
    }
    footer { background-color: rgba(15, 23, 42, 0.8); }
    .cookie-banner { background: #1e293b; border-color: rgba(255,255,255,0.05); }
    .cookie-text { color: #fff; }
}
