body {
    background: #fff;
    color: #000;
    font-family: monospace;
    margin: 0;
    padding: 20px;
}

.header {
    background: #0066cc;
    color: #fff;
    padding: 10px;
    margin-bottom: 20px;
}

.header a {
    color: #fff;
    margin-right: 15px;
    text-decoration: none;
}

.boards a.active {
    background: rgba(255,255,255,0.4);
    font-weight: bold;
    border-radius: 5px;
}

.boards {
    margin-top: 10px;
}

.thread {
    border: 1px solid #0066cc;
    margin: 10px 0;
    padding: 10px;
    background: #fff;
}

.thread-header {
    border-bottom: 1px solid #0066cc;
    padding-bottom: 5px;
    margin-bottom: 8px;
}

.thread-title {
    font-weight: bold;
    font-size: 1.1em;
}

.thread-replies {
    float: right;
    color: #666;
}

.op-name {
    color: #0066cc;
    font-size: 0.9em;
}

.op-date {
    color: #888;
    font-size: 0.8em;
    margin-left: 10px;
}

.op-content {
    margin-top: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.new-thread-form {
    background: #f0f7ff;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #0066cc;
}

.new-thread-form input,
.new-thread-form textarea {
    width: 100%;
    margin: 5px 0;
    padding: 8px;
    border: 1px solid #ccc;
    font-family: monospace;
    box-sizing: border-box;
}

button {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 5px;
}

button:hover {
    background: #0052a3;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.reply-link {
    display: inline-block;
    margin-top: 10px;
    color: #0066cc;
    text-decoration: none;
}

.reply-link:hover {
    text-decoration: underline;
}

/* Страница треда */
.thread-container {
    max-width: 900px;
    margin: 0 auto;
}
/* Обрезка текста епт */
.truncation-dots {
    opacity: 0.5;
    font-weight: normal;
}

.op-post {
    background: #f0f7ff;
    border: 2px solid #0066cc;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.replies {
    margin-top: 20px;
}

.reply {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    background: #fafafa;
}

.reply:hover {
    background: #f5f5f5;
}

.reply-form {
    background: #f0f0f0;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
}

.reply-form input,
.reply-form textarea {
    width: 100%;
    margin: 5px 0;
    padding: 8px;
    border: 1px solid #ccc;
    font-family: monospace;
    box-sizing: border-box;
}

.post-header {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.post-name {
    font-weight: bold;
    color: #0066cc;
}

.post-number {
    color: #888;
    font-size: 0.8em;
    margin-left: 8px;
    display: none;
}

.post-date {
    margin-left: 10px;
    font-size: 0.85em;
}

.post-content {
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.empty-replies {
    color: #888;
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
}

/* Поиск */

.search-container {
    display: inline-block;
    margin-left: 15px;
}

.search-input {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.search-button {
    padding: 5px 10px;
    margin-left: 5px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-button {
    background: #666;
    padding: 5px 12px;
    width: auto;
}

mark {
    background: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
}

.thread-board {
    font-size: 12px;
    color: #0066cc;
    background: #e6f0ff;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* mobile */
@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 15px;
    }
    
    .header {
        padding: 12px;
        margin: -10px -10px 15px -10px;
    }

/*Поиск*/
    .search-container {
        display: block;
        margin: 10px 0 0 0;
        width: 100%;
    }
    
    .search-input {
        width: calc(100% - 180px); /*-70 classic*/
    }
    
    .search-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header img[alt="Telegram"] {
        height: 24px;
    }
    
    .header > div {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .header img {
        height: 40px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    /* Категории */
    .boards {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        margin-top: 8px;
    }
    
    .boards a {
        font-size: 13px;
        padding: 4px 10px;
        background: rgba(255,255,255,0.2);
        border-radius: 20px;
        white-space: nowrap;
    }
    
    /* Форма создания треда */
    .new-thread-form {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .new-thread-form h3 {
        font-size: 16px;
        margin: 0 0 8px 0;
    }
    
    .new-thread-form input,
    .new-thread-form textarea {
        font-size: 14px;
        padding: 8px 10px;
        margin: 6px 0;
        border-radius: 8px;
    }
    
    .new-thread-form textarea {
        min-height: 60px;
    }
    
    .new-thread-form button {
        font-size: 14px;
        padding: 8px;
        border-radius: 8px;
        margin-top: 6px;
    }
    
    /* Карточка треда */
    .thread {
        padding: 12px;
        margin: 12px 0;
        border-radius: 12px;
    }
    
    .thread-header {
        margin-bottom: 8px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: baseline;
        gap: 6px;
    }
    
    .thread-title {
        font-size: 16px;
        font-weight: bold;
    }
    
    .thread-replies {
        font-size: 12px;
        padding: 2px 8px;
        background: #f0f0f0;
        border-radius: 12px;
        color: #666;
    }
    
    .thread-op {
        margin-top: 6px;
    }
    
    .op-name {
        font-size: 13px;
    }
    
    .op-name strong {
        font-size: 14px;
    }
    
    .op-date {
        font-size: 11px;
        margin-left: 6px;
        color: #888;
    }
    
    .op-content {
        font-size: 14px;
        line-height: 1.4;
        margin-top: 8px;
    }
    
    /* Кнопка ответить */
    .reply-link {
        font-size: 14px;
        padding: 8px;
        margin-top: 10px;
        border-radius: 10px;
        text-align: center;
        display: block;
        background: #0066cc;
        color: white;
        text-decoration: none;
    }
    
    /* Страница треда */
    .op-post {
        padding: 12px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .post-header {
        font-size: 13px;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }
    
    .post-name {
        font-size: 15px;
    }
    
    .post-number, .post-date {
        font-size: 11px;
    }
    
    .post-content {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .reply-form {
        padding: 12px;
        margin: 15px 0;
    }
    
    .reply-form input,
    .reply-form textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    .reply {
        padding: 12px;
        margin: 10px 0;
        border-radius: 10px;
    }
    
    .reply .post-name {
        font-size: 14px;
    }
    
    .reply .post-content {
        font-size: 13px;
    }
    
    .replies h3 {
        font-size: 18px;
        margin: 15px 0 10px;
    }
}
