/* Responsive styles for mobile and tablet devices */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    #app {
        padding: 12px;
    }
    
    h1 { font-size: 1.75em; }
    h2 { font-size: 1.3em; }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .course-card {
        padding: 16px;
    }
    
    .course-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .course-name {
        font-size: 16px;
    }
    
    .course-description {
        font-size: 13px;
    }
    
    .quiz-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quiz-score {
        font-size: 20px;
        min-width: auto;
    }
    
    .quiz-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .quiz-content {
        padding: 20px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .option {
        padding: 12px 16px;
    }
    
    .score-circle {
        width: 160px;
        height: 160px;
    }
    
    .score-value {
        font-size: 36px;
    }
    
    .score-percentage {
        font-size: 20px;
    }
    
    .motivational-message {
        font-size: 18px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    #app {
        padding: 8px;
    }
    
    h1 { font-size: 1.5em; }
    h2 { font-size: 1.2em; }
    h3 { font-size: 1.1em; }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .course-card {
        flex-direction: column;
        padding: 12px;
    }
    
    .course-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
        margin: 0 auto;
    }
    
    .course-info {
        text-align: center;
    }
    
    .course-stats {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .quiz-header {
        padding: 12px 16px;
    }
    
    .quiz-title {
        font-size: 14px;
    }
    
    .quiz-timer {
        font-size: 14px;
    }
    
    .quiz-content {
        padding: 16px;
    }
    
    .question-text {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .options-list {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .option {
        padding: 10px 12px;
    }
    
    .option-indicator {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .question-navigator {
        gap: 6px;
        padding: 16px 0;
    }
    
    .nav-dot {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
    .quiz-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .quiz-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .quiz-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
        border-width: 8px;
    }
    
    .score-value {
        font-size: 28px;
    }
    
    .score-percentage {
        font-size: 16px;
    }
    
    .score-stars {
        font-size: 24px;
    }
    
    .motivational-message {
        font-size: 16px;
    }
    
    .breakdown-item {
        padding: 10px;
    }
    
    .breakdown-icon {
        font-size: 20px;
    }
    
    .breakdown-value {
        font-size: 16px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .course-header {
        padding: 16px;
    }
    
    .course-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .course-actions .btn {
        width: 100%;
    }
    
    .course-stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .form-submit {
        flex-direction: column;
    }
    
    .form-submit .btn {
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Extra small mobile (320px) */
@media (max-width: 320px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .course-stats-section {
        grid-template-columns: 1fr;
    }
    
    .course-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .option {
        min-height: 56px;
        padding: 16px;
    }
    
    .nav-dot {
        min-width: 44px;
        min-height: 44px;
    }
    
    .icon-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-value {
        font-size: 24px;
    }
    
    .score-percentage {
        font-size: 14px;
    }
    
    /* Help Page - Mobile */
    .help-header h1 {
        font-size: 1.8em;
    }
    
    .help-section {
        padding: 20px;
    }
    
    .step {
        flex-direction: column;
        gap: 12px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .format-table {
        font-size: 0.9em;
    }
    
    .format-table th, .format-table td {
        padding: 8px;
    }
    
    .code-example, .code-block {
        padding: 12px;
    }
    
    .code-example pre, .code-block pre {
        font-size: 12px;
    }
}
