:root {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #d946ef 100%);
    --bg-color: #0b1121; /* Глубокий темный фон из скриншота */
    --card-bg: rgba(30, 41, 59, 0.6); /* Полупрозрачные карточки (эффект стекла) */
    --text-main: #f8fafc; /* Белый текст */
    --text-muted: #94a3b8; /* Светло-серый для описаний */
    --text-light: #64748b;
    --border-color: rgba(255, 255, 255, 0.08); /* Едва заметные границы */
    --header-bg: rgba(11, 17, 33, 0.85);
    --header-text: #e2e8f0;
    --tag-bg: rgba(59, 130, 246, 0.15);
    --tag-text: #60a5fa;
    --radius: 20px; /* Большие скругления для современного вида */
    --shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(217, 70, 239, 0.4); /* Неоновое свечение */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-color); 
    background-image: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%), 
                      radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.15), transparent 25%);
    color: var(--text-main); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

a { text-decoration: none; color: var(--primary-hover); transition: all 0.3s ease; }
a:hover { color: #d946ef; text-shadow: 0 0 8px rgba(217, 70, 239, 0.4); }
ul { list-style: none; }

/* SVG Icons classes */
.icon { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: middle; fill: currentColor; transition: fill 0.3s ease; }

/* Header */
.site-header { 
    background-color: var(--header-bg); 
    color: var(--header-text); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color); 
}
.header-container { max-width: 1200px; margin: 0 auto; padding: 15px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.logo { font-size: 1.8rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; text-decoration: none; letter-spacing: -0.5px; }
.logo:hover { color: #fff; transform: scale(1.02); }

/* Search */
.search-wrapper { flex-grow: 1; max-width: 400px; position: relative; display: none; margin: 0 auto; }
@media(min-width: 640px) { .search-wrapper { display: block; } }
.search-input { 
    width: 100%; 
    padding: 10px 40px 10px 20px; 
    border-radius: 30px; 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid var(--border-color); 
    outline: none; 
    font-size: 0.95rem; 
    color: var(--text-main); 
    transition: all 0.3s ease;
}
.search-input:focus { background: rgba(255, 255, 255, 0.1); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
.search-input::placeholder { color: var(--text-light); }
.search-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.3s; }
.search-btn:hover { color: var(--primary-hover); }
.search-results { 
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; 
    background: #1e293b; border: 1px solid var(--border-color); 
    border-radius: 16px; box-shadow: var(--shadow); 
    max-height: 300px; overflow-y: auto; display: none; z-index: 100; 
}
.search-results.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.search-item { display: block; padding: 12px 20px; border-bottom: 1px solid var(--border-color); transition: background 0.2s; }
.search-item:hover { background-color: rgba(255, 255, 255, 0.05); }
.search-item-title { font-weight: 600; font-size: 0.95rem; color: #fff; margin-bottom: 4px; }
.search-item-desc { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 25px; }
.nav-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 500; transition: color 0.3s; }
.nav-btn:hover { color: #fff; }
.btn-primary { 
    background: var(--accent-gradient); 
    color: white; 
    padding: 10px 24px; 
    border-radius: 12px; 
    font-weight: 600; 
    border: none; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: all 0.3s ease; 
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--glow); color: #fff; }

/* Main Layout */
.layout-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 30px; flex-grow: 1; width: 100%; }
@media(min-width: 768px) { .layout-container { flex-direction: row; } }
.main-content { flex-grow: 1; width: 100%; }
@media(min-width: 768px) { .main-content { width: 70%; } }
.sidebar { width: 100%; display: flex; flex-direction: column; gap: 30px; }
@media(min-width: 768px) { .sidebar { width: 30%; } }

/* Cards & Widgets */
.card { 
    background-color: var(--card-bg); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    padding: 30px; 
    margin-bottom: 25px; 
}
.widget-title { font-size: 1.2rem; font-weight: 700; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; color: #fff; }
.stat-list li { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.95rem; color: var(--text-muted); border-bottom: 1px dashed rgba(255,255,255,0.05); }
.stat-list li:last-child { border-bottom: none; }
.stat-list li span:last-child { font-weight: 700; color: #fff; }
.random-links li { margin-bottom: 12px; font-size: 0.95rem; }

/* Index Post List (Hero and Galleries feel) */
.page-title { 
    font-size: 3.5rem; 
    font-weight: 800; 
    margin-bottom: 30px; 
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -1px;
}
.post-list { background: transparent; display: flex; flex-direction: column; gap: 20px; }
.post-item { 
    background-color: var(--card-bg); 
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius);
    display: flex; gap: 20px; padding: 25px; 
    transition: all 0.3s ease; 
}
.post-item:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.post-avatar { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: none; flex-shrink: 0; display: none; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
@media(min-width: 640px) { .post-avatar { display: block; } }
.post-info { flex-grow: 1; }
.post-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.post-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tag { background-color: var(--tag-bg); color: var(--tag-text); font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.85rem; color: var(--text-light); align-items: center; }
.meta-item { display: flex; align-items: center; gap: 6px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.page-link { 
    padding: 8px 16px; 
    border: 1px solid var(--border-color); 
    background: rgba(255,255,255,0.05); 
    color: var(--text-main); 
    border-radius: 12px; 
    font-size: 0.95rem; 
    font-weight: 600;
    transition: all 0.3s ease; 
}
.page-link:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.page-link.active { background: var(--accent-gradient); color: white; border: none; box-shadow: 0 4px 15px rgba(217, 70, 239, 0.3); }

/* Single Post View */
.breadcrumb { font-size: 0.9rem; color: var(--text-light); margin-bottom: 25px; font-weight: 500; }
.post-main-title { 
    font-size: 2.8rem; 
    font-weight: 800; 
    margin-bottom: 30px; 
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}
.message-block { 
    background: var(--card-bg); 
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color); 
    border-radius: var(--radius); 
    margin-bottom: 25px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
    box-shadow: var(--shadow);
}
@media(min-width: 640px) { .message-block { flex-direction: row; } }
.user-panel { 
    background: rgba(0, 0, 0, 0.15); 
    padding: 25px 20px; 
    border-bottom: 1px solid var(--border-color); 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 20px; 
}
@media(min-width: 640px) { .user-panel { width: 180px; border-bottom: none; border-right: 1px solid var(--border-color); flex-direction: column; text-align: center; flex-shrink: 0; } }
.user-panel img { width: 80px; height: 80px; border-radius: 20px; object-fit: cover; box-shadow: 0 4px 15px rgba(0,0,0,0.4); }
.user-stats { font-size: 0.8rem; color: var(--text-light); line-height: 1.6; margin-top: 10px; }
.message-content { padding: 30px; flex-grow: 1; }
.message-header { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.user-name { font-weight: 800; color: #fff; font-size: 1.1rem; }
.badge { background: rgba(59, 130, 246, 0.2); color: #60a5fa; font-size: 0.7rem; padding: 4px 10px; border-radius: 12px; margin-left: 8px; font-weight: 700; text-transform: uppercase; border: 1px solid rgba(59, 130, 246, 0.3); }
.message-date { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }
.message-text { font-size: 1.05rem; color: var(--text-muted); line-height: 1.8; }

/* Comments */
.comments-header { font-size: 1.5rem; font-weight: 800; margin-bottom: 25px; margin-top: 50px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; color: #fff; }
.comment { margin-bottom: 20px; scroll-margin-top: 100px; }
.comment.is-reply { margin-left: 20px; border-left: 2px solid rgba(217, 70, 239, 0.5); border-radius: 0; padding-left: 10px; background: none; box-shadow: none; }
@media(min-width: 640px) { .comment.is-reply { margin-left: 60px; padding-left: 20px; } }
.reply-badge { font-size: 0.75rem; color: #d946ef; font-weight: 600; margin-left: 10px; }

/* Social Bar */
.post-footer { 
    background: rgba(0, 0, 0, 0.2); 
    padding: 15px 30px; 
    border-top: 1px solid var(--border-color); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.social-links { display: flex; gap: 15px; }
.social-links a { 
    color: var(--text-light); 
    display: flex; align-items: center; justify-content: center; 
    width: 36px; height: 36px; 
    border-radius: 50%; 
    background: rgba(255,255,255,0.05); 
    transition: all 0.3s ease;
}
.social-links a:hover { color: #fff; background: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4); }

/* Call to action */
.cta-box { 
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(217, 70, 239, 0.08)); 
    border: 1px solid rgba(217, 70, 239, 0.2); 
    border-radius: var(--radius); 
    padding: 50px 30px; 
    text-align: center; 
    margin-top: 50px; 
    backdrop-filter: blur(10px);
}
.cta-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 15px; color: #fff; }
.cta-text { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 25px; line-height: 1.6; }

/* Footer */
.site-footer { background: #070a13; color: #94a3b8; padding: 60px 20px; margin-top: auto; border-top: 1px solid var(--border-color); }
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 40px; font-size: 0.95rem; }
@media(min-width: 768px) { .footer-container { grid-template-columns: repeat(3, 1fr); } }
.footer-title { color: #fff; font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.footer-text { line-height: 1.8; color: var(--text-light); }