body {
    background-color: #0A0A0A;
    color: #EAEAEA;
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
}

body.modal-open-global {
    overflow: hidden;
}

.blog-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1100;
}

.logo-link-blog {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
}

.logo-icon-blog {
    height: 30px;
    width: auto;
    margin-right: 8px;
}

.logo-text-blog {
    font-size: 1.3rem;
    font-weight: 700;
}
.logo-text-blog .gradient-text {
    font-size: 1.5rem;
}

.blog-header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link-blog {
    color: #C0C0C0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 7px 10px;
    border-radius: 5px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link-blog:hover, .nav-link-blog.active {
    color: #ffffff;
    background-color: #282828;
}

.button-create-post {
    background: linear-gradient(90deg, #8A2BE2, #4A00E0);
    color: #ffffff;
    padding: 7px 10px;
    border: none;
    border-radius: 50%;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.button-create-post:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}
.button-create-post svg {
    width: 20px;
    height: 20px;
}

.blog-main-content {
    flex-grow: 1;
    padding: 30px 15px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.latest-post-highlight {
    margin-bottom: 40px;
}

.blog-posts-feed {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-post-card {
    background-color: #161618;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    border: 1px solid #2a2a2e;
    transition: box-shadow 0.3s ease;
}
.blog-post-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.post-card-author-info {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 12px;
    border-bottom: 1px solid #2a2a2e;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.post-card-author-info > div {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #EAEAEA;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}
.verified-badge {
    margin-left: 5px;
    font-size: 0.8em;
    display: inline-block;
}

.post-date {
    font-size: 0.75rem;
    color: #888;
}

.post-card-content-text {
    padding: 0px 20px 15px 20px;
}

.post-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #F5F5F5;
    margin: 15px 0 10px 0;
    line-height: 1.3;
}
.post-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}
.post-card-title a:hover {
    color: #00D4FF;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: #B0B0B0;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-card-image-container {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 0 0 8px 8px;
}
.post-card-image-container img.post-card-image {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;

}
.blog-post-card:hover .post-card-image {
    transform: scale(1.03);
}

.post-card-footer {
    padding: 10px 20px 15px 20px;
    border-top: 1px solid #2a2a2e;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-card-tags {
}
.post-card-tags .tag {
    display: inline-block;
    background-color: #28282C;
    color: #909090;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 15px;
    margin-right: 6px;
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: lowercase;
}

.post-card-interactions {
    display: flex;
    gap: 18px;
    align-items: center;
}

.interaction-button {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.interaction-button:hover {
    color: #EAEAEA;
    background-color: #28282C;
}
.interaction-button svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.5;
}
.interaction-button .count {
    font-size: 0.8rem;
    font-weight: 500;
}
.interaction-button.liked svg,
.interaction-button.commented svg {
    fill: currentColor;
    stroke: currentColor;
}

.pagination-container {
    text-align: center;
    margin-top: 50px;
    padding-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.pagination-container button, .pagination-container span.pagination-ellipsis {
    margin: 0 4px;
    padding: 9px 14px;
    background-color: #1C1C1C;
    color: #B0B0B0;
    border: 1px solid #303030;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.pagination-container button:hover {
    background-color: #282828;
    color: #fff;
}
.pagination-container .active-page {
    background: linear-gradient(90deg, #8A2BE2, #4A00E0);
    color: #fff;
    border-color: #4A00E0;
    font-weight: 600;
}
.pagination-container span.pagination-ellipsis {
    cursor: default;
    background-color: transparent;
    border: none;
}


.blog-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #252525;
    color: #606060;
    font-size: 0.8rem;
    margin-top: 50px;
}

.single-post-view {
    background-color: #101010;
    padding: 30px 35px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}



.single-post-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.author-avatar-single {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3A3A3A;
}

.single-post-author-info > div {
    display: flex;
    flex-direction: column;
}

.author-name-single {
    font-weight: 600;
    color: #EFEFEF;
    font-size: 1rem;
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

.post-date-single {
    font-size: 0.8rem;
    color: #909090;
}

.single-post-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1;
    margin-top: 0;
    margin-bottom: 12px;
    color: #e2e0e0;
}

.single-post-meta-details {
    font-size: 0.8rem;
    color: #888888;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.single-post-meta-details svg {
    vertical-align: middle;
    margin-right: 5px;
    stroke-width: 1.8;
}

.single-post-main-image {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.single-post-tags {
    margin-bottom: 25px;
}
.single-post-tags .tag {
    background-color: #252525;
    color: #B0B0B0;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

.single-post-body {
    color: #D8D8D8;
}
.single-post-body p { margin-bottom: 22px; }
.single-post-body h2, .single-post-body h3, .single-post-body h4 {
    color: #FFFFFF;
    margin-top: 45px;
    margin-bottom: 18px;
    line-height: 1.35;
}
.single-post-body h2 { font-size: 1.7rem; }
.single-post-body h3 { font-size: 1.5rem; }
.single-post-body h4 { font-size: 1.3rem; }
.single-post-body a { color: #00BFFF; text-decoration: none; font-weight: 500; }
.single-post-body a:hover { text-decoration: underline; color: #40CFFF; }
.single-post-body pre {
    background-color: #0D0D0D;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #222;
    font-size: 0.9em;
    margin: 25px 0;
}
.single-post-body code:not(pre code) {
    background-color: #252525;
    padding: 0.2em 0.4em;
    margin: 0 0.1em;
    border-radius: 3px;
    font-size: 0.85em;
}
.single-post-body blockquote {
    border-left: 4px solid #00BFFF;
    margin: 25px 0;
    padding: 15px 25px;
    color: #B0B0B0;
    font-style: italic;
    background-color: #181818;
    border-radius: 0 6px 6px 0;
}
.single-post-body ul, .single-post-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}
.single-post-body li {
    margin-bottom: 8px;
}

.mentioned-users {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #333;
    font-size: 0.85rem;
    color: #999;
}
.mention-link {
    color: #00AEEF;
    text-decoration: none;
    font-weight: 500;
}
.mention-link:hover {
    text-decoration: underline;
}


.single-post-interactions {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #282828;
}
.single-post-interactions h3 {
    font-size: 1.1rem;
    opacity: 0.7;
    color: #FFFFFF;
    margin-bottom: 16px;
}
.reactions-container { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.reaction-button {
    background-color: #252525;
    color: #A0A0A0;
    border: 1px solid #333;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.reaction-button:hover { background-color: #303030; color: #FFF; }
.reaction-button.user-reacted { background-color: #0077B5; color: #FFF; border-color: #005E8E; }
.reaction-button .reaction-count { font-size: 0.8em; font-weight: bold; }


.comments-trigger-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #282828;
    text-align: center;
}

.comments-trigger-button {
    background-color: #252525;
    color: #C0C0C0;
    border: 1px solid #383838;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.comments-trigger-button:hover {
    background-color: #333;
    color: #FFFFFF;
}

.comments-trigger-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.comments-trigger-button .comment-count-badge {
    background-color: #0077B5;
    color: white;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: 5px;
}


.single-post-comments {
    display: none;
    margin-top: 30px;
    padding-top: 20px;
}

.single-post-comments.visible {
    display: block;
}

.single-post-comments h3 {
    font-size: 1.5rem;
    color: #FFFFFF;
    margin-bottom: 25px;
}

.comments-list { margin-bottom: 35px; }
.comment-item {
    background-color: #1A1A1A;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #2c2c2c;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.comment-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 3px;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.comment-author strong { color: #E8E8E8; }
.comment-date { font-size: 0.75rem; color: #808080; }
.comment-text {
    font-size: 0.95rem;
    color: #C8C8C8;
    line-height: 1.65;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.no-comments-yet {
    color: #777;
    font-style: italic;
    text-align: center;
    padding: 25px 0;
    font-size: 0.95rem;
}

.comment-form textarea {
    width: 100%;
    background-color: #1A1A1A;
    color: #E0E0E0;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    min-height: 60px;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.comment-form textarea:focus {
    outline: none;
    border-color: #00BFFF;
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.25);
}
.button-primary-blog {
    background: linear-gradient(90deg, #0077B5, #00AEEF);
    color: #ffffff;
    padding: 12px 22px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button-primary-blog:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(0, 150, 200, 0.35);
}
.login-to-comment {
    font-size: 0.9rem;
    color: #A0A0A0;
    background-color: #181818;
    padding: 18px;
    border-radius: 8px;
    text-align: center;
}
.login-to-comment a { color: #00BFFF; font-weight: 500; }

.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 200px;
}
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left-color: #00AEEF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
.loading-message, .error-message, .no-posts-message {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: #888;
}
.error-message { color: #E74C3C; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-global {
    display: none; 
    position: fixed;
    z-index: 1500; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.75); 
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-global-content {
    background-color: #161618;
    margin: auto;
    padding: 25px 30px;
    border: 1px solid #333;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    position: relative;
    color: #e0e0e0;
}

.modal-global-content.large {
    max-width: 700px; 
}

.modal-global-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-global-close:hover,
.modal-global-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.modal-global-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    border-bottom: 1px solid #2a2a2e;
    padding-bottom: 15px;
}

#modalPostForm .form-group-modal {
    margin-bottom: 20px;
}

#modalPostForm .form-group-modal label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #b0b0b0;
    margin-bottom: 7px;
}

#modalPostForm .form-group-modal input[type="text"],
#modalPostForm .form-group-modal input[type="url"],
#modalPostForm .form-group-modal textarea,
#modalPostForm .form-group-modal select,
#modalPostForm .form-group-modal input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    background-color: #1f1f23;
    color: #e0e0e0;
    border: 1px solid #38383d;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#modalPostForm .form-group-modal input[type="file"] {
    padding: 8px 10px;
    background-color: #2a2a2e;
}

#modalPostForm .form-group-modal input[type="text"]:focus,
#modalPostForm .form-group-modal input[type="url"]:focus,
#modalPostForm .form-group-modal textarea:focus,
#modalPostForm .form-group-modal select:focus {
    outline: none;
    border-color: #0077B5; 
    box-shadow: 0 0 0 3px rgba(0, 119, 181, 0.2);
}

#modalPostForm .form-group-modal textarea {
    min-height: 150px;
    resize: vertical;
}

#modalPostForm .form-group-modal small {
    display: block;
    font-size: 0.75rem;
    color: #777;
    margin-top: 6px;
}

#postImagePreviewModal {
    display: none; 
    max-width: 100%; 
    max-height: 200px;
    height: auto; 
    margin-top: 10px; 
    border-radius: 6px;
    border: 1px solid #38383d;
    object-fit: contain;
}

.button-secondary-modal.small-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    margin-top: 8px;
    background-color: #2c2c30;
    border: 1px solid #444;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.button-secondary-modal.small-btn:hover {
    background-color: #38383d;
}
.button-secondary-modal.small-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.spellcheck-status {
    display: block;
    font-size: 0.8rem;
    margin-top: 8px;
    min-height: 1em;
    text-align: left;
}
.spellcheck-status.loading { color: #f39c12; }
.spellcheck-status.success { color: #2ecc71; }
.spellcheck-status.error { color: #e74c3c; }

.form-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    display: none; 
}
.form-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}
.form-message.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}
.form-message.info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid #3498db;
}

#modalFormMessage {
    padding: 10px;
    margin-top: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}
#modalFormMessage.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}
#modalFormMessage.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

#submitPostBtn.button-primary-modal {
    background: linear-gradient(90deg, #8A2BE2, #4A00E0);
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#submitPostBtn.button-primary-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 0, 224, 0.3);
}
#submitPostBtn.button-primary-modal:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #555;
}
#submitPostBtn.button-primary-modal .spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    width: 16px;
    height: 16px;
    animation: spin 1s ease-in-out infinite;
}

