/* ==========================================
   MAIN.CSS — СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ ФОРУМА
   ========================================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}


/* ===== ГЛОБАЛ ===== */
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", sans-serif;
    background: #d0daec;
    color: #1a1a1a;
}

img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    object-fit: contain;
}

:root {
    --blue-soft: #d5e7ee;
    --blue-dark: #3c5e77;
    --blue-accent: #4a8dbf;
    --panel-bg: #ffffff;
    --border-light: #d1d9e0;
    --shadow-soft: 0 4px 12px rgba(0,0,0,0.08);
}

.container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   HEADER — уменьшен в 2 раза, по центру
   ========================================== */
/* ==========================================
   HEADER / NAVIGATION — CLEAN VERSION
   ========================================== */

/* HEADER */
.header {
    background: #6b88a6;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* LOGO */
.logo img {
    height: 52px;
}

/* ===============================
   MAIN NAV (DESKTOP)
   =============================== */

.nav {
    justify-self: center;
}

#mainMenu,
#menu {
    list-style: none;           /* ❗ УБИРАЕМ ТОЧКИ */
    display: flex;              /* ❗ ГОРИЗОНТАЛЬНО */
    align-items: center;
    gap: 26px;
    margin: 0;
    padding: 0;
}

#mainMenu li,
#menu li {
    list-style: none;
}

#mainMenu a,
#menu a {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 0;
    white-space: nowrap;
}

#mainMenu a:hover,
#menu a:hover {
    color: #ffd966;
}

/* ===============================
   RIGHT AREA
   =============================== */

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 30px;
}

/* ===============================
   BURGER
   =============================== */

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: #313b44;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: #fff;
}

.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }

/* ===============================
   USER MENU (SEPARATE!)
   =============================== */

.user-menu {
    position: relative;
}

#userMenuBtn {
    background: #2f3b45;
    color: #ffe066;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

#userMenuBtn:hover {
    background: #3b4a56;
}

/* DROPDOWN */
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 19px);
    right: 0;
    width: 190px;
	background: #a3cce3;
    border-radius: 2px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: all .25s ease;
}

.user-menu-dropdown.show {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
}

.user-menu-dropdown a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: #333b43;
    text-decoration: none;
    border-bottom: 1px solid #313b44;
}

.user-menu-dropdown a:hover {
    background: #f3f6ff;
}

.user-menu-dropdown a:last-child {
    border-bottom: none;
}

/* ===============================
   MOBILE
   =============================== */

@media (max-width: 960px) {

    /* скрываем desktop nav */
    .nav {
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
		margin-left: unset;
    }

    #mainMenu,
    #menu {
        flex-direction: column;
        background: #7fa5b8;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }

    #mainMenu.active,
    #menu.active {
        max-height: 600px;
    }

    #mainMenu li,
    #menu li {
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255,255,255,.2);
    }

    #mainMenu a,
    #menu a {
        display: block;
        padding: 14px 0;
    }

    /* показываем гамбургер */
    .nav-toggle {
        display: block;
    }

    /* mobile-only пункты */
    .mobile-only {
        display: block;
    }
}




/* ---------------------------- */
/*      LOGIN / REGISTER        */
/* ---------------------------- */

/* --------------- */
/* HEADER BUTTONS  */
/* --------------- */

.login-btn,
.register-btn {
    padding: 7px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: 0.25s ease;
    white-space: nowrap;
    margin-left: 12px;
}

/* LOGIN (в хедере) — прозрачная */
.login-btn {
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(4px);
}

.login-btn:hover {
    background: rgba(255,255,255,0.22);
    border-color: #ffffff;
}

/* REGISTER (в хедере) */
.register-btn {
    background: #6b8cad;
    color: #ffffff;
    border: 2px solid #84f5ff;
}

.register-btn:hover {
    background: #466c92;
    border-color: #a3ffc5;
    box-shadow: 0 0 12px rgba(46, 170, 93, 0.4);
}

/* -------------------------- */
/* LOGIN BUTTON (внутри формы) */
/* -------------------------- */

.auth-login-btn {
    width: 100%;
    background: #4c7fff;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.25s ease;
}

.auth-login-btn:hover {
    background: #3a6be0;
}

/* -------------------------- */
/* USER LINK                  */
/* -------------------------- */

.user-link {
    color: #2769ff;
    font-weight: 600;
    text-decoration: none;
}

.user-link:hover {
    text-decoration: underline;
}




.ccc {
	text-align: center;
	margin: 0 auto;
	margin-top: -94px;
}


.rig {
	text-align: center;
}


/* ==========================================
   WELCOME BLOCK
   ========================================== */
.welcome {
    width: 100%;
    background: var(--blue-soft);
    padding: 40px 0;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.welcome h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
    color: #234;
}

