body {
    margin: 0;
    font-family: Verdana, Arial, sans-serif;
    background-color: #4081f2;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    color: #111;
    font-size: 13px;
}

.header {
    height: 48px;
    background: #123d78;
    border-bottom: 3px solid #09274e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    box-sizing: border-box;
}

.site-title {
    color: white;
    font-size: 22px;
    font-weight: bold;
}

.header-buttons {
    display: flex;
    gap: 5px;
}

.header-button {
    background: #3569aa;
    color: white;
    border: 1px solid #0a2d59;
    padding: 6px 12px;
    cursor: pointer;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
}

.header-button:hover {
    background: #477dbb;
}

.banner {
    width: 768px;
    max-width: 100%;
    height: 80px;
    display: block;
    object-fit: cover;
    margin: 0 auto;
    background: white;
}


/* MAIN FORUM LAYOUT */

.forum-layout {
    max-width: 1200px;
    margin: 10px auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0 10px;
    box-sizing: border-box;
}


/* SIDEBAR */

.sidebar {
    width: 180px;
    flex-shrink: 0;
    background: #eeeeee;
    border: 1px solid #888;
    box-sizing: border-box;
}

.sidebar-title {
    background: #17467f;
    color: white;
    font-weight: bold;
    padding: 7px 8px;
    border-bottom: 1px solid #0c2c52;
}

.sidebar a,
.sidebar button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 0;
    border-bottom: 1px solid #c2c2c2;
    background: #eeeeee;
    color: #0645a5;
    text-decoration: none;
    text-align: left;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.sidebar a:hover,
.sidebar button:hover {
    background: #d5e3f4;
    color: #000080;
}


/* MAIN CONTENT */

.main-content {
    flex: 1;
    min-width: 0;
}

.forum-header {
    background: #17467f;
    color: white;
    font-weight: bold;
    padding: 8px 10px;
    border: 1px solid #092d58;
    margin-bottom: 5px;
}


/* POST */

.post {
    background: white;
    border: 1px solid #999;
    margin-bottom: 8px;
}

.post-title {
    background: #e5e5e5;
    border-bottom: 1px solid #aaa;
    padding: 8px;
    font-size: 15px;
    font-weight: bold;
    color: #0645a5;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.post-title:hover {
    text-decoration: underline;
}

.post-meta {
    background: #f3f3f3;
    border-bottom: 1px solid #ccc;
    padding: 5px 8px;
    font-size: 11px;
    color: #666;
}

.post-content {
    padding: 10px;
    overflow-wrap: anywhere;
    line-height: 1.4;
}


/* VOTING */

.vote {
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    padding: 0 3px;
    color: #777;
}

.vote:hover {
    color: #000;
}

.score {
    color: #d35400;
    font-weight: bold;
}

.active {
    color: #ff0000;
}


/* CREATE / ACCOUNT BOXES */

.create {
    display: none;
    background: white;
    border: 1px solid #888;
    margin-bottom: 10px;
    padding: 10px;
}

.create h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #17467f;
}

input,
textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px;
    margin-top: 4px;
    margin-bottom: 8px;
    border: 1px solid #999;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
}

textarea {
    resize: vertical;
}

button {
    cursor: pointer;
}

.create button {
    background: #3569aa;
    color: white;
    border: 1px solid #173b68;
    padding: 6px 12px;
    margin-right: 4px;
}

.create button:hover {
    background: #477dbb;
}

.news-checkbox {
    display: block;
    margin-bottom: 10px;
}

.news-checkbox input {
    width: auto;
    margin: 0 5px 0 0;
}


.post-meta img {
    height: 1em;
    vertical-align: middle;
    margin-left: 2px;
}



.commentBox {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #888;
}

.commentBox h3 {
    margin: 0 0 10px 0;
    color: #17467f;
}

.comments {
    background: white;
    border: 1px solid #888;
    margin-bottom: 10px;
    padding: 0;
}

.comments .forum-header {
    margin: 0;
    border: none;
    border-bottom: 1px solid #888;
}

#comments {
    padding: 0 10px;
}

.comment {
    border-top: 1px solid #ddd;
    padding: 10px 0;
    margin: 0;
}

.comment:first-child {
    border-top: none;
}

.comment-author {
    font-weight: bold;
    color: #0055aa;
}

.comment-date {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
}

.comment-content {
    margin-top: 6px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.header-user {
    color: white;
    font-size: 11px;
    margin-right: 8px;
    white-space: nowrap;
}

.post-title img,
.post-meta img,
.comment-author img {
    height: 1em;
    width: auto;
    vertical-align: middle;
}


body[data-page="create"] #createBox {
    display: block;
}

body[data-page="login"] #accountBox {
    display: block;
}

@media (max-width: 650px) {

    .forum-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar a,
    .sidebar button {
        display: inline-block;
        width: auto;
        border-right: 1px solid #c2c2c2;
    }

    .sidebar-title {
        width: 100%;
    }

    .main-content {
        width: 100%;
    }

}