.mention-suggestions-container {
    position: absolute;
    background-color: #1f1f23;
    border: 1px solid #38383d;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1600;
    display: none;
}

.mention-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #c0c0c0;
}

.mention-suggestion-item:hover,
.mention-suggestion-item.active {
    background-color: #2c2c30;
    color: #ffffff;
}

.mention-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-fullname {
    font-weight: 500;
    color: #e0e0e0;
}

.mention-username {
    font-size: 0.8rem;
    color: #888;
}


@media (max-width: 992px) {
    .blog-main-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 12px;
    }
    .blog-header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .single-post-view {
        padding: 20px 25px;
    }
    .single-post-title {
        font-size: clamp(1.5rem, 4vw, 1.9rem);
    }
}

@media (max-width: 480px) {
    .post-card-title {
        font-size: 1.2rem;
    }
    .post-card-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    .post-card-interactions {
        gap: 12px;
        font-size: 0.7rem;
    }
    .interaction-button svg {
        width: 16px;
        height: 16px;
    }
    .single-post-view {
        padding: 15px 20px;
    }
    .single-post-title {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }
    .single-post-body {
        font-size: 1rem;
    }
    .comment-form textarea {
        min-height: 100px;
    }
    .modal-global-content {
        padding: 20px 20px;
    }
    .modal-global-content h2 {
        font-size: 1.4rem;
    }
}
