:root {
    --primary: #baff66; /* Яркий салатовый как на скриншоте */
    --primary-hover: #a5e65a;
    --bg-color: #fdfdfd;
    --card-bg: #ffffff;
    --card-dark: #111111;
    --text-main: #111827;
    --text-light-bg: #ffffff;
    --text-muted: #6b7280;
    --border-color: #f3f4f6;
    --header-bg: rgba(253, 253, 253, 0.8);
    --header-text: #111827;
    --radius: 24px; /* Большие скругления для карточек */
    --radius-pill: 50px; /* Для кнопок и инпутов */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.03);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px -10px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    overflow-x: hidden;
    /* Имитация фоновой сетки и зеленого свечения сверху */
    background-image: 
        radial-gradient(circle at 50% 15%, rgba(186, 255, 102, 0.35) 0%, rgba(253, 253, 253, 0) 50%),
        linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 60px 60px, 60px 60px;
    background-position: center top;
    background-attachment: fixed;
}

h1, h2, h3, h4, .logo {
    font-weight: 800;
    letter-spacing: -0.03em;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
a:hover { color: #84cc16; }
ul { list-style: none; }

.icon { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: middle; fill: currentColor; }

/* Header */
.site-header { 
    background: var(--header-bg); 
    color: var(--header-text); 
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.header-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.logo { font-size: 1.6rem; color: var(--header-text); display: flex; align-items: center; gap: 10px; }

/* Big Header Text */
.hero-title-area {
    max-width: 1000px; margin: 60px auto 40px auto; padding: 0 20px; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.hero-title-area h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 20px;
}

/* Search */
.search-wrapper { flex-grow: 1; max-width: 480px; position: relative; display: none; }
@media(min-width: 768px) { .search-wrapper { display: block; } }
.search-input { width: 100%; padding: 14px 110px 14px 24px; border-radius: var(--radius-pill); border: 1px solid var(--border-color); background: #ffffff; outline: none; font-size: 0.95rem; color: var(--text-main); box-shadow: var(--shadow-sm); transition: all 0.3s; }
.search-input:focus { border-color: #d1d5db; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.search-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--card-dark); color: #fff; border: none; padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: background 0.2s; }
.search-btn:hover { background: #333; }
.search-results { position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: var(--shadow); max-height: 350px; overflow-y: auto; display: none; z-index: 100; padding: 10px;}
.search-results.active { display: block; }
.search-item { display: block; padding: 12px 16px; border-radius: 12px; transition: background 0.2s; border-bottom: none; }
.search-item:hover { background: #f9fafb; }
.search-item-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; color: var(--text-main); }
.search-item-desc { font-size: 0.85rem; color: var(--text-muted); }

/* Nav Buttons */
.header-nav { display: flex; align-items: center; gap: 20px; }
.nav-btn { background: none; border: none; color: var(--text-main); cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.btn-primary { background: var(--primary); color: #000; padding: 10px 24px; border-radius: var(--radius-pill); font-weight: 700; border: none; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; box-shadow: 0 4px 15px rgba(186, 255, 102, 0.4); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(186, 255, 102, 0.6); color: #000; }

/* Main Layout */
.layout-container { max-width: 1200px; margin: 0 auto 60px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 30px; flex-grow: 1; width: 100%; z-index: 10; position: relative;}
@media(min-width: 860px) { .layout-container { flex-direction: row; } }
.main-content { flex-grow: 1; width: 100%; }
@media(min-width: 860px) { .main-content { width: 70%; } }
.sidebar { width: 100%; display: flex; flex-direction: column; gap: 25px; }
@media(min-width: 860px) { .sidebar { width: 30%; } }

/* Sidebar Cards */
.card, .card-dark { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 30px; margin-bottom: 20px; box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.card-dark { background-color: var(--card-dark); color: #ffffff; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.card-dark .widget-title { color: #ffffff; border-bottom: 1px solid rgba(255,255,255,0.1); }
.card-dark .stat-list li { border-bottom: 1px solid rgba(255,255,255,0.05); }
.card-dark .stat-list li span:first-child { color: #a1a1aa; }
.card-dark .stat-list li span:last-child { color: var(--primary); font-size: 1.4rem; font-weight: 800; }

.widget-title { font-size: 1.1rem; font-weight: 800; color: var(--text-main); border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; }
.stat-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 600; border-bottom: 1px solid #f9fafb; font-size: 0.95rem; }
.stat-list li:last-child { border-bottom: none; }
.random-links li { margin-bottom: 10px; font-weight: 500; line-height: 1.5; padding-bottom: 10px; font-size: 0.95rem;}
.random-links li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* Index Post List */
.page-title { font-size: 1.8rem; margin-bottom: 30px; font-weight: 800; color: var(--text-main); }
.post-list { display: grid; grid-template-columns: 1fr; gap: 20px; }

.post-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 25px; transition: all 0.3s; position: relative; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.post-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #e5e7eb; }

.post-item-top { display: flex; gap: 20px; margin-bottom: 15px; align-items: flex-start; }
.post-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: #f3f4f6; }
.post-title { font-size: 1.3rem; margin-bottom: 8px; line-height: 1.3; font-weight: 800; color: var(--text-main); }
.post-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; }
.post-divider { height: 1px; background-color: var(--border-color); width: 100%; margin: auto 0 20px 0; border: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.tag { background-color: #f3f4f6; color: var(--text-main); font-size: 0.75rem; font-weight: 700; padding: 6px 14px; border-radius: var(--radius-pill); transition: all 0.2s; }
.tag:hover { background-color: #e5e7eb; }

.post-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; align-items: center; }
.meta-item { display: flex; align-items: center; gap: 6px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 60px; }
.page-link { padding: 10px 18px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-muted); border-radius: var(--radius-pill); font-weight: 700; transition: all 0.2s; box-shadow: var(--shadow-sm); }
.page-link:hover { background: #f9fafb; color: var(--text-main); transform: translateY(-2px); }
.page-link.active { background: var(--card-dark); color: #fff; border-color: transparent; }

/* Single Post View */
.breadcrumb { font-weight: 600; font-size: 0.9rem; margin-bottom: 25px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.post-main-title { font-size: 2.2rem; margin-bottom: 30px; word-break: break-word; font-weight: 800; color: var(--text-main); line-height: 1.2; }

/* Post Message Block */
.message-block { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 25px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow 0.3s; }
.message-block:hover { box-shadow: var(--shadow); }
@media(min-width: 640px) { .message-block { flex-direction: row; } }

.user-panel { background: #fafafa; padding: 25px 20px; display: flex; flex-direction: row; align-items: center; gap: 20px; }
@media(min-width: 640px) { .user-panel { width: 200px; flex-direction: column; text-align: center; flex-shrink: 0; border-right: 1px solid var(--border-color); border-bottom: none; } }
.user-panel img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.user-stats { font-size: 0.8rem; color: var(--text-muted); line-height: 1.8; font-weight: 600; margin-top: 10px; }

.message-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.message-header { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: flex-start; flex-wrap: wrap; gap: 10px; padding-bottom: 15px; }
.user-name { font-weight: 800; font-size: 1.1rem; color: var(--text-main); display: flex; align-items: center; }
.badge { background: #f3f4f6; color: var(--text-main); font-size: 0.7rem; padding: 4px 10px; border-radius: var(--radius-pill); margin-left: 12px; font-weight: 700; letter-spacing: 0.5px; }
.message-date { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.message-text { font-size: 1.05rem; font-weight: 400; line-height: 1.8; color: #374151; }

/* OP gets a subtle highlight matching the SaaS green */
.message-block.op-post { background: #fcfff5; border-color: #e5f5c9; }
.message-block.op-post .user-panel { background: rgba(186, 255, 102, 0.05); border-right-color: #e5f5c9; }
.message-block.op-post .badge { background: var(--primary); color: #000; }

/* Comments */
.comments-header { font-size: 1.4rem; margin: 60px 0 30px 0; padding-bottom: 15px; font-weight: 800; color: var(--text-main); }
.comment { margin-bottom: 20px; scroll-margin-top: 100px; }
.comment.is-reply { margin-left: 20px; position: relative; }
.comment.is-reply::before { content: ''; position: absolute; left: -20px; top: 0; bottom: 0; width: 3px; background: #f3f4f6; border-radius: 3px; }
@media(min-width: 640px) { 
    .comment.is-reply { margin-left: 60px; } 
    .comment.is-reply::before { left: -30px; }
}
.reply-badge { font-size: 0.75rem; background: var(--card-dark); color: #fff; padding: 4px 10px; border-radius: var(--radius-pill); margin-left: 10px; font-weight: 600; }

/* Call to action */
.cta-box { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 50px 30px; text-align: center; margin-top: 60px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cta-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px; background: var(--primary); }
.cta-title { font-size: 1.8rem; margin-bottom: 15px; font-weight: 800; color: var(--text-main); }
.cta-text { font-size: 1rem; font-weight: 500; color: var(--text-muted); margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer { background: #ffffff; color: var(--text-muted); 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; }
@media(min-width: 768px) { .footer-container { grid-template-columns: repeat(3, 1fr); } }
.footer-title { color: var(--text-main); font-size: 1.1rem; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-text { line-height: 1.8; font-weight: 500; font-size: 0.95rem; }
.footer-text a { color: var(--text-main); text-decoration: none; font-weight: 600; }
.footer-text a:hover { color: var(--primary-hover); }