/* Forum Layout */
.forum-container {
    max-width: 900px;
    width: 90%;
    margin: 30px auto 60px;
}

.forum-breadcrumb {
    margin-bottom: 25px;
    font-size: 0.9em;
}

.forum-breadcrumb a {
    color: #4ecdc4;
    text-decoration: none;
}

.forum-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #607080;
    margin: 0 8px;
}

.forum-heading {
    color: #4ecdc4;
    font-family: 'Outfit', sans-serif;
    font-size: 1.8em;
    margin-bottom: 8px;
}

.forum-subtitle {
    color: #a0b0c0;
    font-size: 1em;
    margin-bottom: 25px;
}

.forum-error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    border-radius: 8px;
    color: #e74c3c;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 12px;
    padding: 20px 24px;
    text-decoration: none;
    display: block;
    transition: border-color 0.2s;
}

.category-card:hover {
    border-color: #4ecdc4;
}

.category-name {
    color: #ffffff;
    font-size: 1.15em;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-desc {
    color: #a0b0c0;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.category-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.stat-number {
    color: #4ecdc4;
    font-weight: 700;
    font-size: 1.1em;
}

.stat-label {
    color: #607080;
    font-size: 0.85em;
}

.category-latest {
    font-size: 0.85em;
    color: #607080;
}

.latest-label {
    color: #607080;
}

.latest-title {
    color: #a0b0c0;
    margin: 0 4px;
}

.latest-by {
    color: #607080;
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 20px;
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.post-card {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 10px;
    padding: 16px 20px;
    text-decoration: none;
    display: block;
    transition: border-color 0.2s;
}

.post-card:hover {
    border-color: #4ecdc4;
}

.post-card.pinned {
    border-color: #d4a843;
    background-color: rgba(212, 168, 67, 0.04);
}

.post-pin-badge {
    color: #d4a843;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.post-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.post-avatar img,
.comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-avatar img {
    width: 30px;
    height: 30px;
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #1a8a82);
    color: #0b1929;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95em;
    flex-shrink: 0;
}

.avatar-placeholder.small {
    width: 30px;
    height: 30px;
    font-size: 0.8em;
}

.avatar-placeholder.large {
    width: 80px;
    height: 80px;
    font-size: 2em;
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-title {
    color: #ffffff;
    font-size: 1.05em;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-meta {
    display: flex;
    gap: 12px;
    font-size: 0.82em;
    color: #607080;
    flex-wrap: wrap;
}

.post-author {
    color: #a0b0c0;
}

/* Admin Badge */
.admin-badge {
    background-color: rgba(212, 168, 67, 0.2);
    color: #d4a843;
    font-size: 0.7em;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Post Full View */
.post-full {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 30px;
}

.post-full-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 16px;
}

.post-full-title {
    color: #ffffff;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 0;
    flex: 1;
}

.pin-icon {
    font-size: 0.8em;
}

.post-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.post-author-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1a2d45;
    flex-wrap: wrap;
}

.author-name {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
}

.author-name:hover {
    text-decoration: underline;
}

.post-date, .comment-date {
    color: #607080;
    font-size: 0.85em;
}

.post-edited, .comment-edited {
    color: #607080;
    font-size: 0.8em;
    font-style: italic;
}

.post-body {
    line-height: 1.7;
}

/* Rich Content */
.rich-content {
    color: #c0cdd8;
    font-size: 1em;
    line-height: 1.7;
}

.rich-content p {
    margin-bottom: 12px;
    color: #c0cdd8;
    font-size: 1em;
}

.rich-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.rich-content a {
    color: #4ecdc4;
}

.rich-content blockquote {
    border-left: 3px solid #4ecdc4;
    padding: 8px 16px;
    margin: 12px 0;
    color: #a0b0c0;
    background-color: rgba(78, 205, 196, 0.05);
    border-radius: 0 8px 8px 0;
}

.rich-content pre {
    background-color: #0b1929;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.rich-content code {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
}

.rich-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

.rich-content ul, .rich-content ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.rich-content li {
    color: #c0cdd8;
    margin-bottom: 4px;
}

/* Comments */
.comments-section {
    margin-bottom: 40px;
}

.comments-heading {
    color: #4ecdc4;
    font-size: 1.2em;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1a2d45;
}

.comment {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
}

.comment.reply {
    margin-left: 0;
    border-color: #162a40;
    background-color: #0d1c2e;
}

.comment-replies {
    margin-left: 30px;
    margin-top: 8px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-author {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
}

.comment-author:hover {
    text-decoration: underline;
}

.comment-body {
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    gap: 12px;
}

.reply-form-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #1a2d45;
}

.reply-form-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.new-comment {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.new-comment h4 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1em;
}

.login-prompt {
    text-align: center;
    padding: 30px;
    color: #a0b0c0;
    font-size: 1em;
}

.login-prompt a {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: #4ecdc4;
    color: #0b1929;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #3dbdb5;
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: #4ecdc4;
    border: 1px solid #4ecdc4;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-outline:hover {
    background-color: rgba(78, 205, 196, 0.1);
}

.btn-small {
    display: inline-block;
    background-color: transparent;
    color: #a0b0c0;
    border: 1px solid #1a2d45;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.82em;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s;
}

.btn-small:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.btn-danger {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-danger:hover {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85em;
}

.btn-text {
    background: none;
    border: none;
    color: #607080;
    font-size: 0.82em;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.2s;
}

.btn-text:hover {
    color: #4ecdc4;
}

.btn-text-danger:hover {
    color: #e74c3c;
}

/* Auth Card */
.auth-card {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 12px;
    padding: 35px;
    max-width: 480px;
    margin: 0 auto;
}

.form-hint {
    color: #607080;
    font-size: 0.82em;
    margin-top: 6px;
}

/* Profile */
.profile-card {
    background-color: #0f2035;
    border: 1px solid #1a2d45;
    border-radius: 12px;
    padding: 30px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-avatar-large img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-username {
    color: #ffffff;
    font-size: 1.5em;
    margin-bottom: 6px;
}

.profile-detail {
    color: #a0b0c0;
    font-size: 0.92em;
    margin-bottom: 4px;
}

.profile-joined {
    color: #607080;
    font-size: 0.85em;
}

.profile-stats {
    display: flex;
    gap: 30px;
    padding: 16px 0;
    border-top: 1px solid #1a2d45;
    border-bottom: 1px solid #1a2d45;
    margin-bottom: 20px;
}

.profile-about {
    margin-bottom: 20px;
}

.profile-about h3 {
    color: #4ecdc4;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.profile-actions {
    margin-top: 20px;
}

.avatar-preview {
    margin-bottom: 10px;
}

.current-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 25px;
}

.page-link {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
}

.page-link:hover {
    text-decoration: underline;
}

.page-info {
    color: #607080;
    font-size: 0.9em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #607080;
}

/* Quill Editor Overrides */
.quill-editor, .quill-editor-full, .quill-mini {
    background-color: #0b1929;
    border: 1px solid #1a2d45;
    border-radius: 0 0 8px 8px;
    color: #e0e0e0;
}

.quill-editor-full {
    min-height: 250px;
}

.quill-editor {
    min-height: 150px;
}

.quill-mini {
    min-height: 100px;
}

.ql-toolbar.ql-snow {
    border: 1px solid #1a2d45;
    border-radius: 8px 8px 0 0;
    background-color: #0f2035;
}

.ql-container.ql-snow {
    border: none;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1em;
}

.ql-editor {
    color: #e0e0e0;
    min-height: 100px;
}

.ql-editor.ql-blank::before {
    color: #a0b0c0 !important;
    font-style: normal !important;
}

.ql-snow .ql-stroke {
    stroke: #a0b0c0;
}

.ql-snow .ql-fill {
    fill: #a0b0c0;
}

.ql-snow .ql-picker-label {
    color: #a0b0c0;
}

.ql-snow .ql-picker-options {
    background-color: #0f2035;
    border-color: #1a2d45;
}

.ql-snow .ql-picker-item {
    color: #a0b0c0;
}

/* Header user section */
.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.header-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #1a8a82);
    color: #0b1929;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65em;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-container {
        width: 95%;
        margin: 20px auto 40px;
    }

    .category-header {
        flex-direction: column;
    }

    .post-full-header {
        flex-direction: column;
    }

    .post-actions {
        align-self: flex-start;
    }

    .post-author-bar {
        gap: 8px;
    }

    .comment-replies {
        margin-left: 15px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .auth-card {
        padding: 24px;
    }
}
