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

:root {
    --bg-dark: #050510;
    --bg-card: #0d0d18;
    --text-primary: #e8f4ff;
    --text-secondary: #88a0b8;
    /* Неоновые цвета */
    --neon-cyan: #00f0ff;
    --neon-cyan-bright: #00ffff;
    --neon-pink: #ff0080;
    --neon-pink-bright: #ff00ff;
    --neon-purple: #bf00ff;
    --neon-purple-bright: #d400ff;
    --neon-yellow: #ffd700;
    --neon-yellow-bright: #ffff00;
    --neon-green: #00ff88;
    --neon-green-bright: #00ffaa;
    --neon-orange: #ff6b00;
    --neon-orange-bright: #ff8800;
    --border: #1a1a2e;
}

body {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    background: linear-gradient(135deg, #050510 0%, #0a0a1a 50%, #050510 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    letter-spacing: 0.5px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 240, 255, 0.02) 2px,
            rgba(0, 240, 255, 0.02) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 0, 128, 0.02) 2px,
            rgba(255, 0, 128, 0.02) 4px
        );
    pointer-events: none;
    z-index: 0;
}

/* Контейнер для снежинок */
#snowflakes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    font-size: 1em;
    font-family: Arial;
    animation: fall linear infinite;
    opacity: 0.5;
}

.snowflake:nth-child(3n) {
    color: rgba(0, 240, 255, 0.4);
    text-shadow: 
        0 0 5px rgba(0, 240, 255, 0.8),
        0 0 10px rgba(0, 240, 255, 0.4),
        0 0 15px rgba(0, 240, 255, 0.2);
}

.snowflake:nth-child(3n+1) {
    color: rgba(255, 0, 128, 0.4);
    text-shadow: 
        0 0 5px rgba(255, 0, 128, 0.8),
        0 0 10px rgba(255, 0, 128, 0.4),
        0 0 15px rgba(255, 0, 128, 0.2);
}

.snowflake:nth-child(3n+2) {
    color: rgba(191, 0, 255, 0.4);
    text-shadow: 
        0 0 5px rgba(191, 0, 255, 0.8),
        0 0 10px rgba(191, 0, 255, 0.4),
        0 0 15px rgba(191, 0, 255, 0.2);
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Основной контейнер */
.container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 128, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(191, 0, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Заголовок */
header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid transparent;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), rgba(255, 0, 128, 0.2), transparent) bottom / 100% 1px no-repeat;
    box-shadow: 0 1px 0 rgba(0, 240, 255, 0.1);
}

header h1 {
    font-family: 'Russo One', sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-pink) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 0 10px rgba(0, 240, 255, 0.5),
        0 0 20px rgba(255, 0, 128, 0.3),
        0 0 30px rgba(191, 0, 255, 0.2);
    letter-spacing: 3px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.8));
}

.back-link {
    display: inline-block;
    color: var(--neon-cyan);
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.back-link:hover {
    color: var(--neon-cyan-bright);
    text-shadow: 
        0 0 8px rgba(0, 240, 255, 0.8),
        0 0 15px rgba(0, 240, 255, 0.5);
}

/* Поиск */
#search-container {
    margin-bottom: 30px;
}

#search-input {
    width: 100%;
    background-color: rgba(13, 13, 24, 0.8);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
    backdrop-filter: blur(10px);
}

#search-input::placeholder {
    color: var(--text-secondary);
}

#search-input:focus {
    outline: none;
    border-color: var(--neon-yellow);
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.1),
        inset 0 0 10px rgba(255, 215, 0, 0.1);
    background-color: rgba(13, 13, 24, 0.95);
}

/* Список постов */
#posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background-color: rgba(13, 13, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.post-card:nth-child(3n)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.post-card:nth-child(3n+1)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 128, 0.1), transparent);
    transition: left 0.5s ease;
}