.welcome p {
    margin-top: 12px;
    font-size: 17px;
    opacity: 0.85;
}

/* ==========================================
   BREADCRUMBS
   ========================================== */
.breadcrumbs {
    margin: 20px auto;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444;
}

.breadcrumbs a {
    text-decoration: none;
    color: var(--blue-accent);
    font-weight: 600;
}

/* ==========================================
   FORUM LAYOUT
   ========================================== */

.forum {
    display: flex;
    gap: 25px;
}

.forum-left {
    flex: 1;
	margin-right: 30px;
}

.forum-right {
    width: 320px;
    flex-shrink: 0;
}

/* категории */
.forum-category {
    background: var(--panel-bg);
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-soft);
}

.cat-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--border-light);
}

/* элементы форума */
.forum-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 6px;
    text-decoration: none;
    color: #383838;
    transition: 0.15s;
    box-shadow: 2px 2px 4px -2px rgb(0 0 0);
	background-color: #a7c9ff;
	margin-top: 16px;
}

.forum-item:hover {
    background: #98bc9e;
}

.icon img {
    width: 30px;
    opacity: 0.8;
}

.item-info {
    flex: 1;
    padding: 0 15px;
}

.item-title {
    font-size: 17px;
    font-weight: 600;
}

.item-sub {
    opacity: 0.6;
    font-size: 14px;
    margin-top: 2px;
}

.item-stats {
    text-align: right;
    font-size: 13px;
    opacity: 0.7;
    min-width: 80px;
}

/* ==========================================
   RIGHT SIDEBAR
   ========================================== */

