html {
    overflow: -moz-scrollbars-vertical;
}

body {
    background: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #3c3d3f;
    text-align: left;
    max-width: 60%;
    margin: auto;
}

.site-header {
    display: flex;
    margin-top: 36px;
    height: 64px;
    justify-content: space-between;
    align-items: center;
}

#title {
    color: #000000;
    text-decoration: none;
    margin: 0px;
    font-size: 32px;
}

#app {
    border: 2px dashed #9ca3af;
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
    background: #ffffff;
}

.thumb {
    display: block;
    width: 100%;
    max-height: 600px;
    height: auto;
    object-fit: contain;
    background: #f6f6f6;
    border-radius: 8px;
}

.site-footer {
    margin-top: 20px;
    text-align: center;
    color: #6b7280;
}

.alert {
    color: red;
}

[hidden] {
    display: none !important;
}

#app > * {
    margin-top: 16px;
}

.gallery {
    margin-top: 8px;
    padding: 8px 0;
}

.gallery_nav, 
.comments_nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0;
}

.comments_info {
    opacity: 0.85;
    font-size: 18px;
}

button,
.btn {
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
    color: #3c3d3f;
    background: #f7f8fa;
    border: 1px #3c3d3f solid;
    padding: 10px 10px 10px 10px;
    cursor: pointer;
}

button:hover,
.btn:hover {
    background: #3c3d3f;
    color: #ffffff;
}

button:active,
.btn:active {
    transform: translateY(1px);
}

button[disabled],
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

#toggle_add_image {
    margin-bottom: 8px;
}

.complex_form,
.comment_form {
    display: block;
    padding: 12px;
    border: 1px solid #e6e8eb;
    border-radius: 12px;
    background: #fafbfc;
}

.form_title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.form_element {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.form_element:focus {
    outline: 2px solid #7bb2ff;
    outline-offset: 1px;
    border-color: #98bdf5;
}

.comment_form .btn,
.complex_form .btn {
    margin-top: 4px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-top: 8px;
}

.meta h3 {
    order: 1;
    margin: 0;
    font-size: 24px;
}

.meta .delete_btn {
    order: 2;
    margin-left: auto;
    font-size: 15px;
}

.meta .author {
    order: 3;
    flex-basis: 100%;
    margin: 0;
    font-size: 20px;
}

.comment_list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.comment_item {
    padding: 8px 0;
    border-bottom: 1px solid #eef1f4;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.comment_author {
    font-weight: bold;
    font-size: 18px;
}

.comment_content {
    font-size: 16px;
    padding: 5px 15px;
}

.comment_date {
    color: #8a8f96;
    font-size: 12px;
}

.delete_comment_btn {
    margin-left: auto;
}

button:focus,
a:focus,
.form_element:focus {
    outline: 2px solid #4c9ffe;
    outline-offset: 2px;
}

#comments {
    display: flex;
    flex-direction: column;
}

#comments #add_comment_form {
    order: 1;
    margin-top: 8px;
    margin-bottom: 8px;
}

#comments .comments_nav {
    order: 2;
}

#comments #comment_list,
#comments .comments_empty {
    order: 3;
}

#auth-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
}

.auth-form .form_element {
    width: 400px;
}

.auth-form .btn,
.auth-form button {
    width: 100px;
}