/*
 * Theme name: Little Grid Theme
 * Author: I
 * Author URI: psihe.ru
 * Version: 1.0
 */
body {
  margin: 0;
  /* Растягиваем body по высоте html */
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;

}


header {
    background: #000011;
    padding: 30px 0;
    border-bottom: 3px solid #b8860b;
    position: relative;
}

.header-link {
    display: block;
    color: #daa520;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Georgia', serif;
    padding: 20px 10px;
    transition: all 0.5s ease;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    
    /* Адаптивный размер шрифта */
    font-size: clamp(1.8em, 5vw, 3em);
    
    /* Гарантируем, что текст в одну строку */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95%;
    margin: 0 auto;
}

.header-link::before,
.header-link::after {
    content: "✦";
    color: #b8860b;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(0.8em, 2.5vw, 1.5em);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.header-link::before {
    left: 5%;
}

.header-link::after {
    right: 5%;
}

.header-link:hover {
    color: #ffd700;
    text-shadow: 
        0 0 25px rgba(255, 215, 0, 0.9),
        0 0 40px rgba(255, 215, 0, 0.5);
    letter-spacing: 4px;
    transform: scale(1.08);
}

.header-link:hover::before,
.header-link:hover::after {
    color: #ffd700;
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
}

/* Мобильная версия */
@media (max-width: 768px) {
    header {
        padding: 20px 0;
        border-bottom: 2px solid #b8860b;
    }
    
    .header-link {
        padding: 15px 5px;
        letter-spacing: 2px;
        max-width: 90%;
    }
    
    .header-link::before {
        content: none;
    }
    
    .header-link::after {
        content: none;
    }
    
    .header-link:hover {
        letter-spacing: 2.5px;
        transform: scale(1.05);
    }
}

/* Версия для очень маленьких экранов */
@media (max-width: 480px) {
    header {
        padding: 15px 0;
    }
    
    .header-link {
        padding: 12px 3px;
        letter-spacing: 1px;
        max-width: 85%;
    }
    
    .header-link::before {
        content: none;
    }
    
    .header-link::after {
        content: none;
    }
    
    .header-link:hover {
        letter-spacing: 1.5px;
        transform: scale(1.03);
    }
}

/* Отключение hover-эффектов для тач-устройств */
@media (hover: none) and (pointer: coarse) {
    .header-link:hover {
        transform: none;
        letter-spacing: inherit;
        text-shadow: none;
        color: #daa520;
    }
    
    .header-link:hover::before,
    .header-link:hover::after {
        transform: translateY(-50%);
        color: #b8860b;
        opacity: 0.7;
    }
    
    /* Добавляем активное состояние для тапов */
    .header-link:active {
        color: #ffd700;
        transform: scale(0.98);
    }
    
    .header-link:active::before,
    .header-link:active::after {
        color: #ffd700;
        opacity: 1;
    }
}

        
main {
    padding: 20px;
    background: 
        linear-gradient(135deg, #0a0a2a 0%, #1a1a4a 50%, #2d2d5a 100%),
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.8) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.6) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.9) 1px, transparent 1px);
    background-size: 100% 100%, 200px 200px, 300px 300px, 150px 150px;
    position: relative;
}

