/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Extra Small Devices (Phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section {
        padding: 30px 20px !important;
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Cards spacing */
    .card-body {
        padding: 15px;
    }
    
    /* Tables */
    .table {
        font-size: 14px;
    }
    
    /* Badges */
    .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Modals */
    .modal-dialog {
        margin: 10px;
    }
}

/* Small Devices (Tablets, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.2rem !important;
    }
}

/* Medium Devices (Tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Large Devices (Desktops, 992px and up) */
@media (min-width: 992px) {
    /* Show sidebar */
    .sidebar {
        display: block !important;
    }
    
    /* Hide mobile navbar */
    .navbar.d-lg-none {
        display: none !important;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ========================================
   TOUCH OPTIMIZATIONS
   ======================================== */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 15px 20px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* ========================================
   LANDSCAPE MODE (Mobile)
   ======================================== */

@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        padding: 20px !important;
    }
    
    .player-bar {
        padding: 5px 0 !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .sidebar,
    .navbar,
    .player-bar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        break-inside: avoid;
    }
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a2e;
        --text-dark: #ffffff;
        --border-color: #2d3748;
    }
    
    body {
        background-color: var(--light-bg);
        color: var(--text-dark);
    }
    
    .card {
        background-color: #16213e;
        color: var(--text-dark);
    }
    
    .table {
        color: var(--text-dark);
    }
    
    .form-control,
    .form-select {
        background-color: #2d3748;
        color: var(--text-dark);
        border-color: #4a5568;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}