.header {
    position: sticky;
    top: 0;
    background: transparent;
    padding: 16px;
    padding-top: 8px;
    z-index: 1000;
}

body, input, button, textarea {
    font-family: 'Open Sans', sans-serif;
}

body {
    margin: 0;
}

* {
    box-sizing: border-box;
}

.headerMainFrame {
    margin: 1px 20px;
    padding: 5px 20px;
    background: #C2C2C2;
    border: 2px solid #e6e6e6;
    border-radius: 29px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.headerLogo {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
}

.headerSearch {
    flex: 1;
    text-align: center;
}

.headerAccount {
    display: flex;
    align-items: center;
}

.headerUserLink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #000 !important;
    text-decoration: none !important;
    font-weight: 600;
}

.headerUserLink:hover,
.headerUserLink:focus,
.headerUserLink:visited,
.headerUserLink:active {
    color: #000 !important;
    text-decoration: none !important;
}

.headerUserAvatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.mainButtonStyle {
    font-family: 'Open Sans';
    font-size: 16px;
    font-weight: bold;
    color: #000000 !important;
    padding: 15px 25px;
    border-radius: 5px;
    border: 0px ridge #f3c846;
    background: #dcdcdc;
}
.mainButtonStyle:hover {
    color: #000000 !important;
    background: #cecece;
}

.mainContent {
    padding: 30px 5px;
}

.contents {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.contentBlock {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 48%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.mobileToolbar {
    display: none;
}

.category{
    width: 30%;
}

.categoryColor{
    background: #C2C2C2;
}

.mainContents{
    width: 65%;
}

.newPost{
    padding: 15px 95px;
    font-size: 14px;
}

.categorySelector{
    margin-top: 20px;
}

.categoryRow {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.categoryRow + .categoryRow {
    margin-top: 10px;
}

.categoryButton {
    flex: 1;
    text-align: left;
}

.forma {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 16px;
}

.regLoginPanel {
    background: #C2C2C2;
    border-radius: 29px;
    padding: 40px 30px;
    width: min(350px, 100%);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

.panelTitle {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.regLoginPanel input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #aaa;
    box-sizing: border-box;
    text-align: center;
}

.regLoginPanel .mainButtonStyle {
    width: 100%;
}

.loginRedirect {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin-top: 10px;
}

.loginRedirect:hover {
    text-decoration: underline;
}

.authError {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f5b7b7;
    color: #6e1010;
    font-size: 14px;
    text-align: center;
}

.mainContentDiv{
    background: #C2C2C2;
    border-radius: 29px;
    padding: 4px 30px;
    width: 750px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.profileTiles {
    display: flex;
    align-items: center;
    gap: 15px;
    align-self: flex-start;
    text-align: left;
}

.profilePhoto {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.profileText {
    display: flex;
    flex-direction: column;
}

.profileTitle {
    font-size: 26px;
    font-weight: bold;
}

.profileSubtitle {
    font-size: 16px;
    color: #555;
}

.profileMini {
    font-size: 16px;
    color: #666;
}

.commentaryTitle {
    font-size: 16px;
    font-weight: bold;
}

.commentarySubtitle {
    font-size: 8px;
    color: #666;
}

.profileTiles {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profileLeft {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profileButtons {
    display: flex;
    gap: 8px;
}

.squareButton {
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profileInfoBlock {
    margin-right: 12px;
}

.profileButtons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profileButtonLevel {
    display: flex;
    gap: 8px;
}

.fastUpMargin {
    margin-top: 10px;
}

.fastDownMargin {
    margin-bottom: 10px;
}

.communicationInput {
    border: 0px solid #aaa;
    margin-left: 12px;
    width: 630px;
    height: 28px;
    text-align: left;
    background: transparent;
}

.commentarySection {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.commentaryPFP{
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.communicateButton {
    width: 32px;
    height: 32px;
}

.comments-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.comment-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.postHeaderTop {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.postHeaderAuthor {
    display: flex;
    align-items: center;
    gap: 15px;
}

.postManageButtons {
    display: flex;
    gap: 8px;
}

.postManageButtons form {
    margin: 0;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.comment-author-name {
    font-size: 16px;
    font-weight: bold;
}

.comment-author-status {
    font-size: 8px;
    color: #666;
}

.comment-text {
    padding-left: 33px;
    text-align: left;
}

.comment-text p {
    margin: 0;
    font-size: 14px;
}

.comment-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-divider {
    width: 100%;
    margin: 0;
    border: none;
    border-top: 1px solid #aaa;
}

.comment-like {
    align-self: flex-start;
}

.liked {
    color: red;
}

.editProfileTitle{
    font-size: 32px;
    margin: 10px;
}

.editProfileSubtitle{
    font-size: 16px;
}

.editProfileBlock{
    padding: 0px 30px;
}

.postCreateBlock {
    padding-bottom: 30px;
}

.editProfileInput {
    border: 0px solid #aaa;
    margin-bottom: 12px;
    width: 630px;
    height: 28px;
    text-align: left;
    background: transparent;
}

.postCreateInput {
    border: 2px solid #e2e2e2;
    border-radius: 12px;
    background: #adadad;
    color: #111;
    padding: 10px 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

textarea.postCreateInput {
    min-height: 140px;
    resize: vertical;
}

input.postCreateInput[type="file"] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    padding: 6px 8px;
    overflow: hidden;
}

input.postCreateInput[type="file"]::file-selector-button {
    margin-right: 10px;
}

.filePickerWrap {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.fileInputNative {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.filePickerButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e2e2;
    background: #c6c6c6;
    color: #111;
    white-space: nowrap;
    flex-shrink: 0;
}

.filePickerName {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

@media (max-width: 900px) {
    .header {
        padding: 8px;
    }

    .headerMainFrame {
        margin: 0;
        padding: 8px 12px;
        border-radius: 16px;
    }

    .logo {
        height: 44px;
    }

    .headerAccount a {
        font-size: 14px;
    }

    .mobileToolbar {
        display: flex;
        gap: 8px;
        padding: 0 8px;
        margin: 0 auto 12px auto;
        max-width: 1200px;
    }

    .mobileToolbar .mainButtonStyle {
        flex: 1;
        padding: 12px 8px;
        font-size: 14px;
    }

    .contents {
        flex-direction: column;
        gap: 12px;
        padding: 0 8px;
    }

    .contentBlock {
        width: 100%;
        padding: 14px;
    }

    .category {
        width: 100%;
        display: none;
    }

    .contents.sidebar-open .category {
        display: block;
    }

    .category .newPost {
        display: none;
    }

    .mainContents {
        width: 100%;
    }

    .mainContentDiv {
        width: 100%;
        padding: 10px 14px;
    }

    .profileTiles {
        flex-wrap: wrap;
        gap: 10px;
    }

    .profileLeft {
        min-width: 0;
    }

    .communicationInput,
    .editProfileInput {
        width: 100%;
        min-width: 0;
    }

    .comment-text {
        padding-left: 0;
    }

    .forma {
        min-height: calc(100vh - 90px);
        padding: 12px;
        align-items: flex-start;
    }

    .regLoginPanel {
        width: 100%;
        max-width: 420px;
        padding: 20px 16px;
        border-radius: 20px;
        gap: 12px;
    }

    .panelTitle {
        font-size: 16px;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    .regLoginPanel input {
        font-size: 16px;
        padding: 12px;
    }

    .regLoginPanel .mainButtonStyle {
        font-size: 15px;
        padding: 12px 14px;
    }

    .loginRedirect {
        font-size: 13px;
        margin-top: 4px;
    }
}
