/* Türkçe Öğretim Eklentisi - Frontend Stilleri */

.turkce-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Quiz Header */
.quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: -20px -20px 30px -20px;
    padding: 30px 20px 20px 20px;
    border-radius: 12px 12px 0 0;
}

.quiz-header h2 {
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.quiz-header h3 {
    margin-bottom: 15px;
    font-size: 22px;
    font-weight: 500;
    opacity: 0.9;
}

.quiz-description {
    font-style: italic;
    margin-bottom: 20px;
    opacity: 0.8;
    font-size: 16px;
}

/* Progress Bar */
.quiz-progress {
    margin-top: 25px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.4s ease;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

/* Question Container */
.question-container {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 5px solid #0073aa;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.question-text {
    font-size: 20px;
    line-height: 1.7;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Media Elements */
.question-media {
    text-align: center;
    margin: 25px 0;
}

.question-media img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.question-media img:hover {
    transform: scale(1.02);
}

.question-media video {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Audio Controls */
.audio-controls {
    text-align: center;
    margin: 25px 0;
}

.play-audio-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.play-audio-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.play-audio-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Answer Section */
.answer-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.answer-input-container {
    margin-bottom: 20px;
}

.answer-input-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.answer-input {
    flex: 1;
    padding: 15px 18px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.answer-input:focus {
    outline: none;
    border-color: #0073aa;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.voice-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    min-width: 60px;
}

.voice-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Voice Recording */
.voice-recording {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.recording-indicator {
    color: #856404;
    font-weight: 600;
    font-size: 14px;
}

.stop-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.stop-btn:hover {
    background: #c82333;
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.submit-btn, .skip-btn, .next-btn, .restart-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.submit-btn {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #005a87, #004a73);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.skip-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.skip-btn:hover {
    background: linear-gradient(135deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.next-btn, .restart-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.next-btn:hover, .restart-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Feedback Section */
.feedback-section {
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease;
}

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

.feedback-section.correct {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    color: #155724;
}

.feedback-section.incorrect {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 2px solid #dc3545;
    color: #721c24;
}

.feedback-message {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Navigation */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.nav-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    border: 2px solid #dee2e6;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 120px;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quiz Complete */
.quiz-complete {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.quiz-complete h3 {
    color: #28a745;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.final-score {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border: 2px solid #e9ecef;
}

.final-score p {
    margin: 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .turkce-quiz-container {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
    }
    
    .quiz-header {
        margin: -15px -15px 20px -15px;
        padding: 25px 15px 15px 15px;
        border-radius: 8px 8px 0 0;
    }
    
    .quiz-header h2 {
        font-size: 24px;
    }
    
    .quiz-header h3 {
        font-size: 18px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .answer-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .submit-btn, .skip-btn, .next-btn, .restart-btn {
        width: 100%;
        min-width: auto;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        width: 100%;
        min-width: auto;
    }
    
    .final-score {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .question-container {
        padding: 20px;
    }
    
    .answer-section {
        padding: 20px;
    }
    
    .quiz-complete {
        padding: 30px 20px;
    }
    
    .quiz-header h2 {
        font-size: 20px;
    }
    
    .quiz-header h3 {
        font-size: 16px;
    }
    
    .question-text {
        font-size: 16px;
    }
}

/* Accessibility */
.turkce-quiz-container *:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .turkce-quiz-container {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .question-container {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        color: #ecf0f1;
    }
    
    .answer-section {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .answer-input {
        background: #2c3e50;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .answer-input:focus {
        background: #34495e;
        border-color: #3498db;
    }
}


/* Sürükle-bırak soru stilleri */
.drag-drop-question {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.drag-drop-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.drag-items-container,
.drop-zones-container {
    flex: 1;
    min-width: 250px;
}

.drag-items-container h4,
.drop-zones-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.drag-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.drag-item {
    background: #007cba;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.drag-item:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.drag-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(5deg);
}

.drag-item.placed {
    opacity: 0.3;
    cursor: not-allowed;
    background: #6c757d;
}

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

.drop-zone {
    min-height: 60px;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 15px;
    background: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.drop-zone.drag-over {
    border-color: #007cba;
    background: #e7f3ff;
    transform: scale(1.02);
}

.drop-zone.correct {
    border-color: #28a745;
    background: #d4edda;
    animation: correctPulse 0.6s ease;
}

.drop-zone.incorrect {
    border-color: #dc3545;
    background: #f8d7da;
    animation: incorrectShake 0.6s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.drop-label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.drop-zone .drag-item {
    margin: 0;
    cursor: default;
}

.drag-drop-result {
    margin-top: 20px;
    padding: 20px;
    background: #e7f3ff;
    border: 1px solid #007cba;
    border-radius: 6px;
    text-align: center;
}

.drag-drop-result h4 {
    margin-bottom: 15px;
    color: #007cba;
    font-size: 18px;
}

.reset-drag-drop-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.reset-drag-drop-btn:hover {
    background: #005a87;
}

/* Dokunmatik cihazlar için iyileştirmeler */
@media (max-width: 768px) {
    .drag-drop-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .drag-item {
        padding: 15px 20px;
        font-size: 16px;
        touch-action: none;
    }
    
    .drop-zone {
        min-height: 80px;
        padding: 20px;
    }
    
    .drag-items {
        justify-content: center;
    }
}

/* Erişilebilirlik iyileştirmeleri */
.drag-item:focus,
.drop-zone:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.drag-item[aria-grabbed="true"] {
    opacity: 0.5;
}

.drop-zone[aria-dropeffect="move"] {
    border-color: #007cba;
    background: #e7f3ff;
}

/* Yüksek kontrast modu desteği */
@media (prefers-contrast: high) {
    .drag-item {
        border: 2px solid #000;
    }
    
    .drop-zone {
        border-width: 3px;
    }
    
    .drop-zone.correct {
        border-color: #000;
        background: #fff;
    }
    
    .drop-zone.incorrect {
        border-color: #000;
        background: #fff;
    }
}

/* Animasyon azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .drag-item,
    .drop-zone {
        transition: none;
    }
    
    .drop-zone.correct,
    .drop-zone.incorrect {
        animation: none;
    }
    
    .drag-item:hover {
        transform: none;
    }
    
    .drop-zone.drag-over {
        transform: none;
    }
}