.widget {
    background: var(--panel-bg);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.msg {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.msg:last-child {
    border-bottom: none;
}

.msg-user {
    font-weight: 600;
}

.msg-text {
    font-size: 14px;
    opacity: 0.75;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    padding: 25px 0;
    margin-top: 40px;
    background: #e9f2f7;
    text-align: center;
    font-size: 14px;
}

.footer-links a {
    margin: 0 10px;
    color: #444;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 960px) {

    .forum {
        flex-direction: column;
    }

    .forum-right {
        width: 100%;
    }

    /* header-right ОСТАЁТСЯ */
    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* показываем гамбургер */
    .nav-toggle {
        display: block;
    }

    .logo img {
        height: 40px;
    }
}


/* ==========================================
   AUTH FORMS
   ========================================== */

.auth-box {
    width: 380px;
    margin: 120px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.auth-box h2 {
    margin-bottom: 25px;
    text-align: center;
}

.auth-box form label {
    display: block;
    margin: 8px 0 4px;
    font-weight: 600;
}

.auth-box input {
    width: 95%;
    padding: 11px;
    border-radius: 8px;
    border: 1px solid #bbb;
    margin-bottom: 15px;
}

.auth-error {
    background: #ffdedf;
    color: #d60000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* ==========================================
   PROFILE / POST AVATARS
   ========================================== */

.profile-header img {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover !important;
}

.post-user img {
    width: 55px !important;
    height: 55px !important;
    border-radius: 6px;
    object-fit: cover !important;
}

.sp {}





.site-footer {
    background: #1a1f24;
    color: #c9d1d9;
    padding: 45px 0 25px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-family: system-ui, sans-serif;
    flex-shrink: 0; /* Футер остаётся внизу */
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-left {
    flex: 1 1 270px;
}

.footer-logo img {
    width: 70px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.footer-desc {
    opacity: 0.7;
    font-size: 14px;
    line-height: 1.5;
}

/* Links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 15px;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #5cc97b;
}

/* Social icons */
.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a svg {
    width: 26px;
    height: 26px;
    fill: #c9d1d9;
    opacity: 0.7;
    transition: 0.25s ease;
}

.footer-social a:hover svg {
    opacity: 1;
    fill: #5cc97b;
}

/* Bottom strip */
.footer-bottom {
    margin-top: 35px;
    padding-top: 15px;
    text-align: center;
    font-size: 14px;
    opacity: 0.6;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* Responsive */
@media (max-width: 760px) {
    .footer-container {
        flex-direction: column;
    }
}




.global-chat {
    border-left: 4px solid #4CAF50 !important;
    background: #f8fff8;
}

.global-chat:hover {
    background: #efffef;
}







.uve {
	background-color: #323a42;
    padding: 4px;
    border-radius: 4px;
    font-weight: bold;
    color: #ffbc00;
}






.layout {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 80px); /* высота минус header */
    width: 100%;
    background: #f4f6f8;
}

/* САЙДБАР — ВСЯ ВЫСОТА ДО ФУТЕРА */
.sidebar {
    width: 220px;
    background: #1f2633;
    color: #fff;
    padding-top: 20px;
    flex-shrink: 0;

    display: flex;
    flex-direction: column;
    min-height: 100%;   /* растягивается */
}

/* Заголовок в sidebar */
.sidebar h2 {
    padding-left: 20px;
    font-size: 20px;
    margin-bottom: 20px;
}

/* Ссылки меню */
.sidebar a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #cfd6e4;
    border-left: 3px solid transparent;
    transition: 0.2s ease;
}

.sidebar a:hover {
    background: #2a3243;
    border-left-color: #4aa3ff;
    color: #fff;
}

/* ПРАВАЯ ЧАСТЬ — КОНТЕНТ */
.content {
    flex: 1;
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* чтобы чат не прилипал к верху чрезмерно */
}


    .chat-wrapper {
        background: #fff;
        width: 100%;
        max-width: 900px;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.12);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .chat-header {
        padding: 15px 20px;
        background: #fafbff;
        border-bottom: 1px solid #e1e5ee;
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .chat-header-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        object-fit: cover;
    }

    .chat-window {
        flex: 1;
		background-image: url(/img/chat-bg.jpg);
        padding: 15px 20px;
        overflow-y: auto;
		min-height: 300px;
    }

    .chat-message {
        max-width: 70%;
        padding: 10px 12px;
        border-radius: 12px;
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 1.4;
    }

    .chat-message.them {
        background: #fff;
        border: 1px solid #e1e5ee;
        margin-right: auto;
        border-bottom-left-radius: 4px;
    }

    .chat-message.me {
    background: #caf3ff;
    color: #000000;
    border-bottom-right-radius: 4px;
    margin-left: auto;
    }

    .chat-message .time {
        display: block;
        margin-top: 4px;
        font-size: 11px;
        opacity: 0.7;
    }

    .chat-composer {
        border-top: 1px solid #e1e5ee;
        padding: 12px 15px;
        background: #fff;
    }

    .btn-send {
        background: #3498ff;
        padding: 10px 20px;
        color: #fff;
        border-radius: 6px;
        margin-top: 8px;
        border: none;
        cursor: pointer;
    }

    .btn-send:hover {
        background: #1f82e3;
    }

.main {
    margin-left: 60px;
    padding: 30px;
    width: 100%;
}
.main-bans {
	padding: 30px;
    margin: 0 auto;
    width: 80%;
    background-color: #aebed2;
    color: #232323;
    margin-top: 60px;
}

h1 {
    font-size:26px;
    color:#2c3e50;
}

.user-card {
    background:#d2e7eb;
    padding:20px;
    border-radius:10px;
    margin-bottom:15px;
    display:flex;
    align-items:center;
    box-shadow:0 3px 10px rgba(0,0,0,0.15);
    cursor:pointer;
    transition:.2s;
}
.user-card:hover { background:#c6e0e5; }
.user-card.unread { background:#ffe0e0; }

.user-avatar {
    width:70px; height:70px;
    border-radius:50%;
    margin-right:20px;
    object-fit:cover;
}
.username {
    font-size:20px; font-weight:bold;
}
.unread-count {
    background:#ff4a4a;
    padding:6px 10px;
    border-radius:6px;
    color:white;
    font-weight:bold;
}
.delete-btn {
    background:#ff3b3b;
    border:none;
    color:white;
    padding:8px 12px;
    border-radius:6px;
    cursor:pointer;
}
.delete-btn:hover {
    background:#d92a2a;
}


/* ===========================
   LATEST POSTS — FIXED & CLEAN
=========================== */

.widget.latest-posts {
    padding: 15px 18px 18px 18px;
}

/* каждый пост */
.latest-post-item {
    display: block;              /* ← фиксируем ширину */
    width: 100%;                 /* ← растягиваем на весь контейнер */
    box-sizing: border-box;      /* ← учитываем padding */

    padding: 12px 0;
    border-bottom: 1px solid #e8edf3;
    text-decoration: none;
}

.latest-post-item:last-child {
    border-bottom: none;
}

/* заголовок */
.latest-post-item-title {
    font-weight: 600;
    font-size: 15px;
    color: #3b7cc4;
    margin-bottom: 3px;

    white-space: normal;
}

/* сниппет */
.latest-post-snippet {
    font-size: 13px;
    color: #555;
    opacity: .8;
    line-height: 1.35;

    display: -webkit-box;
    -webkit-line-clamp: 2; /* максимум 2 строки */
    -webkit-box-orient: vertical;
    overflow: hidden;

    white-space: normal !important; /* ← важно */
}


/* REPORT BLOCK */
.report {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #d0d6e0;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    position: relative;
}
.report img {
    max-width: 320px;
    margin-top: 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
}
.del-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4a4a;
    color: white;
    border: none;
    padding: 7px 13px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.username {
    color: #0066cc;
    font-weight: bold;
}
