/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

/* File Upload Styles */
.upload-section {
    margin-bottom: 30px;
    text-align: center;
}

.file-upload {
    margin-bottom: 20px;
}

/* File Browser Styles */
.file-browser-section {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
}

.file-browser-section h2 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.file-browser {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
}

.file-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: #f0f7ff;
}

.file-item.selected {
    background-color: #e3f2fd;
    font-weight: bold;
}

.file-item-icon {
    margin-right: 10px;
    color: #4285f4;
}

.loading-text {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
}

.file-upload-label {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.file-upload-label:hover {
    background-color: #2980b9;
}

.file-upload input[type="file"] {
    display: none;
}

#fileName {
    margin-top: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

/* Quiz Container Styles */
.quiz-container {
    margin-bottom: 30px;
}

.question {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
}

.question h3 {
    margin-top: 0;
    color: #333;
}

.side-by-side-container {
    display: flex;
    margin-top: 15px;
    gap: 20px;
}

.question-side {
    flex: 1;
    border-right: 1px solid #eee;
    padding-right: 20px;
}

.answer-side {
    flex: 1;
    padding-left: 10px;
}

.options {
    margin-top: 15px;
}

.option {
    margin-bottom: 10px;
}

.option label {
    margin-left: 10px;
    cursor: pointer;
}

.answer-display {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.answer-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    background-color: #f0f0f0;
}

.answer-status.correct {
    background-color: #d4edda;
    color: #155724;
}

.answer-status.incorrect {
    background-color: #f8d7da;
    color: #721c24;
}

/* Hidden class for answer display */
.answer-display.hidden {
    display: none;
}

/* Reveal button styles */
.reveal-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 10px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.reveal-btn:hover {
    background-color: #0069d9;
}

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

.option {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
}

.option:hover {
    background-color: #f0f0f0;
}

.option input {
    margin-right: 10px;
}

/* Controls Styles */
.controls {
    text-align: center;
    margin-bottom: 30px;
}

.btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #27ae60;
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Results Container Styles */
.results-container {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: none;
}

.results-container.show {
    display: block;
}

.score {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.result-details {
    margin-top: 20px;
}

.result-item {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    text-align: left;
}

.result-item.correct {
    background-color: rgba(46, 204, 113, 0.2);
    border-left: 4px solid #2ecc71;
}

.result-item.incorrect {
    background-color: rgba(231, 76, 60, 0.2);
    border-left: 4px solid #e74c3c;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .question {
        padding: 15px;
    }
}