/* Mood Blog Main Styles */

/* Branding */
.mood-blog-branding {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.mood-blog-site-name {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
}

.mood-blog-tagline {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.mood-blog-welcome-message {
    margin: 20px 0 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--mood-blog-primary, #007bff);
    border-radius: 4px;
}

.mood-blog-welcome-message p:last-child {
    margin-bottom: 0;
}

/* General Styles */
.mood-blog-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    border: 1px solid;
}

.mood-blog-message .message-title {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 700;
}

.mood-blog-message-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-blog-message-actions .mood-blog-btn {
    flex: 0 0 auto;
}

.mood-blog-message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.mood-blog-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Forms */
.mood-blog-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Buttons */
.mood-blog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mood-blog-btn:disabled,
.mood-blog-btn.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.mood-blog-btn.is-loading {
    position: relative;
    padding-right: 40px;
}

.mood-blog-btn.is-loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-top-color: rgba(255, 255, 255, 1);
    animation: mood-blog-spin 0.8s linear infinite;
}

.mood-blog-btn-secondary.is-loading::after {
    border-color: rgba(15, 23, 42, 0.35);
    border-top-color: rgba(15, 23, 42, 0.9);
}

.mood-blog-btn-primary {
    background-color: #007bff;
    color: white;
}

.mood-blog-btn-primary:hover {
    background-color: #0056b3;
}

.mood-blog-btn-secondary {
    background-color: #f1f5f9;
    color: #1f2933;
}

.mood-blog-btn-secondary:hover {
    background-color: #e2e8f0;
}

.mood-blog-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

@keyframes mood-blog-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.mood-blog-form-status {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2933;
}

.mood-blog-form-status.is-active {
    display: flex;
}

/* Mood Selector */
.mood-selector-group {
    margin: 30px 0;
}

.mood-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-option:hover {
    border-color: #007bff;
    transform: translateY(-2px);
}

.mood-option.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.mood-option input[type="radio"] {
    display: none;
}

.mood-emoji {
    font-size: 32px;
    margin-bottom: 8px;
}

.mood-label {
    font-size: 13px;
    font-weight: 600;
}

/* Intensity Slider */
input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.intensity-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

#intensity-value {
    font-weight: 600;
    color: #007bff;
}

/* Post Cards */
.mood-blog-posts-list {
    display: grid;
    gap: 20px;
}

.mood-blog-feed-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.mood-blog-feed-header .feed-intro {
    flex: 1 1 auto;
}

.mood-blog-feed-header .feed-intro h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.mood-blog-feed-header .feed-intro p {
    margin: 8px 0 0;
    color: #4b5563;
    line-height: 1.6;
}

.mood-blog-feed-header .feed-cta {
    flex-shrink: 0;
}

.mood-blog-feed-header .feed-cta .mood-blog-btn {
    white-space: nowrap;
}

.mood-blog-post-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
    transition: box-shadow 0.3s ease;
}

.mood-blog-post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.post-author {
    display: flex;
    gap: 12px;
    align-items: center;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
}

.post-date {
    font-size: 12px;
    color: #666;
}

.post-mood {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-emoji {
    font-size: 24px;
}

.mood-intensity {
    width: 60px;
}

.intensity-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.intensity-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #00c9ff);
    transition: width 0.3s ease;
}

.post-content h3.post-title {
    margin: 0 0 10px;
    font-size: 20px;
}

.post-content h3.post-title a {
    color: #333;
    text-decoration: none;
}

.post-content h3.post-title a:hover {
    color: #007bff;
}

