/* Mobile-First Responsive Styles */
@media (max-width: 768px) {
    .app-container {
        padding-bottom: 60px;
    }

    /* Bottom Navigation */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        display: flex;
        justify-content: space-around;
        padding: 0.5rem 1rem;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        cursor: pointer;
        opacity: 0.6;
        transition: opacity 0.2s;
    }

    .nav-item.active {
        opacity: 1;
        color: var(--primary-color);
    }

    .nav-icon {
        font-size: 1.5rem;
    }

    .nav-label {
        font-size: 0.75rem;
    }

    /* User Info Bar */
    .user-info-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        background: white;
        border-bottom: 1px solid var(--border);
    }

    .user-details {
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-weight: 600;
        font-size: 1rem;
    }

    .user-role {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

    .btn-logout {
        background: none;
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.75rem;
    }

    /* Navigation Tabs */
    .nav-tabs {
        display: flex;
        background: white;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex: 1;
        padding: 0.75rem;
        background: none;
        border: none;
        font-size: 0.875rem;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.2s;
    }

    .tab-btn.active {
        color: var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
    }

    /* Filter Bar */
    .filter-bar {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }

    .filter-select, .filter-input {
        flex: 1;
        min-width: 100px;
        padding: 0.5rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 0.875rem;
    }

    /* Request Cards */
    .request-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: transform 0.2s;
    }

    .request-card:active {
        transform: scale(0.98);
    }

    .request-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .request-blood-type {
        font-size: 1.25rem;
        font-weight: bold;
        color: var(--primary-color);
    }

    .urgency-badge {
        padding: 0.25rem 0.5rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .urgency-emergency {
        background: #ffebee;
        color: #c62828;
    }

    .urgency-urgent {
        background: #fff3e0;
        color: #f57c00;
    }

    .urgency-normal {
        background: #e8f5e8;
        color: #2e7d32;
    }

    .request-details {
        font-size: 0.875rem;
        color: var(--text-secondary);
        margin-bottom: 0.75rem;
    }

    .request-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }

    .respond-btn {
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.875rem;
    }

    /* Stats Grid */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }

    .stat-card {
        text-align: center;
        padding: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .stat-value {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--primary-color);
    }

    .stat-label {
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin-top: 0.25rem;
    }

    /* Modal Styles for Mobile */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        display: flex;
        align-items: flex-end;
        z-index: 2000;
    }

    .modal-content {
        background: white;
        width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        overflow-y: auto;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 1px solid var(--border);
        display: flex;
        gap: 0.5rem;
    }

    .modal-footer button {
        flex: 1;
    }

    /* Loading States */
    .loading {
        text-align: center;
        padding: 2rem;
        color: var(--text-secondary);
    }

    .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;
        }
    }

    /* Touch-friendly buttons */
    button, .btn-primary, .btn-secondary, .respond-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Form improvements for mobile */
    input, select, textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }

    /* Offline indicator */
    .offline-banner {
        background: #ff9800;
        color: white;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .app-container {
        max-width: 800px;
        margin: 0 auto;
    }

    .bottom-nav {
        display: none;
    }
}

/* Desktop Styles */
@media (min-width: 1025px) {
    .bottom-nav {
        display: none;
    }
    
    .app-container {
        max-width: 1200px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
}