body {
    margin: 0;
    font-family: Arial;
    background-color: #151515;
    color: rgb(169, 169, 169);
}

a {
    color: rgb(128, 174, 255);
    text-decoration: none;
}
.defdiv {
    background-color: #1f1f1f;
    padding: 15px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 210px;
    height: 100vh;
    background-color: rgb(44, 44, 44);
    padding: 5px;
}

.content {
    margin-left: 220px;
    padding: 20px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}

.postdiv {
    padding: 5px;
}

.clickpost {
    color: inherit;
    text-decoration: none;
    cursor: default;
}

.post-data {
    font-size: small;
}

.post-content {
    font-size: large;
}

.pcontent {
    width: 40%;
    height: 40%;
    position: relative;
    font-family: Arial;
}

.post {
    padding: 15px;
    background-color: #1f1f1f;
}

.response {
    padding: 5px;
    margin-top: 10px;
    background-color: #1b1b1b;
}

.response-data {
    font-size: small;
}

.response-content {
    font-size: large;
}
.account {
    width: 100%;
}

.account button {
    display: inline-block;
    width: auto;
    padding: 5px 10px;
    margin: 0;
}

.account input {
    width: 180px;
    box-sizing: border-box;
    margin-bottom: 5px;
}

.account form {
    width: 100%;
}
input,
select,
button,
textarea {
    border: none;
    outline: none;
    border-radius: 0;
    background-color: #252525;
    color: rgb(169, 169, 169);
}

input::placeholder {
    color: rgb(169, 168, 168);
    opacity: 1;
}

input:focus,
select:focus,
button:focus {
    outline: none;
}

button {
    cursor: pointer;
}
@media (max-width: 600px) {

    .sidebar {
        position: relative;
        width: auto;
        height: auto;
    }

    .content {
        margin-left: 0;
        max-width: 100%;
        padding: 10px;
    }

    .postdiv {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

}

/* --- Image Upload --- */
.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: #2a2a2a;
    color: rgb(128, 174, 255);
    border: 1px solid #3a3a3a;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: #333;
}

.image-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.preview-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 120px;
}

.preview-thumb img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border: 1px solid #3a3a3a;
}

.preview-thumb span {
    font-size: 0.7em;
    color: rgb(120, 120, 120);
    word-break: break-all;
    text-align: center;
}

/* --- Post media display --- */
.post-media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.post-media-thumb img {
    width: 180px;
    height: 130px;
    object-fit: cover;
    border: 1px solid #3a3a3a;
    transition: opacity 0.2s;
}

.post-media-thumb:hover img {
    opacity: 0.8;
}
.post-video-embed {
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    max-width: 1280px;
}
.post-video-embed iframe {
    display: block;
    width: 100%;
}

/* --- Language selector --- */
.lang-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.lang-btn {
    display: inline-block;
    width: auto;
    padding: 5px 10px;
    margin: 0;
}

.lang-btn:hover {
    opacity: 0.85;
}

.lang-btn.active {
    opacity: 1;
    border-color: rgb(128, 174, 255);
    font-weight: bold;
    color: rgb(128, 174, 255);
}

.input-error {
    border: 1px solid #ff4d4d !important;
    background-color: rgba(255, 77, 77, 0.08) !important;
    animation: shake 0.35s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}
.debatto-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    animation: fadeInSlide 0.25s ease-out;
}
.debatto-alert.error {
    background-color: rgba(255, 77, 77, 0.15);
    border: 1px solid #ff4d4d;
    color: #ff8585;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
}
.debatto-alert.success {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid #2ecc71;
    color: #69f0ae;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}
.debatto-alert.warning {
    background-color: rgba(243, 156, 18, 0.15);
    border: 1px solid #f39c12;
    color: #f1c40f;
}
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.field-tooltip {
    display: block;
    color: #ff6b6b;
    font-size: 0.75rem;
    margin-top: 3px;
    margin-bottom: 6px;
    animation: fadeInSlide 0.2s ease-out;
}
.char-counter {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
    text-align: right;
    display: block;
}
.char-counter.limit-reached {
    color: #ff4d4d;
    font-weight: bold;
}
.post-composer {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.composer-main {
    flex: 1;
    min-width: 0;
    padding: 15px;
    background-color: #1f1f1f;
}

.ptitle {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.composer-selectors {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.composer-selectors select {
    padding: 8px;
}

.pcontent {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 250px;
    padding: 10px;
    resize: vertical;
    font-family: Arial;
    font-size: 1em;
}

.composer-submit {
    display: flex;
}

.composer-submit button {
    padding: 12px 25px;
    font-size: 1em;
    background-color: #252525;
    color: rgb(128, 174, 255);
    border: 1px solid #3a3a3a;
}

.composer-submit button:hover {
    background-color: #333;
}

@media (max-width: 600px) {
    .post-composer {
        flex-direction: column;
        align-items: stretch;
    }

    .composer-submit {
        justify-content: flex-end;
    }

    .composer-selectors {
        flex-wrap: wrap;
    }

    .composer-selectors select {
        flex: 1;
        min-width: 0;
    }
}