.post-excerpt {
    color: #555;
    line-height: 1.6;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.mood-blog-single-post .post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 30px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.post-reaction-callout {
    flex: 1 1 260px;
    min-width: 240px;
}

.post-reaction-callout h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.post-reaction-callout p {
    margin: 0 0 16px;
    color: #4b5563;
}

.post-reactions-wrap .mood-blog-reactions {
    justify-content: flex-start;
}

.post-engagement-meta {
    flex: 1 1 220px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.follow-cta {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.follow-cta h4 {
    margin: 0 0 6px;
    font-size: 18px;
}

.follow-cta p {
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.5;
}

.follow-cta .mood-blog-follow-btn {
    width: 100%;
}

.comments-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
}

.comments-cta:hover {
    text-decoration: underline;
}

.comments-cta__icon {
    font-size: 18px;
    line-height: 1;
}

.post-stats span {
    color: #666;
    font-size: 13px;
}

/* Reactions */
.mood-blog-reactions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.mood-blog-reactions .reaction-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    border-color: #007bff;
    transform: scale(1.1);
}

.reaction-btn.active {
    background-color: #e7f3ff;
    border-color: #007bff;
}

.reaction-emoji {
    font-size: 16px;
}

.reaction-count {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

/* Comments */
.mood-blog-comments {
    margin-top: 40px;
}

.mood-blog-comments .comments-intro {
    margin: 0 0 20px;
    color: #4b5563;
}

.comments-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.comment-form {
    margin-bottom: 30px;
}

.mood-blog-comment-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.mood-blog-comment-form img {
    border-radius: 50%;
    flex-shrink: 0;
}

.mood-blog-comment-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
}

.comment-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
}

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

.comment-meta {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: #666;
}

.comment-delete {
    padding: 4px 8px;
    font-size: 11px;
    color: #dc3545;
    background: none;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
}

