/* =========================================
   DESIGN 1: SUPA CLEAN UI (Левый скриншот)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366F1; /* Мягкий фиолетовый / Индиго */
    --primary-hover: #4F46E5;
    --bg-gradient: #F8FAFC; /* Очень светлый серо-голубой фон */
    --card-bg: #FFFFFF;
    --card-dark: #F1F5F9;
    --text-main: #334155;
    --text-muted: #94A3B8;
    --border-color: rgba(226, 232, 240, 0.4); /* Почти невидимые границы */
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-text: #0F172A;
    --radius: 20px; /* Большие скругления */
    --shadow-sm: 0 10px 25px rgba(99, 102, 241, 0.05); /* Мягкая цветная тень */
    --shadow-md: 0 20px 40px rgba(99, 102, 241, 0.08);
    --accent-green: #22C55E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Poppins', sans-serif; 
    background: var(--bg-gradient);
    color: var(--text-main); 
    line-height: 1.7; 
    display: flex; flex-direction: column; min-height: 100vh; 
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--header-text); letter-spacing: -0.5px;}
a { text-decoration: none; color: var(--primary); transition: all 0.3s; }
a:hover { color: var(--primary-hover); opacity: 0.8; }
ul { list-style: none; }
.icon { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -0.125em; fill: currentColor; }

/* Header */
.site-header { 
    background: var(--header-bg); backdrop-filter: blur(10px);
    border-bottom: 1px solid #F1F5F9; box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 1000;
}
.header-container { max-width: 1200px; margin: 0 auto; padding: 15px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--header-text); display: flex; align-items: center; gap: 8px; }
.logo:hover { color: var(--primary); }

