/* PhyLearn Responsive Framework - Mobile First Design */

/* Base Mobile Styles (320px+) */
.container-responsive {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

/* Typography - Mobile First */
.text-responsive-xs { font-size: 0.75rem; }
.text-responsive-sm { font-size: 0.875rem; }
.text-responsive-base { font-size: 1rem; }
.text-responsive-lg { font-size: 1.125rem; }
.text-responsive-xl { font-size: 1.25rem; }
.text-responsive-2xl { font-size: 1.5rem; }
.text-responsive-3xl { font-size: 1.875rem; }
.text-responsive-4xl { font-size: 2.25rem; }

/* Grid System - Mobile First */
.grid-responsive {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

/* Card Components - Mobile First */
.card-responsive {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card-responsive:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Navigation - Mobile First */
.nav-responsive {
    padding: 0.75rem 1rem;
    backdrop-filter: blur(10px);
}

.nav-mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    z-index: 1000;
    transition: left 0.3s ease;
    padding: 2rem 1rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-mobile-menu.active {
    left: 0;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Form Elements - Mobile First */
.form-responsive {
    width: 100%;
}

.input-responsive {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-responsive:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-responsive {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px; /* Minimum touch target */
}

.btn-responsive:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Table - Mobile First */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
    width: 100%;
}

/* Modal - Mobile First */
.modal-responsive {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content-responsive {
    background: white;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Dashboard Cards - Mobile First */
.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stats-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-4px);
}

/* Progress Components */
.progress-responsive {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-bar-responsive {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 0.25rem;
    transition: width 0.5s ease;
}

/* Learning Module Cards */
.module-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.module-card.locked {
    opacity: 0.6;
    border-left-color: #9ca3af;
}

/* Utility Classes - Mobile First */
.text-center-mobile { text-align: center; }
.hidden-mobile { display: none; }
.block-mobile { display: block; }
.flex-mobile { display: flex; }
.flex-col-mobile { flex-direction: column; }
.items-center-mobile { align-items: center; }
.justify-center-mobile { justify-content: center; }
.space-y-mobile > * + * { margin-top: 1rem; }
.space-x-mobile > * + * { margin-left: 0.5rem; }

/* Spacing - Mobile First */
.p-mobile { padding: 1rem; }
.px-mobile { padding-left: 1rem; padding-right: 1rem; }
.py-mobile { padding-top: 1rem; padding-bottom: 1rem; }
.m-mobile { margin: 1rem; }
.mx-mobile { margin-left: 1rem; margin-right: 1rem; }
.my-mobile { margin-top: 1rem; margin-bottom: 1rem; }

/* Tablet Styles (768px+) */
@media (min-width: 768px) {
    .container-responsive {
        max-width: 768px;
        padding: 0 2rem;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .text-responsive-3xl { font-size: 2.25rem; }
    .text-responsive-4xl { font-size: 3rem; }
    
    .card-responsive {
        padding: 1.5rem;
    }
    
    .nav-responsive {
        padding: 1rem 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .modal-content-responsive {
        padding: 2rem;
    }
    
    /* Show desktop navigation, hide mobile menu */
    .nav-desktop { display: block; }
    .nav-mobile-toggle { display: none; }
    
    /* Typography adjustments */
    .text-center-mobile { text-align: left; }
    .hidden-mobile { display: block; }
    
    /* Spacing adjustments */
    .p-mobile { padding: 1.5rem; }
    .px-mobile { padding-left: 1.5rem; padding-right: 1.5rem; }
    .py-mobile { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* Desktop Styles (1024px+) */
@media (min-width: 1024px) {
    .container-responsive {
        max-width: 1024px;
        padding: 0 3rem;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .text-responsive-4xl { font-size: 3.5rem; }
    
    .card-responsive {
        padding: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .dashboard-card {
        padding: 2rem;
    }
    
    /* Spacing adjustments */
    .p-mobile { padding: 2rem; }
    .px-mobile { padding-left: 2rem; padding-right: 2rem; }
    .py-mobile { padding-top: 2rem; padding-bottom: 2rem; }
}

/* Large Desktop Styles (1280px+) */
@media (min-width: 1280px) {
    .container-responsive {
        max-width: 1280px;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .text-responsive-4xl { font-size: 4rem; }
}

/* Extra Large Desktop Styles (1536px+) */
@media (min-width: 1536px) {
    .container-responsive {
        max-width: 1536px;
    }
}

/* Dark Mode Responsive - System Preference */
@media (prefers-color-scheme: dark) {
    .card-responsive {
        background: #1f2937;
        color: white;
        border: 1px solid #374151;
    }
    
    .input-responsive {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }
    
    .input-responsive:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }
    
    .modal-content-responsive {
        background: #1f2937;
        color: white;
        border: 1px solid #374151;
    }
    
    .stats-card {
        background: #1f2937;
        color: white;
        border: 1px solid #374151;
    }
    
    .module-card {
        background: #1f2937;
        color: white;
        border: 1px solid #374151;
    }
    
    .nav-mobile-menu {
        background: #1f2937;
        color: white;
        border-right: 1px solid #374151;
    }
}

/* Manual Dark Mode Classes */
.dark .card-responsive {
    background: #1f2937;
    color: white;
    border: 1px solid #374151;
}

.dark .card-responsive:hover {
    border-color: #4b5563;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark .input-responsive {
    background: #374151;
    border-color: #4b5563;
    color: white;
}

.dark .input-responsive:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.dark .input-responsive::placeholder {
    color: #9ca3af;
}

.dark .modal-content-responsive {
    background: #1f2937;
    color: white;
    border: 1px solid #374151;
}

.dark .stats-card {
    background: #1f2937;
    color: white;
    border: 1px solid #374151;
}

.dark .stats-card:hover {
    border-color: #4b5563;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark .module-card {
    background: #1f2937;
    color: white;
    border: 1px solid #374151;
}

.dark .module-card:hover {
    border-color: #4b5563;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark .nav-mobile-menu {
    background: #1f2937;
    color: white;
    border-right: 1px solid #374151;
}

.dark .btn-responsive {
    border: 1px solid #374151;
}

.dark .btn-responsive:hover {
    border-color: #4b5563;
}

.dark .dashboard-card {
    border: 1px solid #374151;
}



/* Touch and Accessibility Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn-responsive {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }
    
    .input-responsive {
        min-height: 48px;
        padding: 1rem;
    }
    
    .card-responsive:hover {
        transform: none;
    }
    
    .stats-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .nav-responsive,
    .btn-responsive,
    .nav-mobile-menu,
    .nav-overlay {
        display: none !important;
    }
    
    .container-responsive {
        max-width: none;
        padding: 0;
    }
    
    .card-responsive {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dark .loading-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
} 