:root {
    --bg-main: #dfe0e5;
    --bg-secondary: #c5c0c9;
    --accent: #8a7c9c;
    --dark: #4d3f72;
    --white: #fff;
    --text-dark: #2a2a2a;
    --text-light: #f3f3f3;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Comic Relief", system-ui;
    background-color: var(--bg-main);
    color: var(--text-dark);
}



/* Sidebar */
.sidebar {
    width: 200px;
    height: 100vh;
    background: var(--dark);
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 30px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}
.sidebar img {
    width: 170px;
    height: 80px;
    margin-left: 13px;
}

.sidebar h4 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 18px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 10px 20px;
}

.sidebar li a {
    text-decoration: none;
    display: block;
    color: var(--text-light);
    font-size: 16px;
    border-radius: 6px;
    padding: 10px;
    transition: background 0.3s, padding-left 0.3s;
}

.sidebar li a:hover {
    background-color: var(--accent);
    padding-left: 25px;
    color: var(--white);
}

/* Контент */
.content {
    margin-left: 220px;
    padding: 40px;
    background-color: var(--bg-main);
    min-height: 100vh;
    transition: margin-left 0.3s ease-in-out;
}

/* Пост */
.post-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 20px;
}

.post-text {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.post-image {
    width: 20%;
    max-height: 20%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Карточка поста */

.post-content {
    display: flex;
    flex-wrap: wrap;
    gap: 100px;
    justify-content: center;
}

.posts-body {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    width: calc(50% - 40px); /* 2 поста в ряд с отступами */
    max-width: 700px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.posts-body:hover {
    background: var(--accent);
    color: var(--white);
}

.posts-body a {
    text-decoration: none;
    color: inherit;
}

.posts-body a:hover h3 {
    text-decoration: none;
    color: var(--white);
}

.post-thumb {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}




/* Комментарии */
.comments-section {
    margin-top: 40px;
}

.comment-box {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--dark);
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;

}

.comment-user {
    font-weight: bold;
    font-size: 16px;
    color: var(--dark);
}
.comment-content {
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: anywhere; /* позволяет ломать слова в любом месте */
}






.comment-date {
    font-size: 14px;
    color: #666;
}

/* Форма комментариев */
.comment-form {
    background-color: var(--white);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-shadow: 0 0 6px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}
.comment-body {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.comment-body img{
    height: 30px;
    width: 30px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 16px;
    color: var(--dark);
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #aaa;
    padding: 12px;
    font-size: 16px;
    border-radius: 4px;
    resize: vertical;
}

.error-text {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}

.submit-button {
    background-color: var(--dark);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-button:hover {
    background-color: var(--accent);
}



.form-wrapper {
    background: var(--white);
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #aaa;
    font-size: 16px;
    background-color: var(--bg-secondary);
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--dark);
    outline: none;
}
.form-button{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.form-button img{
    height: 60px;
    width: 60px;
}
.generate-button{
    background-color: var(--dark);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;

}
.generate-button:hover {
    text-decoration: none;
    background-color: var(--accent);
    color:white;
}

.gp textarea {
  width: 50%;
  min-height: 30px; /* начальная высота */
  height: 40px;
  padding: 8px;
  font-size: 14px;
  box-sizing: border-box;
  line-height: 1.4;
}
.generate-forms {
display:flex;
flex-direction: row;
align-items:center;
gap: 20px;
flex-wrap: wrap; /* если на маленьком экране — переносит */
}