/* Анимированные мерцающие звёзды */
main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, #ffffff 2px, transparent 2px),
        radial-gradient(circle at 85% 65%, #ffffff 1px, transparent 1px),
        radial-gradient(circle at 45% 85%, #ffffff 2px, transparent 2px),
        radial-gradient(circle at 75% 35%, #ffffff 3px, transparent 3px),
        radial-gradient(circle at 25% 55%, #ffffff 1px, transparent 1px);
    background-size: 400px 400px;
    animation: twinkle 5s infinite alternate;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Белый article */
main article {
    background: white;
    margin: 0 auto;
    padding: 30px;
    max-width: 1000px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

article p {
    font-size: 16px;           /* Размер шрифта */
    line-height: 1.6em;        /* Межстрочный интервал */
    text-align: justify;
    margin: 2rem;     /* Интервал между параграфами */
    hyphens: auto;             /* Автоматическое перенаправление длинных слов */
    word-wrap: break-word;      /* Перенос длинных слов */
}


h1 {
    color: #ffffff;
    font-family: 'Georgia', serif;
    font-weight: 700;
    font-size: 2.2em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 0;
    padding: 20px 0;
    background: linear-gradient(135deg, 
        rgba(15, 0, 30, 0.95) 0%, 
        rgba(25, 0, 51, 0.9) 50%, 
        rgba(15, 0, 30, 0.95) 100%);
    border: 1px solid #6a0dad;
    border-radius: 10px;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(106, 13, 173, 0.7);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}


/* Мобильная версия */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
        margin: 20px 15px;
        padding: 15px 0;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
        margin: 15px 10px;
        padding: 12px 0;
        letter-spacing: 0.3px;
    }
}



h2 {
    color: #e6e6fa;
    font-family: 'Georgia', serif;
    font-weight: 600;
    font-size: 1.8em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0;
    padding: 15px 0;
    background: linear-gradient(135deg, 
        rgba(20, 0, 40, 0.9) 0%, 
        rgba(35, 0, 70, 0.8) 50%, 
        rgba(20, 0, 40, 0.9) 100%);
    border: 1px solid #6a0dad;
    border-radius: 8px;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(106, 13, 173, 0.5);
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

h2:hover {
    color: #f0f0ff;
    background: linear-gradient(135deg, 
        rgba(25, 0, 50, 0.95) 0%, 
        rgba(45, 0, 90, 0.85) 50%, 
        rgba(25, 0, 50, 0.95) 100%);
    border-color: #8a2be2;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(138, 43, 226, 0.7);
}

h3 {
    color: #d8bfd8;
    font-family: 'Georgia', serif;
    font-weight: 500;
    font-size: 1.4em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 15px 0;
    padding: 12px 0;
    background: linear-gradient(135deg, 
        rgba(25, 0, 51, 0.8) 0%, 
        rgba(47, 0, 82, 0.7) 50%, 
        rgba(25, 0, 51, 0.8) 100%);
    border: 1px solid #483d8b;
    border-radius: 6px;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(72, 61, 139, 0.4);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.4);
}

h3:hover {
    color: #e6e6fa;
    background: linear-gradient(135deg, 
        rgba(35, 0, 70, 0.85) 0%, 
        rgba(60, 0, 120, 0.75) 50%, 
        rgba(35, 0, 70, 0.85) 100%);
    border-color: #6a5acd;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.7),
        0 0 12px rgba(106, 90, 205, 0.6);
}



article a {
    color: #007BFF;            /* Цвет активной ссылки */
    text-decoration: none;     /* Без подчеркивания */
    transition: color 0.3s ease-in-out; /* Плавный переход цвета */
}

article a:hover {
    color: #E53935;            /* Меняется цвет при наведении мыши */
}

article ul, ol {
    font-size: 16px;           /* Размер шрифта */
    line-height: 1.6em;  
    list-style-position: inside; /* Позиция маркера списка */
    text-align: justify;
    margin: 2rem; 
}


.related-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(135deg, #0a0a2a 0%, #1a1a4a 100%);
    position: relative;
    border-radius: 15px;
}

.related-posts::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,215,0,0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(255,215,0,0.05) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px;
    pointer-events: none;
}

.post-tile {
    flex: 1 1 250px;
    background: linear-gradient(145deg, #2d2d5a 0%, #1e1e3f 50%, #2d2d5a 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,215,0,0.3);
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-tile::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
    transition: left 0.5s ease;
}

.post-tile:hover::before {
    left: 100%;
}

.post-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(255,215,0,0.6);
    box-shadow: 
        0 8px 25px rgba(255,215,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Светлый текст */
.post-tile a {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.post-tile a:hover {
    color: #ffd700;
}

.post-tile .post-excerpt {
    color: #d0d0d0;
    font-size: 0.9em;
    margin-top: 10px;
    line-height: 1.4;
}



footer {
  background: black;
  padding: 20px 0;
  text-align: center;
  font-family: 'Georgia', serif;
}

footer p {
  color: white;
  }
footer a {
  color: white;
  text-decoration: none;
}


footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  display: inline;
  margin: 0 10px;
}

footer ul li a {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

footer ul li a:hover {
  background-color: #f0f0f0;
}

#notificationBar {
z-index:2147483647;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 50px;
color: white;
background-color: rgba(0, 0, 0, 0.8);
display: none;
align-items: center;
justify-content: center;}
 
#notificationBar p {
margin: 0;
color: white;
text-align: center;}

#notificationBar a {
margin: 0;
color: white}
 
#agreeButton {
background-color: #1e90ff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
position: absolute;
right: 20px;}