/* Forum Styles */
:root {
    /* Light mode variables */
    --forum-bg: #ffffff;
    --forum-text: #333333;
    --forum-text-secondary: #666666;
    --forum-text-muted: #777777;
    --forum-border: #e0e0e0;
    --forum-card-bg: #ffffff;
    --forum-header-bg: #f8f9fa;
    --forum-hover-bg: #f1f1f1;
    --forum-sidebar-bg: #f8f9fa;
    --forum-primary: #007bff;
    --forum-primary-hover: #0069d9;
    --forum-post-border: #eee;
    --forum-tag-bg: #e9ecef;
    --forum-tag-color: #495057;
    --forum-shadow: rgba(0, 0, 0, 0.05);
    --forum-shadow-hover: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
        /* Dark mode variables */
        --forum-bg: #121212;
        --forum-text: #e0e0e0;
        --forum-text-secondary: #b0b0b0;
        --forum-text-muted: #909090;
        --forum-border: #333333;
        --forum-card-bg: #1e1e1e;
        --forum-header-bg: #252525;
        --forum-hover-bg: #2a2a2a;
        --forum-sidebar-bg: #252525;
        --forum-primary: #0a84ff;
        --forum-primary-hover: #0070e0;
        --forum-post-border: #333333;
        --forum-tag-bg: #333333;
        --forum-tag-color: #d0d0d0;
        --forum-shadow: rgba(0, 0, 0, 0.2);
        --forum-shadow-hover: rgba(0, 0, 0, 0.3);
    }


.forum-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

.forum-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 20px;
}

.forum-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #333;
}

.forum-header p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    margin: 20px 0;
}

.create-topic-btn {
    display: inline-flex;
    align-items: center;
    background-color: #0066cc;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    gap: 8px;
}

.create-topic-btn:hover {
    background-color: #0052a3;
    text-decoration: none;
    color: white;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Forum Topic List */
.forum-search-bar {
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    max-width: 600px;
}

.forum-search-bar .search-container input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.forum-search-bar .search-container button {
    padding: 10px 15px;
    background-color: #0066cc;
    color: white;
    border: 1px solid #0066cc;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.forum-topics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.forum-topics-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.topics-count {
    color: #666;
    font-size: 0.9rem;
}

.topic-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s;
}

.topic-item:hover {
    background-color: #f8f9fa;
}

.topic-item.pinned {
    background-color: #f8f9fa;
    border-left: 4px solid #0066cc;
}

.topic-item.featured {
    background-color: #f0f7ff;
}

.topic-icon {
    font-size: 20px;
    color: #666;
    margin-right: 15px;
    position: relative;
    padding-top: 5px;
}

.status-icon {
    position: absolute;
    top: 0;
    right: -5px;
    font-size: 12px;
}

.status-icon.locked {
    color: #dc3545;
}

.topic-details {
    flex: 1;
}

.topic-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.topic-details h3 a {
    color: #0066cc;
    text-decoration: none;
}

.topic-details h3 a:hover {
    text-decoration: underline;
}

.topic-meta {
    color: #666;
    font-size: 0.9rem;
}

.author {
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
}

.badge-pinned {
    background-color: #ffc107;
    color: #212529;
}

.badge-featured {
    background-color: #17a2b8;
    color: white;
}

.badge-locked {
    background-color: #6c757d;
    color: white;
}

.topic-stats {
    display: flex;
    gap: 15px;
    margin: 0 20px;
}

.stat {
    text-align: center;
}

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

.stat .label {
    font-size: 0.8rem;
    color: #666;
}

