.forum-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
.page-header {
    margin-bottom: 30px;
    text-align: center;
}
.page-title {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}
.page-subtitle {
    color: #666;
    font-size: 1.1rem;
}
.new-post-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.new-post-header {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.btn-submit {
    background: #667eea;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover {
    background: #5568d3;
}
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.btn-edit {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 8px;
}
.btn-edit:hover {
    background: #5568d3;
}
.post-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.post-subject {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}
.post-type-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 4px 10px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    margin-right: 8px;
    font-weight: 500;
    vertical-align: middle;
}
.post-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}
.post-author {
    font-weight: 500;
}
.post-date {
    color: #999;
}
.post-preview {
    color: #555;
    margin-top: 10px;
    line-height: 1.5;
}
.post-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}
.reply-count {
    font-weight: 500;
}
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
.login-prompt {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}
.login-prompt a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}
.login-prompt a:hover {
    text-decoration: underline;
}
.view-mode {
    display: none;
}
.view-mode.active {
    display: block;
}
.back-to-forum {
    display: inline-block;
    margin-bottom: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.back-to-forum:hover {
    text-decoration: underline;
}
.post-detail {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.post-detail .post-subject {
    font-size: 2rem;
    margin-bottom: 15px;
}
.post-body {
    color: #555;
    line-height: 1.7;
    white-space: pre-wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.replies-section {
    margin-top: 30px;
}
.replies-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}
.reply-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.reply-author {
    font-weight: 600;
    color: #333;
}
.reply-date {
    color: #999;
    font-size: 0.9rem;
}
.reply-body {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}
.reply-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-delete {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-delete:hover {
    background: #c82333;
}

.post-card-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.btn-edit-post-card {
    background: #667eea;
    color: white;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.btn-edit-post-card:hover {
    background: #5568d3;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.modal-close {
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-body textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn-save-edit,
.modal-footer .btn-cancel-edit {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.modal-footer .btn-save-edit {
    background: #667eea;
    color: white;
}

.modal-footer .btn-save-edit:hover {
    background: #5568d3;
}

.modal-footer .btn-cancel-edit {
    background: #e9ecef;
    color: #333;
}

.modal-footer .btn-cancel-edit:hover {
    background: #dee2e6;
}
