/**
 * AI Quiz Plugin Styles
 * SEO ve AdSense uyumlu tasarım
 */

/* Quiz Container */
.aiq-quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Quiz Header */
.aiq-quiz-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.aiq-quiz-title {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.aiq-quiz-description {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
    line-height: 1.5;
}

.aiq-quiz-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.aiq-quiz-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

/* Test Bilgileri Kartı */
.test-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: white;
}

.test-info-section {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.test-info-section:last-child {
    margin-bottom: 0;
}

.test-info-section h3 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.test-info-section p {
    color: rgba(255,255,255,0.95);
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
}

/* Quiz Start Buttons */
.aiq-quiz-start-buttons {
    text-align: center;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.aiq-quiz-start-btn,
.aiq-quiz-difficulty-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
    min-width: 120px;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.aiq-quiz-start-btn {
    background: #667eea;
}

.aiq-quiz-start-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.aiq-quiz-difficulty-btn {
    background: #6c757d;
}

.aiq-quiz-difficulty-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* Progress Bar */
.aiq-quiz-progress {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.aiq-progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.aiq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.aiq-progress-text {
    font-weight: 600;
    color: #666;
    min-width: 80px;
    font-size: 14px;
}

/* Timer */
.aiq-quiz-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    font-weight: 600;
    color: #856404;
}

.aiq-timer-display {
    font-size: 18px;
    font-family: 'Courier New', monospace;
}

/* Questions */
.aiq-questions-container {
    margin-bottom: 30px;
}

.aiq-question {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.aiq-question:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.aiq-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.aiq-question-number {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}

.aiq-question-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.aiq-question-text {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

.aiq-question-image {
    margin: 20px 0;
    text-align: center;
}

.aiq-question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Question Options */
.aiq-question-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aiq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.aiq-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(5px);
}

.aiq-option input[type="radio"] {
    margin: 0;
    transform: scale(1.2);
    accent-color: #667eea;
}

.aiq-option input[type="radio"]:checked + .aiq-option-letter + .aiq-option-text {
    font-weight: 600;
    color: #667eea;
}

.aiq-option:has(input:checked) {
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.aiq-option-letter {
    font-weight: bold;
    color: #667eea;
    margin-right: 8px;
    min-width: 20px;
    font-size: 16px;
}

.aiq-option-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
}

/* Text Input */
.aiq-text-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.aiq-text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Question Hint */
.aiq-question-hint {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aiq-question-hint strong {
    color: #1976d2;
    font-size: 14px;
    font-weight: 600;
}

.aiq-question-hint p {
    margin: 0;
    color: #424242;
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
}

/* Navigation */
.aiq-quiz-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    padding: 20px 0;
}

/* Buttons */
.aiq-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
    justify-content: center;
}

.aiq-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.aiq-btn-primary {
    background: #667eea;
    color: white;
}

.aiq-btn-primary:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.aiq-btn-secondary {
    background: #6c757d;
    color: white;
}

.aiq-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.aiq-btn-success {
    background: #28a745;
    color: white;
}

.aiq-btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.aiq-submit-btn {
    padding: 20px 50px;
    font-size: 20px;
    font-weight: 700;
    width: 300px;
    height: 60px;
    border-radius: 30px;
    display: block;
    margin: 0 auto;
}

/* Results */
.aiq-quiz-results {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.aiq-results-header h3 {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

.aiq-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.aiq-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#4CAF50 0deg, #e0e0e0 0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.aiq-score-circle::before {
    content: '';
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.aiq-score-percentage {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    z-index: 1;
}

.aiq-score-details {
    text-align: left;
}

.aiq-score-text {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #666;
}

.aiq-score-fraction {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.aiq-results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* Social Share */
.aiq-social-share {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

.aiq-social-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    color: white !important;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.social-icons .facebook { background: linear-gradient(135deg, #4267B2, #365899); }
.social-icons .twitter { background: linear-gradient(135deg, #000000, #333333); }
.social-icons .instagram { background: linear-gradient(135deg, #E1306C, #C13584, #833AB4); }
.social-icons .linkedin { background: linear-gradient(135deg, #0077B5, #005885); }
.social-icons .pinterest { background: linear-gradient(135deg, #BD081C, #9D0619); }
.social-icons .telegram { background: linear-gradient(135deg, #0088CC, #0077B3); }
.social-icons .whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.social-icons .reddit { background: linear-gradient(135deg, #FF4500, #E03D00); }

/* Detailed Results */
.aiq-detailed-results {
    text-align: left;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.aiq-detailed-results h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.aiq-result-item {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #e0e0e0;
    background: #fafafa;
    transition: all 0.3s ease;
}

.aiq-result-item.correct {
    background: #f8fff8;
    border-left-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.aiq-result-item.incorrect {
    background: #fff8f8;
    border-left-color: #f44336;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.1);
}

.aiq-result-question {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
}

/* Result Options Styling */
.aiq-result-options {
    margin: 15px 0;
}

.aiq-result-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.2s ease;
    font-size: 15px;
    line-height: 1.4;
}

.aiq-result-option.correct-option {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.aiq-result-option.incorrect-option {
    background: #f8f9fa;
    border-left-color: #6c757d;
    color: #495057;
}

.aiq-result-option .option-letter {
    font-weight: bold;
    margin-right: 10px;
    min-width: 25px;
    font-size: 16px;
}

.aiq-result-option .option-text {
    flex: 1;
}

.aiq-result-option .correct-indicator {
    color: #28a745;
    font-weight: bold;
    margin-left: 10px;
    font-size: 14px;
}

.aiq-result-option .user-answer-indicator {
    color: #007bff;
    font-weight: bold;
    margin-left: 10px;
    font-size: 14px;
}

/* Legacy styles for backward compatibility */
.aiq-result-answer {
    margin: 5px 0;
    font-size: 14px;
}

.aiq-result-answer.user-answer {
    color: #666;
}

.aiq-result-answer.correct-answer {
    color: #4CAF50;
    font-weight: 600;
}

.aiq-result-explanation {
    margin-top: 15px;
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    font-size: 14px;
    color: #424242;
    line-height: 1.5;
}

.aiq-result-explanation strong {
    color: #1976d2;
    font-weight: 600;
}

.aiq-result-hint {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    font-size: 14px;
    color: #856404;
    line-height: 1.5;
}

.aiq-result-hint strong {
    color: #856404;
    font-weight: 600;
}

/* Results Summary */
.aiq-results-summary {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px solid #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.aiq-results-summary h5 {
    margin: 0 0 15px 0;
    color: #28a745;
    font-size: 18px;
    font-weight: 600;
}

/* Error Messages */
.aiq-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin: 20px 0;
}

/* Loading State */
.aiq-quiz-container.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.aiq-quiz-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: aiq-spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

@keyframes aiq-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Animations */
.aiq-question {
    animation: aiq-fadeIn 0.3s ease-in;
}

@keyframes aiq-fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .aiq-quiz-container {
        padding: 15px;
    }
    
    .aiq-quiz-header {
        padding: 20px;
    }
    
    .aiq-quiz-title {
        font-size: 24px;
    }
    
    .aiq-quiz-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .aiq-question {
        padding: 20px;
    }
    
    .aiq-question-text {
        font-size: 18px;
    }
    
    .aiq-quiz-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .aiq-score-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .aiq-results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .social-icons {
        gap: 8px;
    }
    
    .social-icons a {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .aiq-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .aiq-quiz-start-buttons {
        flex-direction: column !important;
        gap: 20px !important;
        align-items: center !important;
    }
    
    .aiq-quiz-start-btn,
    .aiq-quiz-difficulty-btn {
        width: 100% !important;
        max-width: 250px !important;
        margin: 0 !important;
    }
    
    .aiq-submit-btn {
        width: 100%;
        max-width: 280px;
        padding: 15px 30px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .aiq-quiz-start-buttons {
        gap: 25px !important;
        padding: 0 20px;
    }
    
    .aiq-quiz-start-btn,
    .aiq-quiz-difficulty-btn {
        font-size: 14px !important;
        padding: 14px 20px !important;
        max-width: 200px !important;
    }
    
    .aiq-question {
        padding: 15px;
    }
    
    .aiq-question-text {
        font-size: 16px;
    }
    
    .aiq-option {
        padding: 12px;
    }
    
    .aiq-option-text {
        font-size: 14px;
    }
}

/* AdSense Uyumlu Alanlar */
.aiq-ad-space {
    margin: 30px 0;
    text-align: center;
    min-height: 250px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
}

.aiq-ad-space.horizontal {
    min-height: 90px;
}

.aiq-ad-space.sidebar {
    min-height: 600px;
    width: 300px;
}

/* SEO İyileştirmeleri */
.aiq-quiz-container h1,
.aiq-quiz-container h2,
.aiq-quiz-container h3 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

.aiq-quiz-container p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.aiq-quiz-container a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.aiq-quiz-container a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Print Styles */
@media print {
    .aiq-quiz-container {
        max-width: none;
        padding: 0;
    }
    
    .aiq-quiz-navigation,
    .aiq-social-share,
    .aiq-results-actions {
        display: none;
    }
    
    .aiq-question {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}