/* Forum Styles */

* {
    box-sizing: border-box;
}

.forum-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.forum-header h1 {
    margin: 0;
    font-size: 2em;
    color: #333;
}

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

.btn-primary {
    background-color: #ff6b35;
    color: white;
}

.btn-primary:hover {
    background-color: #e85a2a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Votes Section */
.question-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 50px;
}

.upvote-btn {
    background: none;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
}

.upvote-btn:hover:not(:disabled) {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: scale(1.1);
}

.upvote-btn.upvoted {
    background-color: #ff6b35;
    border-color: #ff6b35;
    color: white;
}

.upvote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vote-count {
    font-weight: 700;
    font-size: 18px;
    color: #333;
}

/* Question Content */
.question-content {
    flex: 1;
}

.question-title {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.question-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.question-title a:hover {
    color: #ff6b35;
}

.question-description {
    margin: 10px 0;
    color: #666;
    line-height: 1.6;
}

.question-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
    margin-top: 15px;
}

.question-meta span {
    display: flex;
    align-items: center;
}

.author {
    color: #666;
    font-weight: 500;
}

/* Question Detail Page */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #ff6b35;
    text-decoration: none;
    font-size: 14px;
}

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

.question-detail {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
}

.question-content-detail h1 {
    margin: 0 0 15px 0;
    font-size: 2em;
    color: #333;
}

.question-description-full {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin: 20px 0;
}

/* Answer Form */
.answer-form-section {
    background: white;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 30px;
}

.answer-form-section h3 {
    margin: 0 0 20px 0;
    color: #333;
}

/* Answers Section */
.answers-section {
    margin-top: 30px;
}

.answers-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.answer-card {
    background: white;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.admin-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.answer-content p {
    font-size: 1.05em;
    line-height: 1.7;
    color: #444;
    margin: 10px 0;
}

.answer-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.favorite-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 6px 15px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    margin-left: auto;
}

.favorite-btn:hover:not(:disabled) {
    border-color: #ff6b35;
    color: #ff6b35;
    transform: scale(1.05);
}

.favorite-btn.favorited {
    background-color: #fff5f2;
    border-color: #ff6b35;
    color: #ff6b35;
}

.favorite-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.favorite-count {
    font-weight: 600;
    font-size: 14px;
}

/* Modal */
.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.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin: 0 0 25px 0;
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Empty States */
.no-questions,
.no-answers {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-questions p,
.no-answers p {
    font-size: 1.2em;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forum-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .question-card {
        flex-direction: column;
    }
    
    .question-votes {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .question-detail {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}
