/* Tablet */
@media (max-width: 768px) {
    .app-container {
        padding: 2px;
    }

    .app-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .app-header h1 {
        font-size: 1.5rem;
    }

    .mode-toggle {
        width: 100%;
        justify-content: center;
    }

    .number-grid {
        gap: 6px;
    }

    .number-value {
        font-size: 1rem;
    }

    .weight-indicator {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .results-cards {
        grid-template-columns: 1fr;
    }

    .statistics-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .results-table {
        font-size: 0.85rem;
    }

    .results-table th,
    .results-table td {
        padding: 8px 4px;
    }
    
    .filter-grid {
    gap: 30px;
}
}

/* Mobile */
@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.3rem;
    }

    .mode-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        display: flex;
        flex-direction: column;
    }

    .mode-btn .icon {
        width: 16px;
        height: 16px;
    }

    .card {
        padding: 16px;
        border-radius: 8px;
    }

    .number-grid {
        gap: 4px;
    }

    .number-value {
        font-size: 0.9rem;
    }

    .weight-indicator {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
        bottom: 2px;
        right: 2px;
    }

    .weight-legend {
        font-size: 0.75rem;
        gap: 8px;
    }

    .color-box {
        width: 16px;
        height: 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .results-controls {
        justify-content: space-between;
    }

    .statistics-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 8px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .result-grid {
        gap: 3px;
    }

    .result-number-cell {
        font-size: 0.8rem;
    }

    .result-analysis {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .analysis-item {
        font-size: 0.75rem;
    }

    /* Hide table view on mobile, force card view */
    .view-btn[data-view="table"] {
        display: none;
    }

    .results-table {
        display: none;
    }

    .pagination {
        gap: 4px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    .contest-range {
        grid-template-columns: 1fr;
    }

    .scores-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .score-item {
        padding: 0px;
    }

    .score-label {
        font-size: 0.75rem;
    }

    .score-value {
        font-size: 1rem;
    }

    .weight-selector {
        width: 90%;
        padding: 16px;
    }

    .weight-options {
        gap: 6px;
    }

    .weight-option {
        padding: 10px;
        font-size: 0.85rem;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .score-filter-buttons {
        grid-template-columns: repeat(1, 1fr);
        gap: 2px;
    }
    
    .results-filters-panel {
        padding: 8px;
    }
    
    .filter-section {
        padding: 10px;
    }
    
    .filter-grid {
    gap: 20px;
}

.div-btn-todos-pontuados {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 10px;
    box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
    gap: 10px;
    background: #ffffff;
}

.scores-summary-content {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 5px;
    width: 100%;
    flex-wrap: wrap;
}

.checker-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

#btnGenerate {
    padding: 10px 16px !important;
    font-size: 1rem !important;
}


.filter-management-modal .modal-content, .quick-presets-modal .modal-content {
    max-height: 85vh;
}

    
}

/* Extra small devices */
@media (max-width: 320px) {
    .number-value {
        font-size: 0.8rem;
    }

    .weight-indicator {
        display: none;
    }

    .result-analysis {
        grid-template-columns: repeat(3, 1fr);
    }

    .scores-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
        .filter-grid {
    gap: 20px;
}
}