.main-container {
            display: flex;
            min-height: calc(100vh - 140px); /* Adjust based on header/footer height */
            margin-top: 20px;
        }
        
        /* Left Sidebar Styles */
        .sidebar {
            width: 220px;
            background: white;
            border-right: 1px solid #e0e0e0;
            padding: 1.5rem;
            box-shadow: 2px 0 5px rgba(0,0,0,0.05);
            position: sticky;
            top: 80px; /* Adjust based on header height */
            height: calc(100vh - 100px); /* Adjust based on header/footer height */
            overflow-y: auto;
        }
        
        .sidebar-header {
            padding-bottom: 0.5rem;
            padding-left: 0.9rem;
            margin-bottom: 0.5rem;
            margin-top: 0.1rem;
            border-bottom: 2px solid #f0f0f0;
        }
        
        .category-menu {
            list-style: none;
        }
        
        .category-item {
            margin-bottom: 0.5rem;
        }
        
        .category-link {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0.2rem;
            color: #333;
            text-decoration: none;
            border-radius: 8px;
            transition: all 0.3s ease;
            border-left: 4px solid transparent;
        }
        
        .category-link:hover {
            background-color: #f8f9fa;
            transform: translateX(5px);
        }
        
        .category-link.active {
            background-color: #e8f4f8;
            border-left-color: #3498db;
            color: #2c3e50;
            font-weight: bold;
        }
        
        .category-info {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .category-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
            background-color: #95a5a6;
        }
        
        .category-count {
            background-color: #e0e0e0;
            color: #666;
            padding: 0.2rem 0.6rem;
            border-radius: 12px;
            font-size: 0.8rem;
            font-weight: bold;
        }
        
        .category-link.active .category-count {
            background-color: #3498db;
            color: white;
        }
        
        /* Main Content Styles */
        .main-content {
            flex: 1;
            padding: 0 2rem 2rem 2rem;
            overflow-y: auto;
        }
        
        .content-header {
            background: white;
            padding: 1.5rem;
            border-radius: 8px;
            margin-bottom: 2rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
       
        
        .filter-form {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            align-items: flex-end;
        }
        
        .search-group {
            grid-column: 1 / -1;
        }
      
        
        .filter-select {
            width: 200px;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.95rem;
        }

         .filter-input {
            width: 360px;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 0.95rem;
        }
        
        .filter-buttons {
            display: flex;
            white-space: nowrap;
            flex-shrink: 0;
            gap: 0.5rem;
            align-items: center;
        }
        
        .filter-btn {
            padding: 0.5rem 1.0rem;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.95rem;
            transition: background-color 0.3s; 
        }
        
        .filter-btn:hover {
            background-color: #2980b9;
        }
        
        .reset-btn {
            padding: 0.5rem 1rem;
            background-color: #95a5a6;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            font-size: 0.95rem;
            transition: background-color 0.3s;
        }
        
        .reset-btn:hover {
            background-color: #7f8c8d;
        }
        
        /* Materials Grid */
        .materials-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.2rem;
            align-items: start;
        }
        
        .material-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            height: 100%;
            display: flex;
            flex-direction: column;
            border: 1px solid #eee;
        }
        
        .material-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        }
        
        .material-content {
            padding: 1.5rem;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
        
        .material-footer {
            margin-top: auto;
            padding-top: 1rem;
            border-top: 1px solid #eee;
        }
        
        .material-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .material-description {
            color: #666;
            margin: 0.5rem 0;
            flex-grow: 1;
            line-height: 1.6;
        }
        
        .category-tag {
            display: inline-block;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: bold;
            color: white;
            margin-bottom: 0.5rem;
        }
        
        .material-meta {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            margin-bottom: 0.5rem;
            flex-wrap: wrap;
        }

        .category-badge {
            display: inline-block;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: bold;
            color: white;
            margin-left: 0.5rem;
            margin-top: 0.3rem;
        }
        
        /* Keep all other styles from previous version */
        .reading-container {
            max-width: 1000px;
            margin: 2rem auto;
            background: white;
            padding: 2rem;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .reading-header {
            text-align: center;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid #eee;
        }
        
        .reading-content {
            line-height: 1.2;
            font-size: 1.1rem;
            margin-bottom: 2rem;
            white-space: pre-line;
        }

        .actions {
            text-align: center;
            margin-top: 2rem;
        }