/* Responsive Design Styles */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* General adjustments */
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Hero section */
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    
    /* Timer adjustments */
    .timer-display {
        font-size: 3rem;
    }
    .timer-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .timer-controls .btn {
        width: 100%;
        padding: 0.6rem 0.75rem;
        margin: 0.25rem 0;
    }
    .timer-container {
        padding: 0 0.5rem;
    }
    
    /* Task form */
    #taskForm .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    .task-item {
        padding: 0.75rem !important;
    }
}
    
    /* Task filters */
    .task-filters {
        flex-direction: column;
    }
    .task-filters .btn-group,
    .task-filters .dropdown {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Dashboard stats */
    .stats-card {
        margin-bottom: 1rem;
    }
    
    /* Footer */
    footer h5 {
        margin-top: 1rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero section */
    .hero-section {
        padding: 80px 0;
    }
    
    /* Timer adjustments */
    .timer-display {
        font-size: 3.5rem;
    }
    
    /* Dashboard stats */
    .stats-card {
        margin-bottom: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section */
    .hero-section {
        padding: 100px 0;
    }
    
    /* Timer adjustments */
    .timer-display {
        font-size: 4rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Hero section */
    .hero-section {
        padding: 120px 0;
    }
    
    /* Timer adjustments */
    .timer-display {
        font-size: 5rem;
    }
}

/* Print styles */
@media print {
    .navbar, 
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}

/* Cross-browser compatibility */
/* Fix for Firefox */
@-moz-document url-prefix() {
    .timer-display {
        line-height: 1.1;
    }
}

/* Fix for Safari */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .form-control {
            -webkit-appearance: none;
            border-radius: 0.25rem;
        }
    }
}

/* Fix for IE11 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .card {
        display: block;
    }
    .d-flex {
        display: block;
    }
    .align-items-center {
        align-items: center;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.auto-dark-mode {
        background-color: #121212;
        color: #f8f9fa;
    }
    
    body.auto-dark-mode .card {
        background-color: #1e1e1e;
        border-color: #333;
    }
    
    body.auto-dark-mode .navbar-light {
        background-color: #1e1e1e !important;
    }
    
    body.auto-dark-mode .navbar-light .navbar-brand,
    body.auto-dark-mode .navbar-light .nav-link {
        color: #f8f9fa;
    }
    
    body.auto-dark-mode .bg-light {
        background-color: #1e1e1e !important;
    }
    
    body.auto-dark-mode .text-muted {
        color: #adb5bd !important;
    }
}
