/* Responsive Styles */
@media (max-width: 1200px) {
    .container-fluid {
        padding: 0 15px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    #content {
        width: calc(100% - 200px);
    }
    
    .card-header h6 {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .sidebar {
        width: 280px;
    }
    
    /* Mobile Chat */
    .chat-container {
        height: calc(100vh - 200px);
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    /* Mobile Tables */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
    
    /* Mobile Forms */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Bottom Navigation for Mobile */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        display: flex;
        justify-content: space-around;
        padding: 10px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        display: none;
    }
    
    .mobile-bottom-nav .nav-item {
        text-align: center;
        flex: 1;
    }
    
    .mobile-bottom-nav .nav-item a {
        color: #6c757d;
        text-decoration: none;
        font-size: 0.8rem;
    }
    
    .mobile-bottom-nav .nav-item i {
        font-size: 1.5rem;
        display: block;
        margin-bottom: 5px;
    }
    
    .mobile-bottom-nav .nav-item.active a {
        color: var(--primary-color);
    }
    
    /* Show bottom nav on mobile, adjust content padding */
    body {
        padding-bottom: 70px;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Hide sidebar on mobile by default */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    #content {
        width: 100%;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Stack dashboard cards */
    .col-xl-3, .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Full width modals on mobile */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Adjust flashcard size */
    .flashcard-inner {
        height: 250px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    button, 
    .btn,
    .list-group-item,
    .nav-link {
        min-height: 44px;
    }
    
    input, 
    select, 
    textarea {
        font-size: 16px;
    }
}