.post-card:nth-child(3n+2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(191, 0, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.post-card:hover::before {
    left: 100%;
}

.post-card:nth-child(3n):hover {
    transform: translateY(-3px);
    border-color: var(--neon-cyan);
    box-shadow: 
        0 4px 20px rgba(0, 240, 255, 0.4),
        0 0 30px rgba(0, 240, 255, 0.2),
        inset 0 0 20px rgba(0, 240, 255, 0.05);
    background-color: rgba(13, 13, 24, 0.8);
}

.post-card:nth-child(3n+1):hover {
    transform: translateY(-3px);
    border-color: var(--neon-pink);
    box-shadow: 
        0 4px 20px rgba(255, 0, 128, 0.4),
        0 0 30px rgba(255, 0, 128, 0.2),
        inset 0 0 20px rgba(255, 0, 128, 0.05);
    background-color: rgba(13, 13, 24, 0.8);
}

.post-card:nth-child(3n+2):hover {
    transform: translateY(-3px);
    border-color: var(--neon-purple);
    box-shadow: 
        0 4px 20px rgba(191, 0, 255, 0.4),
        0 0 30px rgba(191, 0, 255, 0.2),
        inset 0 0 20px rgba(191, 0, 255, 0.05);
    background-color: rgba(13, 13, 24, 0.8);
}

.post-card h2 {
    font-family: 'Russo One', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.post-card:nth-child(3n):hover h2 {
    color: var(--neon-cyan-bright);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8), 0 0 20px rgba(0, 240, 255, 0.4);
}

.post-card:nth-child(3n+1):hover h2 {
    color: var(--neon-pink-bright);
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.8), 0 0 20px rgba(255, 0, 128, 0.4);
}

.post-card:nth-child(3n+2):hover h2 {
    color: var(--neon-purple-bright);
    text-shadow: 0 0 10px rgba(191, 0, 255, 0.8), 0 0 20px rgba(191, 0, 255, 0.4);
}

.post-card .post-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.post-card .post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Статья */
article {
    background-color: rgba(13, 13, 24, 0.6);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 0 50px rgba(0, 240, 255, 0.02);
    position: relative;
}

article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

article h1 {
    font-family: 'Russo One', sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-pink) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    text-shadow: 
        0 0 10px rgba(0, 240, 255, 0.4),
        0 0 20px rgba(255, 0, 128, 0.3),
        0 0 30px rgba(191, 0, 255, 0.2);
    letter-spacing: 2px;
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.6));
}

#post-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

#post-text p {
    margin-bottom: 1.5em;
}

/* Навигация между постами */
#post-navigation {
    margin-top: 40px;
}

.post-nav-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.post-nav-btn {
    background-color: rgba(13, 13, 24, 0.8);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 15px 25px;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 200px;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.post-nav-prev:hover:not(.disabled) {
    background-color: rgba(191, 0, 255, 0.15);
    border-color: var(--neon-purple);
    color: var(--neon-purple-bright);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 20px rgba(191, 0, 255, 0.5),
        0 0 30px rgba(191, 0, 255, 0.3);
    text-shadow: 0 0 10px rgba(191, 0, 255, 0.9);
}

.post-nav-next:hover:not(.disabled) {
    background-color: rgba(255, 0, 128, 0.15);
    border-color: var(--neon-pink);
    color: var(--neon-pink-bright);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 20px rgba(255, 0, 128, 0.5),
        0 0 30px rgba(255, 0, 128, 0.3);
    text-shadow: 0 0 10px rgba(255, 0, 128, 0.9);
}

.post-nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.post-nav-btn .nav-arrow {
    font-size: 1.2rem;
    font-weight: bold;
}

.post-nav-prev {
    text-align: left;
}

.post-nav-next {
    text-align: right;
}

/* Пагинация */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: rgba(13, 13, 24, 0.8);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.pagination-btn:hover:not(:disabled) {
    background-color: rgba(0, 255, 136, 0.15);
    border-color: var(--neon-green);
    color: var(--neon-green-bright);
    box-shadow: 
        0 0 15px rgba(0, 255, 136, 0.5),
        0 0 25px rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.9);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: rgba(0, 255, 136, 0.2);
    border-color: var(--neon-green);
    color: var(--neon-green-bright);
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.6),
        0 0 20px rgba(0, 255, 136, 0.3),
        inset 0 0 10px rgba(0, 255, 136, 0.1);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.9);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    article {
        padding: 25px 20px;
    }
    
    article h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    #post-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    #search-container {
        margin-bottom: 20px;
    }
    
    #search-input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .post-nav-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .post-nav-btn {
        width: 100%;
        max-width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .post-card {
        padding: 20px;
    }
    
    .post-card h2 {
        font-size: 1.3rem;
    }
    
    .pagination-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    #pagination {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    article h1 {
        font-size: 1.5rem;
    }
    
    article {
        padding: 20px 15px;
    }
    
    #search-input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .post-nav-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .post-card {
        padding: 15px;
    }
    
    .post-card h2 {
        font-size: 1.2rem;
    }
    
    .pagination-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}