/* Search */
.search-wrapper { flex-grow: 1; max-width: 450px; position: relative; display: none; }
@media(min-width: 768px) { .search-wrapper { display: block; } }
.search-input { 
    width: 100%; padding: 12px 40px 12px 20px; 
    border-radius: 50px; border: 2px solid transparent; 
    background: #F1F5F9; outline: none; font-size: 0.95rem; font-family: 'Poppins'; transition: all 0.3s;
}
.search-input:focus { border-color: var(--primary); background: #ffffff; box-shadow: var(--shadow-sm); }
.search-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: #ffffff; border: none; border-radius: var(--radius); margin-top: 15px; box-shadow: var(--shadow-md); max-height: 350px; overflow-y: auto; display: none; padding: 10px;}
.search-results.active { display: block; }
.search-item { display: block; padding: 12px 16px; border-radius: 12px; margin-bottom: 5px; transition: 0.2s;}
.search-item:hover { background-color: #F8FAFC; transform: translateX(5px); }
.search-item-title { font-weight: 600; font-size: 0.95rem; color: var(--primary); }
.search-item-desc { font-size: 0.8rem; color: var(--text-muted); }

/* Nav Buttons */
.header-nav { display: flex; align-items: center; gap: 20px; }
.nav-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-weight: 600; font-family: 'Poppins'; font-size: 0.95rem; transition: 0.2s; display: flex; align-items: center; gap: 6px;}
.nav-btn:hover { color: var(--primary); }
.btn-primary { 
    background: linear-gradient(135deg, #818CF8 0%, #4F46E5 100%); color: #fff; 
    padding: 10px 24px; border-radius: 50px; font-weight: 600; border: none; cursor: pointer; 
    display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(99,102,241,0.3); transition: 0.3s; 
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.4); color: #fff;}

/* 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: 860px) { .layout-container { flex-direction: row; } }
.main-content { flex-grow: 1; width: 100%; }
@media(min-width: 860px) { .main-content { width: 72%; } }
.sidebar { width: 100%; display: flex; flex-direction: column; gap: 25px; }
@media(min-width: 860px) { .sidebar { width: 28%; } }

/* Sidebar Cards */
.card { background: var(--card-bg); border: none; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.card-dark { background: var(--primary); color: #fff; }
.card-dark .widget-title, .card-dark .stat-list li span:last-child { color: #fff; }
.card-dark .stat-list li span:first-child, .card-dark .random-links li a { color: rgba(255,255,255,0.8); }
.widget-title { font-size: 1.2rem; border-bottom: none; margin-bottom: 20px; color: var(--header-text); font-weight: 800;}
.stat-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 500; border-bottom: 1px dashed rgba(0,0,0,0.05); font-size: 0.95rem;}
.stat-list li:last-child { border-bottom: none; }
.stat-list li span:first-child { display: flex; align-items: center; gap: 8px; }
.stat-list li span:last-child { font-weight: 700; }
.random-links li { margin-bottom: 15px; font-weight: 500; font-size: 0.95rem; }

/* Index Post List */
.page-title { font-size: 2rem; margin-bottom: 25px; color: var(--header-text); font-weight: 800; }
.post-list { display: grid; grid-template-columns: 1fr; gap: 25px; }
.post-item { background: var(--card-bg); border: none; border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; transition: all 0.3s; box-shadow: var(--shadow-sm); }
.post-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.post-item-top { display: flex; gap: 16px; margin-bottom: 15px; align-items: center;}
.post-avatar { width: 55px; height: 55px; border-radius: 16px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.post-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.post-title a { color: var(--header-text); }
.post-desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tag { background-color: #EEF2FF; color: var(--primary); font-size: 0.75rem; font-weight: 700; padding: 6px 14px; border-radius: 50px; border: none; }
.post-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; border-top: 1px dashed rgba(0,0,0,0.05); padding-top: 15px; }

/* Single Post & Messages */
.breadcrumb { font-size: 0.9rem; margin-bottom: 25px; font-weight: 500; background: #fff; display: inline-block; padding: 8px 16px; border-radius: 50px; box-shadow: var(--shadow-sm);}
.post-main-title { font-size: 2.5rem; margin-bottom: 30px; color: var(--header-text); font-weight: 800;}
.message-block { background: var(--card-bg); border: none; border-radius: var(--radius); margin-bottom: 25px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); overflow: hidden;}
@media(min-width: 640px) { .message-block { flex-direction: row; } }
.user-panel { background: #F8FAFC; padding: 30px 20px; display: flex; flex-direction: row; align-items: center; gap: 15px; }
@media(min-width: 640px) { .user-panel { width: 180px; flex-direction: column; text-align: center; flex-shrink: 0; } }
.user-panel img { width: 80px; height: 80px; border-radius: 24px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.user-name-side { font-weight: 700; font-size: 1.1rem; color: var(--header-text); margin-bottom: 4px;}
.user-stats { font-size: 0.8rem; color: var(--primary); font-weight: 600; background: #EEF2FF; padding: 4px 10px; border-radius: 12px;}
.message-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.message-header { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: center; flex-wrap: wrap; gap: 10px; border-bottom: 1px dashed rgba(0,0,0,0.05); padding-bottom: 15px;}
.message-date { font-size: 0.9rem; color: var(--text-muted); font-weight: 500;}
.message-text { font-size: 1.05rem; line-height: 1.8; color: var(--text-main); }
.badge { background: linear-gradient(135deg, #10B981 0%, #059669 100%); color: #fff; font-size: 0.75rem; padding: 4px 12px; border-radius: 50px; font-weight: 700; box-shadow: 0 4px 10px rgba(16,185,129,0.2);}
.reply-badge { font-size: 0.8rem; background: #FFFBEB; color: #D97706; padding: 6px 14px; border-radius: 50px; margin-bottom: 15px; display: inline-flex; font-weight: 600; }
.message-block.op-post { box-shadow: 0 15px 35px rgba(99,102,241,0.1); border: 2px solid #EEF2FF; }

.comments-header { font-size: 1.5rem; font-weight: 800; margin: 50px 0 25px 0; color: var(--header-text); }
.cta-box { background: #EEF2FF; border: none; border-radius: var(--radius); padding: 40px 30px; text-align: center; margin-top: 50px; }
.cta-title { font-size: 1.5rem; margin-bottom: 15px; color: var(--primary); font-weight: 800;}
.cta-text { font-size: 1rem; color: var(--text-main); margin-bottom: 0;}

/* Pagination & Footer */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.page-link { padding: 12px 18px; border: none; background: #fff; color: var(--text-main); border-radius: 12px; font-weight: 600; box-shadow: var(--shadow-sm); transition: 0.3s; }
.page-link:hover, .page-link.active { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.site-footer { background: #ffffff; border-top: none; box-shadow: 0 -10px 30px rgba(0,0,0,0.02); padding: 60px 20px; margin-top: auto; border-radius: 40px 40px 0 0;}
.footer-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 40px; }
@media(min-width: 768px) { .footer-container { grid-template-columns: repeat(3, 1fr); } }
.footer-title { color: var(--header-text); font-size: 1.2rem; margin-bottom: 20px; font-weight: 800; }