.comment-text {
    margin: 10px 0;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.comment-reply-btn {
    font-size: 12px;
    color: #007bff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

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

.comment-reply-form {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Follow Button */
.mood-blog-follow-btn {
    padding: 8px 20px;
    border: 2px solid #007bff;
    border-radius: 20px;
    background: white;
    color: #007bff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-blog-follow-btn:hover .unfollow-text {
    display: inline;
}

.mood-blog-follow-btn:hover .follow-text {
    display: none;
}

.mood-blog-follow-btn.following {
    background: #007bff;
    color: white;
}

.mood-blog-follow-btn .unfollow-text {
    display: none;
}

.mood-blog-follow-btn.following:hover {
    background: #dc3545;
    border-color: #dc3545;
}

/* Users List */
.mood-blog-users-list {
    display: grid;
    gap: 15px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.user-info {
    flex: 1;
}

.user-info h4 {
    margin: 0 0 5px;
}

.user-stats {
    font-size: 13px;
    color: #666;
}

/* Mood Filter */
.mood-blog-mood-filter {
    margin: 30px 0;
}

.mood-filter-label {
    font-weight: 600;
    margin-bottom: 15px;
}

.mood-filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mood-filter-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.mood-filter-option:hover,
.mood-filter-option.active {
    border-color: #007bff;
    background: #e7f3ff;
}

/* Responsive */
@media (max-width: 768px) {
    .mood-selector {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

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

    .modal-content {
        margin: 20px;
        padding: 20px;
    }

    .mood-blog-feed-header {
        flex-direction: column;
        align-items: stretch;
    }

    .mood-blog-feed-header .feed-cta {
        width: 100%;
    }

    .mood-blog-feed-header .feed-cta .mood-blog-btn {
        width: 100%;
        text-align: center;
    }

    .mood-blog-single-post .post-actions {
        flex-direction: column;
        padding: 20px;
    }

    .post-reaction-callout,
    .post-engagement-meta {
        min-width: 100%;
    }

    .follow-cta {
        box-shadow: none;
    }
}

/* Dark Mode */
body.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .mood-blog-post-card,
body.dark-mode .mood-blog-form,
body.dark-mode .group-card,
body.dark-mode .user-card,
body.dark-mode .comment-item,
body.dark-mode .trend-stat,
body.dark-mode .month-calendar {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .group-admin-panel {
    background: #1f2937;
    border-color: #334155;
    box-shadow: none;
}

body.dark-mode .group-member-entry {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .group-member-name {
    color: #e2e8f0;
}

body.dark-mode .group-member-meta,
body.dark-mode .group-member-meta-text,
body.dark-mode .group-admin-panel__header p,
body.dark-mode .group-admin-empty,
body.dark-mode .group-member-self {
    color: #94a3b8;
}

body.dark-mode .group-role-badge {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode .group-membership-badge {
    background: rgba(56, 189, 248, 0.2);
    color: #bae6fd;
}

body.dark-mode .group-membership-badge.is-member {
    background: rgba(134, 239, 172, 0.2);
    color: #bbf7d0;
}

body.dark-mode .group-membership-badge.is-groupadmin {
    background: rgba(221, 214, 254, 0.2);
    color: #ddd6fe;
}

body.dark-mode .group-membership-badge.is-pending {
    background: rgba(254, 240, 138, 0.2);
    color: #fef08a;
}

body.dark-mode .group-feedback {
    border-color: rgba(148, 163, 184, 0.35);
}

body.dark-mode .group-feedback-success {
    background: rgba(6, 95, 70, 0.35);
    border-color: rgba(34, 197, 94, 0.5);
    color: #bbf7d0;
}

body.dark-mode .group-feedback-error {
    background: rgba(185, 28, 28, 0.35);
    border-color: rgba(248, 113, 113, 0.55);
    color: #fecaca;
}

body.dark-mode .group-pending-alert {
    background: rgba(251, 191, 36, 0.15);
    color: #facc15;
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="number"],
body.dark-mode input[type="url"],
body.dark-mode textarea,
body.dark-mode select {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .post-title a,
body.dark-mode .author-name,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 {
    color: #e0e0e0;
}

body.dark-mode .mood-option,
body.dark-mode .mood-filter-option,
body.dark-mode .reaction-btn {
    border-color: #555;
    background: #2d2d2d;
}

body.dark-mode .mood-option:hover,
body.dark-mode .mood-filter-option:hover {
    border-color: var(--mood-blog-primary, #007bff);
}

.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    border: 2px solid #555;
    cursor: pointer;
    font-size: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

body.dark-mode .dark-mode-toggle {
    background: #ffd700;
    color: #333;
}

/* Groups */
.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.group-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.group-image {
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.group-info {
    padding: 20px;
}

.group-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.group-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.group-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.group-cover {
    height: 300px;
    background-size: cover;
    background-position: center;
    background-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.group-header {
    padding: 30px;
    background: white;
    border-bottom: 1px solid #ddd;
}

.group-full-description {
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
}

.group-membership-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
    margin-bottom: 12px;
}

.group-membership-badge.is-member {
    background: #dcfce7;
    color: #166534;
}

.group-membership-badge.is-groupadmin {
    background: #ede9fe;
    color: #5b21b6;
}

.group-membership-badge.is-pending {
    background: #fef3c7;
    color: #92400e;
}

.group-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin: 15px 0;
}

.group-feedback {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.group-feedback-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.group-feedback-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.group-action-form {
    display: inline-block;
    margin-right: 12px;
}

.group-action-form--pending {
    margin-right: 0;
}

.group-inline-form {
    display: inline-block;
    margin-right: 8px;
}

.group-inline-form:last-child {
    margin-right: 0;
}

.group-pending-alert {
    margin: 0 0 24px;
    padding: 16px;
    border-radius: 10px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 500;
}

.group-admin-panel {
    margin: 30px 0;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.group-admin-panel__header h3 {
    margin: 0 0 6px;
}

.group-admin-panel__header p {
    margin: 0 0 20px;
    color: #475569;
    font-size: 14px;
}

.group-admin-panel__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.group-admin-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-admin-section h4 {
    margin: 0;
    font-size: 16px;
}

.group-admin-empty {
    margin: 0;
    color: #64748b;
    font-style: italic;
}

.group-member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group-member-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
}

.group-member-details {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.group-member-avatar img {
    border-radius: 50%;
}

.group-member-name {
    display: block;
    font-weight: 600;
    color: #1f2937;
}

.group-member-self {
    margin-left: 6px;
    font-size: 12px;
    color: #64748b;
}

.group-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.group-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: #e2e8f0;
    color: #334155;
}

.group-role-badge.is-groupadmin {
    background: #ede9fe;
    color: #5b21b6;
}

.group-role-badge.is-member {
    background: #dcfce7;
    color: #166534;
}

.group-member-meta-text {
    color: #475569;
}

.group-member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.group-member-actions .mood-blog-btn {
    min-width: 0;
    white-space: nowrap;
}

.join-group-btn.is-pending {
    cursor: default;
    opacity: 0.8;
}

.publishing-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.publishing-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Forums */
.mood-blog-forums {
    max-width: 1200px;
    margin: 0 auto;
}

.forums-header {
    text-align: center;
    margin-bottom: 40px;
}

.forums-header h1 {
    margin: 0 0 10px;
}

.forums-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

.forum-categories {
    margin-bottom: 40px;
}

.forum-category-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    align-items: center;
}

.forum-category-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateX(4px);
}

.category-icon {
    font-size: 36px;
    text-align: center;
}

.category-info h3 {
    margin: 0 0 8px;
}

.category-info h3 a {
    text-decoration: none;
    color: #333;
}

.category-info h3 a:hover {
    color: var(--mood-blog-primary, #007bff);
}

.category-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.latest-thread {
    font-size: 13px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.latest-label {
    font-weight: 600;
    color: #666;
}

.thread-link {
    color: var(--mood-blog-primary, #007bff);
    text-decoration: none;
}

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

.thread-meta {
    color: #999;
    font-size: 12px;
}

.category-stats {
    text-align: center;
}

.category-stats .stat {
    display: flex;
    flex-direction: column;
}

.category-stats strong {
    font-size: 24px;
    color: var(--mood-blog-primary, #007bff);
}

.category-stats span {
    font-size: 12px;
    color: #666;
}

.forum-stats {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 30px;
}

.forum-stats h3 {
    margin-top: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--mood-blog-primary, #007bff);
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Category View */
.mood-blog-forum-category {
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--mood-blog-primary, #007bff);
    text-decoration: none;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.category-header {
    margin-bottom: 30px;
}

.category-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.threads-list {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.thread-row {
    display: grid;
    grid-template-columns: 50px 1fr auto 120px;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
    transition: background 0.2s;
}

.thread-row:hover {
    background: #f8f9fa;
}

.thread-row:last-child {
    border-bottom: none;
}

.thread-row.pinned {
    background: #fffbf0;
}

.thread-row.locked {
    opacity: 0.7;
}

.thread-row.reddit-style {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.thread-row.reddit-style .thread-voting {
    width: 56px;
    display: flex;
    justify-content: center;
}

.thread-row.reddit-style .thread-main {
    flex: 1;
}

.thread-row.reddit-style .thread-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.thread-row.reddit-style .thread-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #111;
    text-decoration: none;
}

.thread-row.reddit-style .thread-title:hover {
    color: var(--mood-blog-primary, #007bff);
}

.thread-row.reddit-style .thread-details {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.thread-row.reddit-style .thread-stats {
    margin-top: 10px;
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #777;
}

.vote-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.vote-button {
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #b3bac5;
    transition: color 0.2s;
}

.vote-button:hover,
.vote-button:focus {
    color: #6c757d;
}

.vote-button.active.upvote {
    color: var(--mood-blog-primary, #007bff);
}

.vote-button.active.downvote {
    color: #ff4500;
}

.vote-score {
    font-weight: 700;
    font-size: 15px;
    color: #333;
}

.thread-icon {
    font-size: 24px;
    text-align: center;
}

.thread-main h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.thread-title a {
    color: #333;
    text-decoration: none;
}

.thread-title a:hover {
    color: var(--mood-blog-primary, #007bff);
}

.locked-badge,
.solved-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 500;
}

.locked-badge {
    background: #ffeaa7;
    color: #666;
}

.solved-badge {
    background: #55efc4;
    color: #00b894;
}

.thread-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thread-author strong {
    color: #333;
}

.thread-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.thread-tags .tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.thread-stats {
    display: flex;
    gap: 20px;
}

.thread-stats .stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-weight: 600;
    color: #333;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #999;
}

.thread-activity {
    text-align: right;
}

.activity-time {
    font-size: 12px;
    color: #999;
}

/* Thread View */
.mood-blog-forum-thread {
    max-width: 900px;
    margin: 0 auto;
}

.thread-title-section {
    margin-bottom: 30px;
}

.thread-type-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.thread-locked-notice,
.thread-solved-notice {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 14px;
}

.thread-locked-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.thread-solved-notice {
    background: #d4edda;
    border: 1px solid #28a745;
}

.mood-blog-forum-thread.reddit-style {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.thread-original-post {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
}

.thread-original-post .vote-column {
    width: 60px;
    display: flex;
    justify-content: center;
}

.thread-original-post .post-body {
    flex: 1;
}

.thread-original-post .post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.thread-original-post .post-meta img {
    border-radius: 50%;
}

.thread-original-post .author-name {
    font-weight: 600;
}

.thread-original-post .post-date {
    font-size: 12px;
    color: #777;
}

.thread-original-post .post-content {
    line-height: 1.7;
    font-size: 15px;
    color: #222;
}

/* Replies */
.thread-replies h3 {
    margin-bottom: 20px;
}

.forum-reply {
    display: flex;
    gap: 18px;
    padding: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 18px;
    position: relative;
}

.forum-reply.best-answer {
    border-color: #28a745;
    border-width: 2px;
    background: #f8fff9;
}

.best-answer-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}


.forum-reply .vote-column {
    width: 50px;
    display: flex;
    justify-content: center;
}

.forum-reply .reply-body {
    flex: 1;
}

.reply-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.reply-meta img {
    border-radius: 50%;
}

.reply-date {
    font-size: 12px;
    color: #777;
}

.reply-content {
    line-height: 1.6;
    color: #333;
}

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

.upvote-btn,
.mark-solution-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.upvote-btn:hover,
.mark-solution-btn:hover {
    border-color: var(--mood-blog-primary, #007bff);
    background: #f0f8ff;
}

.upvote-btn.upvoted {
    background: var(--mood-blog-primary, #007bff);
    color: white;
    border-color: var(--mood-blog-primary, #007bff);
}

.upvote-count {
    font-weight: 600;
    margin-left: 4px;
}

.reply-content {
    line-height: 1.6;
}

.edited-notice {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.reply-form-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.reply-form-section h3 {
    margin-top: 0;
}

.login-prompt {
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    margin-top: 40px;
}

/* New Thread Form */
.mood-blog-new-thread {
    max-width: 800px;
    margin: 0 auto;
}

.thread-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.thread-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.thread-type-option:hover {
    border-color: var(--mood-blog-primary, #007bff);
    background: #f0f8ff;
}

.thread-type-option input[type="radio"] {
    margin-bottom: 8px;
}

.thread-type-option .type-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.thread-type-option .type-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.thread-type-option .type-desc {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.thread-type-option:has(input:checked) {
    border-color: var(--mood-blog-primary, #007bff);
    background: #f0f8ff;
}

.no-categories,
.no-threads {
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.no-replies {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Dark Mode Forum Styles */
body.dark-mode .forum-category-card,
body.dark-mode .threads-list,
body.dark-mode .thread-original-post,
body.dark-mode .forum-reply,
body.dark-mode .reply-form-section,
body.dark-mode .forum-stats,
body.dark-mode .stat-box {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .category-info h3 a,
body.dark-mode .thread-title a {
    color: #e0e0e0;
}

body.dark-mode .thread-row:hover {
    background: #3d3d3d;
}

body.dark-mode .latest-thread {
    background: #3d3d3d;
}

body.dark-mode .thread-type-option {
    border-color: #555;
    background: #2d2d2d;
}

body.dark-mode .thread-type-option:hover {
    background: #3d3d3d;
}

body.dark-mode .vote-button,
body.dark-mode .mark-solution-btn {
    background: #3d3d3d;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .vote-score {
    color: #f0f0f0;
}

body.dark-mode .sort-options select {
    background: #3d3d3d;
    border-color: #555;
    color: #e0e0e0;
}