.topic-last-post {
    min-width: 150px;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.no-topics {
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.no-topics p {
    margin-bottom: 15px;
    color: #666;
}

.btn-create-topic {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0066cc;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* Topic View */
.topic-navigation {
    margin-bottom: 25px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--forum-text-secondary);
    text-decoration: none;
    gap: 8px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--forum-border);
}

.back-link:hover {
    text-decoration: none;
    color: var(--forum-primary);
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .back-link {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .back-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.topic-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.topic-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.topic-header h1 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: #333;
}

.topic-status-badges {
    display: flex;
    gap: 8px;
}

.post {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.post.original-post {
    background-color: #f8f9fa;
}

.post-author {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info .author-name {
    font-weight: 600;
    color: #333;
}

.author-info .post-date {
    font-size: 0.85rem;
    color: #666;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

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

.post-stats {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

.replies-section {
    padding: 20px;
}

.replies-section h3 {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.no-replies {
    text-align: center;
    padding: 30px 0;
    color: #666;
}

.reply-form-container {
    padding: 20px;
    background-color: #f8f9fa;
}

.reply-form-container h3 {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    color: #333;
}

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

.reply-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.reply-form textarea, 
.reply-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.reply-form textarea:focus, 
.reply-form input[type="text"]:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
}

.btn-submit {
    padding: 10px 20px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #0052a3;
}

.btn-cancel {
    padding: 10px 20px;
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel:hover {
    background-color: #e5e5e5;
    text-decoration: none;
}

.topic-locked-message {
    padding: 30px;
    text-align: center;
    background-color: #f8f9fa;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.topic-locked-message i {
    font-size: 2rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
}

.required {
    color: #dc3545;
}

.form-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
}

/* New Topic Form - Enhanced Styling */
.new-topic-container {
    background-color: var(--forum-card-bg);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    border: 1px solid var(--forum-border);
}

.new-topic-header {
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--forum-border);
}

.new-topic-header h1 {
    font-size: 1.8rem;
    margin: 0 0 12px 0;
    color: var(--forum-text);
    font-weight: 700;
    position: relative;
}

.new-topic-header p {
    color: var(--forum-text-secondary);
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.moderation-notice {
    display: flex;
    align-items: center;
    background-color: rgba(255, 243, 205, 0.7);
    border-left: 4px solid #f0ad4e;
    color: #856404;
    padding: 16px 20px;
    margin: 0 0 28px 0;
    border-radius: 6px;
    gap: 15px;
    transition: all 0.3s ease;
}

.moderation-notice:hover {
    background-color: rgba(255, 243, 205, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.moderation-notice i {
    font-size: 1.5rem;
    color: #f0ad4e;
}

.moderation-notice p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

[data-theme="dark"] .moderation-notice {
    background-color: rgba(58, 53, 32, 0.7);
    border-color: #f0ad4e;
    color: #e0d9a0;
}

.new-topic-form .form-group {
    margin-bottom: 24px;
}

.new-topic-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--forum-text);
    font-size: 1.05rem;
    transition: color 0.2s;
}

.new-topic-form .form-group:focus-within label {
    color: var(--forum-primary);
}

.new-topic-form input[type="text"],
.new-topic-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--forum-border);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--forum-card-bg);
    color: var(--forum-text);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02) inset;
    line-height: 1.5;
}

.new-topic-form input[type="text"]:focus,
.new-topic-form textarea:focus {
    border-color: var(--forum-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.new-topic-form .form-hint {
    font-size: 0.9rem;
    color: var(--forum-text-muted);
    margin-top: 8px;
    padding-left: 2px;
    transition: color 0.2s;
}

.new-topic-form .form-group:focus-within .form-hint {
    color: var(--forum-text-secondary);
}

.required {
    color: #dc3545;
    margin-left: 3px;
}

.new-topic-form .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    position: relative;
}

.new-topic-form .btn-submit {
    padding: 14px 30px;
    background-color: var(--forum-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 102, 204, 0.2);
    flex: 1;
    max-width: 180px;
}

.new-topic-form .btn-submit:hover {
    background-color: var(--forum-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 102, 204, 0.25);
}

.new-topic-form .btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 102, 204, 0.2);
}

.new-topic-form .btn-cancel {
    padding: 14px 30px;
    background-color: transparent;
    color: var(--forum-text-secondary);
    border: 2px solid var(--forum-border);
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 180px;
}

.new-topic-form .btn-cancel:hover {
    background-color: rgba(0, 0, 0, 0.03);
    border-color: var(--forum-text-secondary);
    text-decoration: none;
    color: var(--forum-text);
}

[data-theme="dark"] .new-topic-form .btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: "•";
    font-size: 1.2rem;
}

/* Responsive adjustments for new topic form */
@media (max-width: 768px) {
    .new-topic-container {
        padding: 20px;
    }
    
    .new-topic-form .form-actions {
        flex-direction: column;
    }
    
    .new-topic-form .btn-submit,
    .new-topic-form .btn-cancel {
        max-width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .topic-item {
        flex-direction: column;
    }
    
    .topic-stats {
        margin: 15px 0;
    }
    
    .topic-last-post {
        text-align: left;
        margin-top: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit, .btn-cancel {
        width: 100%;
    }
} 