* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
}

.main-header {
    background-color: #3498db;
    color: #fff;
    padding: 20px 0;
    width: 100%;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.main-header h1 {
    font-size: 32px;
    margin: 0;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 15px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.category-btn {
    padding: 10px 15px;
    background-color: #f4f6f8;  
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: 500;
    color: #333;
}

.category-btn:hover {
    background-color: #e6e9ec;
    transform: translateY(-2px);
}

.category-btn.active {
    background-color: #2ecc71;
    color: white;
    border-color: #27ae60;
}

.search-container {
    display: flex;
    min-width: 250px;
}

#searchInput {
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 100%;
    font-size: 16px;
    border: 1px solid #ddd;
}

#searchButton {
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#searchButton:hover {
    background-color: #1c638d;
}

#loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #7f8c8d;
}

#question-list {
    margin-bottom: 20px;
}

.question-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.question-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Animation for correct answer */
@keyframes celebrate {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    75% { transform: translateY(10px); }
}

/* Animation for incorrect answer */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.celebrate-animation {
    animation: celebrate 0.6s ease-in-out;
}

.shake-animation {
    animation: shake 0.6s ease-in-out;
}

.question-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.question-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #555;
    font-size: 14px;
}

.question-code {
    font-weight: bold;
    color: #3498db;
}

.question-category {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
}

.question-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Answers styles */
.question-answers {
    margin-bottom: 20px;
}

.answer-option {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    transition: background-color 0.3s;
    cursor: pointer;
}

.answer-option-content {
    display: flex;
    align-items: center;
}

.answer-option:hover {
    background-color: #f8f9fa;
}

.scissor-icon {
    margin-right: 15px; 
    color: #777;
    cursor: pointer;
}

.answer-letter {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3498db;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.answer-text {
    flex: 1;
}

.answer-strikethrough .answer-text {
    text-decoration: line-through;
    color: #999;
}

.selected-answer {
    background-color: rgba(52, 152, 219, 0.2); 
}

.answer-feedback {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    background-color: rgba(249, 249, 249, 0.7);
    border: 1px solid #e0e0e0;
}

.correct-answer {
    background-color: rgba(46, 204, 113, 0.2) !important;
    border: 1px solid #2ecc71 !important;
}

.incorrect-answer {
    background-color: rgba(231, 76, 60, 0.2) !important;
    border: 1px solid #e74c3c !important;
}

.answer-comment {
    font-style: italic;
    color: #34495e;
    background-color: rgba(248, 249, 250, 0.7);
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
}

/* Question actions */
.question-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.answer-btn {
    background-color: #3498db;
    color: white;
}

.answer-btn:hover {
    background-color: #2980b9;
}

.answer-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.comment-btn {
    background-color: #f39c12;
    color: white;
}

.comment-btn:hover {
    background-color: #d35400;
}

.answer-result {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.correct-result {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.incorrect-result {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

/* Pagination styles */
#pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 12px;
    background-color: #f4f6f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.page-btn:hover {
    background-color: #e6e9ec;
}

.page-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

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

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.comment-content {
    margin-top: 15px;
    padding: 15px;
    background-color: #f1f8e9;
    border-radius: 4px;
    color: #2c3e50;
    line-height: 1.6;
}

#report-modal .modal-content {
    max-width: 600px;
}

.report-form {
    margin-top: 20px;
}

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

.report-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.report-form button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.report-form button:hover {
    background-color: #c0392b;
}

.report-question-details {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
}

#report-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

#report-status.success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border: 1px solid #2ecc71;
}

#report-status.error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border: 1px solid #e74c3c;
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        width: 100%;
    }
    
    .categories {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .question-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .answer-result {
        text-align: center;
    }
}