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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000000;
}

header p {
    font-size: 1.1rem;
    color: #666666;
}

/* Sections */
.section {
    margin-bottom: 40px;
    padding: 30px;
    border: 2px solid #000000;
    border-radius: 8px;
    background-color: #ffffff;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #000000;
    font-weight: 600;
}

.section h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #000000;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: 2px solid #000000;
    background-color: #ffffff;
    color: #000000;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

.btn:hover {
    background-color: #000000;
    color: #ffffff;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-secondary {
    background-color: #ffffff;
    color: #000000;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #000000;
    color: #000000;
}

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

/* Upload Section */
.upload-area {
    text-align: center;
    padding: 40px;
    border: 2px dashed #000000;
    border-radius: 8px;
    background-color: #fafafa;
}

.upload-info {
    margin-top: 15px;
    color: #666666;
    font-size: 0.9rem;
}

/* File Management */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #000000;
    border-radius: 4px;
    background-color: #fafafa;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.file-stats {
    font-size: 0.9rem;
    color: #666666;
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* Mode Selection */
.randomize-option {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #000000;
    border-radius: 4px;
    background-color: #fafafa;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #000000;
    border-radius: 3px;
    margin-right: 12px;
    position: relative;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #000000;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mode-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.category-selection {
    padding: 20px;
    border: 1px solid #000000;
    border-radius: 4px;
    background-color: #fafafa;
    margin-top: 20px;
}

.select {
    width: 100%;
    padding: 10px;
    border: 2px solid #000000;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Flashcard */
.flashcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #000000;
}

.progress-info {
    display: flex;
    gap: 20px;
    font-weight: 600;
}

.flashcard {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.question {
    margin-bottom: 30px;
    text-align: center;
}

.question h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

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

.option-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #000000;
    background-color: #ffffff;
    color: #000000;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.option-btn:hover {
    background-color: #f5f5f5;
}

.option-btn.selected {
    background-color: #000000;
    color: #ffffff;
}

.option-btn.correct {
    background-color: #28a745;
    color: #ffffff;
    border-color: #28a745;
}

.option-btn.incorrect {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.option-label {
    font-weight: 700;
    margin-right: 15px;
    min-width: 25px;
}

.option-text {
    flex: 1;
}

/* Feedback */
.feedback {
    margin-top: 30px;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}

.feedback.correct {
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.feedback.incorrect {
    background-color: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

#feedback-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

/* Results */
.results-content {
    text-align: center;
}

.score-summary {
    margin-bottom: 30px;
    padding: 30px;
    border: 2px solid #000000;
    border-radius: 8px;
    background-color: #fafafa;
}

.score-summary h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.score-summary p {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666666;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 20px;
    }
    
    .flashcard {
        padding: 20px;
    }
    
    .mode-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .flashcard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .results-actions {
        flex-direction: column;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}