/* =========================================
   DESIGN 1: DARK PORTFOLIO UI (Оранжевый/Темный)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&display=swap');

:root {
    --primary: #FF6B00; /* Яркий оранжевый */
    --primary-hover: #FF8833;
    --bg-gradient: #0D0D0D; /* Почти черный фон */
    --card-bg: #1A1A1A; /* Темно-серые карточки */
    --card-dark: #141414;
    --text-main: #F3F4F6; /* Светлый текст */
    --text-muted: #9CA3AF;
    --border-color: #2E2E2E; /* Темные границы */
    --header-bg: #1A1A1A;
    --header-text: #FFFFFF;
    --radius: 12px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --accent-green: #FFB800; /* Желтый акцент вместо зеленого */
}

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

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; color: var(--header-text); letter-spacing: -0.5px;}
a { text-decoration: none; color: var(--primary); transition: color 0.3s; }
a:hover { color: var(--primary-hover); }
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); border-bottom: 1px solid var(--border-color);
    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.6rem; font-weight: 800; color: var(--header-text); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 1px;}
.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: 30px; 
    border: 1px solid var(--border-color); background: #141414; outline: none; 
    font-size: 0.95rem; color: #fff; transition: all 0.3s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.15); }
.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: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); margin-top: 12px; box-shadow: var(--shadow-md); max-height: 350px; overflow-y: auto; display: none; }
.search-results.active { display: block; }
.search-item { display: block; padding: 15px 20px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
.search-item:hover { background-color: #222; }
.search-item-title { font-weight: 700; font-size: 1rem; margin-bottom: 4px; color: var(--primary); }
.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: 500; display: flex; align-items: center; gap: 8px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px;}
.nav-btn:hover { color: var(--primary); }
.btn-primary { 
    background: linear-gradient(90deg, #FF6B00, #FFB800); color: #000; 
    padding: 10px 24px; border-radius: 30px; font-weight: 800; border: none; 
    cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.3s; 
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 107, 0, 0.4); color: #000; }

/* 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: 24px; }
@media(min-width: 860px) { .sidebar { width: 28%; } }

/* Sidebar Cards */
.card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.card-dark { background: var(--card-dark); border: none; }
.widget-title { font-size: 1.2rem; border-bottom: none; padding-bottom: 0; margin-bottom: 20px; color: var(--header-text); display: flex; align-items: center; gap: 10px; }
.widget-title::before { content: ""; display: inline-block; width: 4px; height: 18px; background: var(--primary); border-radius: 2px;}
.stat-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-weight: 500; border-bottom: 1px solid var(--border-color); font-size: 0.95rem;}
.stat-list li span:first-child { color: var(--text-muted); }
.stat-list li span:last-child { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.random-links li { margin-bottom: 15px; font-weight: 500; font-size: 0.95rem; border-left: 2px solid transparent; padding-left: 10px; transition: 0.2s; }
.random-links li:hover { border-color: var(--primary); padding-left: 15px; }

/* Index Post List */
.page-title { font-size: 2.5rem; margin-bottom: 30px; color: var(--header-text); font-weight: 800; text-transform: uppercase; letter-spacing: 1px;}
.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; display: flex; flex-direction: column; transition: 0.3s; }
.post-item:hover { border-color: var(--primary); transform: translateX(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: 12px; object-fit: cover; border: 2px solid var(--border-color); }
.post-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.post-title a { color: var(--header-text); }
.post-title a:hover { color: var(--primary); }
.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: rgba(255, 107, 0, 0.1); color: var(--primary); font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: 4px; border: 1px solid rgba(255,107,0,0.3); text-transform: uppercase;}
.post-meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.9rem; color: var(--text-muted); font-weight: 500; border-top: 1px solid var(--border-color); padding-top: 15px; }

/* Single Post View & Messages */
.breadcrumb { font-size: 0.95rem; margin-bottom: 25px; color: var(--text-muted); }
.post-main-title { font-size: 2.2rem; margin-bottom: 25px; color: var(--primary); text-transform: uppercase;}
.message-block { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 20px; display: flex; flex-direction: column; overflow: hidden;}
@media(min-width: 640px) { .message-block { flex-direction: row; } }
.user-panel { background: var(--card-dark); padding: 25px 15px; display: flex; flex-direction: row; align-items: center; gap: 15px; }
@media(min-width: 640px) { .user-panel { width: 180px; 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: 12px; border: 2px solid var(--primary); margin-bottom: 10px; }
.user-name-side { font-weight: 800; font-size: 1.1rem; color: #fff; margin-bottom: 5px; }
.user-stats { font-size: 0.8rem; color: var(--text-muted); }
.message-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.message-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px;}
.message-date { font-size: 0.9rem; color: var(--text-muted); }
.message-text { font-size: 1.05rem; line-height: 1.7; color: var(--text-main); }
.badge { background: var(--primary); color: #000; font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; font-weight: 800; text-transform: uppercase;}
.reply-badge { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-muted); padding: 6px 12px; border-radius: 4px; margin-bottom: 15px; display: inline-flex; font-size: 0.85rem;}
.message-block.op-post { border-left: 4px solid var(--primary); border-top: 1px solid var(--border-color); }

.comments-header { font-size: 1.5rem; font-weight: 800; margin: 50px 0 25px 0; color: #fff; text-transform: uppercase; }
.cta-box { background: var(--card-bg); border: 1px solid var(--primary); border-radius: var(--radius); padding: 40px 20px; text-align: center; margin-top: 50px; box-shadow: 0 0 20px rgba(255,107,0,0.1); }
.cta-title { font-size: 1.5rem; margin-bottom: 15px; color: #fff; font-weight: 800; }
.cta-text { font-size: 1rem; color: var(--text-muted); margin-bottom: 25px; }

/* Pagination & Footer */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.page-link { padding: 10px 16px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-main); border-radius: 8px; font-weight: 700; transition: 0.3s; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: #000; border-color: var(--primary); }
.site-footer { background: var(--header-bg); border-top: 1px solid var(--border-color); padding: 60px 20px; margin-top: auto; }
.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: #fff; font-size: 1.2rem; margin-bottom: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;}